# Creating VPS Instances

Step-by-step guide to creating and configuring your first VPS instance.

## Prerequisites

Before creating a VPS:

1. ✅ Have an active project
2. ✅ Add a payment method to your project
3. ✅ Have an SSH key configured — or plan to set a root password instead
4. ✅ Check your [account limits](https://docs.danubedata.ro/account-limits) — the number of instances you can run depends on your account

## Step-by-Step Guide

### Step 1: Navigate to VPS Section

1. Log in to your DanubeData dashboard
2. Ensure you're in the correct project
3. Click **Pods** in the main navigation

### Step 2: Start Creation

1. Click the **Create Pod** button
2. You'll see the VPS creation form

### Step 3: Choose Operating System

Select your preferred OS:

**Ubuntu** (Recommended for most users)
- 26.04 LTS (Latest, best support)
- 24.04 LTS (Stable, long-term support)
- 22.04 LTS (Long-term support)

**Debian**
- 13 (Trixie) - Latest stable
- 12 (Bookworm) - Previous stable
- 11 (Bullseye) - Older

**AlmaLinux**
- 9 - Latest
- 8 - Stable

**Rocky Linux**
- 9 - Latest
- 8 - Stable

**Fedora**
- 42 - Latest features
- 41 - Stable

**Alpine**
- 3.22 - Latest
- 3.21 - Stable
- 3.20 - Older

**Windows Server**
- 2025 (BYOL — bring your own license)

### Choosing an OS

**For Web Applications**:
- Ubuntu 22.04 or 24.04 LTS
- Wide software support
- Large community

**For Stability**:
- Debian 11 or 12
- Rock-solid reliability
- Security focus

**For Enterprise**:
- AlmaLinux 9 or Rocky Linux 9
- RHEL compatibility
- Corporate environment

**For Latest Features**:
- Fedora 42
- Cutting edge packages
- Short support cycle

### Step 4: Select Resource Profile

Choose based on your workload:

**Shared CPU** (4:1 overcommit, best value):

| Profile | vCPUs | RAM | NVMe Disk |
|---------|-------|-----|-----------|
| **Nano** | 2 | 2 GB | 20 GB |
| **Micro** | 3 | 4 GB | 40 GB |
| **Small** | 4 | 8 GB | 80 GB |
| **Medium** | 8 | 16 GB | 160 GB |
| **Large** | 16 | 32 GB | 320 GB |

**Dedicated CPU** (guaranteed cores):

| Profile | vCPUs | RAM | NVMe Disk |
|---------|-------|-----|-----------|
| **Nano** | 2 | 2 GB | 40 GB |
| **Micro** | 3 | 4 GB | 80 GB |
| **Small** | 4 | 8 GB | 160 GB |
| **Medium** | 8 | 16 GB | 320 GB |
| **Large** | 16 | 32 GB | 640 GB |

Current prices are shown in the create form and on the [pricing page](https://danubedata.ro/pricing). Billing is hourly (monthly price ÷ 730) with a monthly cap.

**Need a size in between?** Toggle **Customize** on the profile step to fine-tune vCPUs, RAM, and disk beyond the fixed profiles. The form shows a live price estimate as you adjust. See [Resource Profiles → Custom Sizing](https://docs.danubedata.ro/vps-profiles#custom-sizing).

**Profile Selection Tips**:

**Micro** - Good for:
- Development/testing
- Learning
- Personal projects
- Low-traffic blogs

**Small** - Good for:
- Small production sites
- API servers
- Development environments
- Small databases (non-critical)

**Medium** - Good for:
- Standard production workloads
- E-commerce sites
- SaaS applications
- Multiple services

**Large** - Good for:
- High-traffic applications
- Data processing
- Heavy compute tasks
- Large databases

### Step 5: Name Your Instance

Enter a descriptive name:

**Good Names**:
- `prod-web-01`
- `staging-api-server`
- `dev-frontend`
- `wordpress-blog`

**Poor Names**:
- `server1`
- `test`
- `vps`

**Naming Convention Tips**:
```
[environment]-[purpose]-[number]
prod-web-01
staging-api-02
dev-database-01
```

### Step 6: Location

DanubeData runs from a single location:

- **Falkenstein, Germany** (`fsn1`) — EU data residency

There's no region to choose — every VPS is provisioned in Falkenstein, keeping your data within the EU.

### Step 7: Authentication (SSH Key or Password)

Choose how you'll log in as `root`:

- **SSH key** (recommended) — select one or more existing keys, or add a new one
- **Root password** — set a password of at least 12 characters instead of (or alongside) a key

> **Windows Server** instances use password authentication automatically, since remote access is over RDP.

**Select existing SSH key(s)**:
- Check boxes for keys to add
- Can select multiple keys
- Keys allow secure server access

**Don't have an SSH key?**
1. Click **Add SSH Key** link
2. Generate SSH key on your computer:
   
   ```bash
   # On Linux/Mac
   ssh-keygen -t ed25519 -C "your_email@example.com"
   
   # On Windows (PowerShell)
   ssh-keygen -t ed25519 -C "your_email@example.com"
   ```

3. Copy your public key:
   ```bash
   # Linux/Mac
   cat ~/.ssh/id_ed25519.pub
   
   # Windows
   type %USERPROFILE%\.ssh\id_ed25519.pub
   ```

4. Paste in SSH key form
5. Give it a name (e.g., "My Laptop", "Work Desktop")
6. Click **Add Key**
7. Return to VPS creation

### Optional: One-Click Marketplace App

If you'd rather not configure the server yourself, you can pick a **Marketplace App** during creation. The platform installs and configures the selected application automatically on first boot (via cloud-init), so the VPS comes up ready to use.

- Apps are filtered to those compatible with your chosen operating system
- Apps that need more resources than your selected profile are disabled until you size up
- Marketplace app setup runs **before** any custom cloud-init you provide

### Step 8: Custom Cloud-Init (Optional)

Provide a shell script or cloud-config YAML to automate your VPS setup on first boot. Your script runs after the platform finishes configuring networking, security, and SSH.

**Examples of what you can automate:**
- Install Docker, K3s, or LAMP stack
- Configure services and daemons
- Deploy applications

```bash
#!/bin/bash
set -e
apt update -y && apt install -y docker.io
systemctl enable docker && systemctl start docker
```

Once your VPS is running, SSH in and run `cloud-init-progress` to monitor your script's execution in real time.

See [Custom Cloud-Init](https://docs.danubedata.ro/vps-cloud-init) for the full guide, examples, and troubleshooting.

### Step 9: Configure Networking (Optional)

**Network Stack**:
- **Dual Stack** (default) — public IPv4 + IPv6 for maximum compatibility
- **IPv4 Only**
- **IPv6 Only** — for modern IPv6-native networks

**Hostname** (optional):
- Custom hostname for your server
- Example: `web-server.example.com`
- Defaults to auto-generated name

**Firewall** (optional):
- Attach an existing firewall
- Leave empty for default (allow all)
- Can attach later

**Private Network** (optional):
- Connect to a private network
- For internal instance communication
- Can configure later

### Step 10: Review Configuration

Review your selections:
- Operating System
- Resource Profile
- Name
- Region
- SSH Keys
- Monthly cost estimate
- Hourly cost

**Cost Estimate Example**:

Hourly rate = monthly price ÷ 730 hours; you never pay more than the monthly cap.

### Step 11: Create Instance

1. Review everything is correct
2. Click **Create Pod**
3. Deployment begins immediately

**Deployment Time**: 3-5 minutes

You'll see progress stages:
1. ☐ Provisioning resources
2. ☐ Creating storage
3. ☐ Installing OS
4. ☐ Configuring network
5. ✅ Ready!

## After Creation

### Get Connection Info

Once ready, you'll see:
- **Public IP Address**: For SSH connection
- **Status**: Should show "Running"
- **Resource Usage**: CPU, memory metrics

### First Connection

Connect via SSH:

```bash
ssh root@YOUR_VPS_IP
```

**First login**:
- Accept host key fingerprint
- You're now logged in as root
- Change root password (recommended)

### Initial Setup

1. **Update System**:
   ```bash
   # Ubuntu/Debian
   apt update && apt upgrade -y
   
   # AlmaLinux/Rocky/Fedora
   yum update -y
   ```

2. **Create Non-Root User**:
   ```bash
   adduser yourusername
   usermod -aG sudo yourusername  # Ubuntu/Debian
   usermod -aG wheel yourusername  # AlmaLinux/Rocky/Fedora
   ```

3. **Configure Firewall** (if not using platform firewall):
   ```bash
   # Ubuntu/Debian
   ufw allow 22/tcp
   ufw allow 80/tcp
   ufw allow 443/tcp
   ufw enable
   
   # AlmaLinux/Rocky/Fedora
   firewall-cmd --permanent --add-service=ssh
   firewall-cmd --permanent --add-service=http
   firewall-cmd --permanent --add-service=https
   firewall-cmd --reload
   ```

4. **Install Essential Packages**:
   ```bash
   # Ubuntu/Debian
   apt install -y curl wget git vim htop
   
   # AlmaLinux/Rocky/Fedora
   yum install -y curl wget git vim htop
   ```

## Common Creation Scenarios

### Web Server

```
OS: Ubuntu 22.04 LTS
Profile: Small (2 vCPU, 2 GB RAM)
Purpose: Host WordPress site
Firewall: Allow 80, 443, 22
```

### API Server

```
OS: Ubuntu 24.04 LTS
Profile: Medium (4 vCPU, 4 GB RAM)
Purpose: REST API backend
Firewall: Allow 443, 22 from specific IPs
```

### Development Environment

```
OS: Ubuntu 22.04 LTS
Profile: Micro (1 vCPU, 1 GB RAM)
Purpose: Testing and development
Firewall: Allow 22 from your IP only
```

### Docker Host

```
OS: Ubuntu 22.04 LTS
Profile: Medium (4 vCPU, 4 GB RAM)
Purpose: Run containers
Firewall: Allow 22, 80, 443
```

### CI/CD Server

```
OS: Ubuntu 22.04 LTS
Profile: Large (8 vCPU, 8 GB RAM)
Purpose: Jenkins/GitLab CI
Firewall: Allow 22, 8080
```

## Creation Checklist

Before clicking create, verify:

- [ ] Correct operating system version
- [ ] Appropriate resource profile for workload
- [ ] Descriptive, meaningful name
- [ ] Best region for users
- [ ] SSH key(s) added
- [ ] Firewall configured (if needed)
- [ ] Understand monthly costs
- [ ] Within project resource limits

## Troubleshooting

### Can't Create VPS

**Error: "Payment method required"**
- Add payment method in Billing section

**Error: "Resource limit exceeded"**
- You've reached your VPS limit — the number of instances you can run depends on your [account limits](https://docs.danubedata.ro/account-limits)
- Delete unused VPS or request a limit increase

**Error: "Authentication required"**
- Add at least one SSH key, or set a root password (min. 12 characters)
- Windows Server instances always use a password

### Creation Stuck

If creation takes longer than 10 minutes:
1. Refresh the page
2. Check VPS list for the instance
3. Contact support if still stuck

### Can't SSH After Creation

**Connection refused**:
- Wait 5 full minutes after creation
- VPS might still be booting
- Check VPS status is "Running"

**Permission denied**:
- Verify SSH key was added correctly
- Check you're using correct private key
- Try: `ssh -v root@IP` for verbose output

**Timeout**:
- Check firewall allows port 22
- Verify you have the correct IP
- Check network connectivity

## Best Practices

### Naming
- Use consistent naming scheme
- Include environment (prod/staging/dev)
- Include purpose (web/api/db)
- Add numbers for multiple instances

### Sizing
- Start small, scale up if needed
- Monitor resource usage first week
- Resize if consistently over 80% usage
- Don't over-provision "just in case"

### Security
- Add SSH keys before creation
- Attach firewall immediately
- Use strong hostname
- Change default passwords
- Update system after creation

### Cost Management
- Choose appropriate profile
- Delete dev/staging instances when not needed (stopped instances are still billed)
- Delete unused instances
- Monitor spending in Billing

## Next Steps

Now that your VPS is created:

1. [Connect via SSH](https://docs.danubedata.ro/vps-ssh)
2. [Monitor cloud-init progress](https://docs.danubedata.ro/vps-cloud-init) (if you used a custom script)
3. [Install your application](https://docs.danubedata.ro/vps-managing)
4. [Configure firewall rules](https://docs.danubedata.ro/networking-firewalls)
5. [Set up monitoring](https://docs.danubedata.ro/monitoring-overview)
6. [Create snapshots](https://docs.danubedata.ro/vps-snapshots)

Need help? Contact support through the dashboard.

