> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repocloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Ubuntu

> Clean Ubuntu 24.04 LTS server on a dedicated VPS with root SSH access, browser console, snapshots, and live resizing

## Ubuntu on RepoCloud

Ubuntu VPS gives you a clean Ubuntu 24.04 LTS virtual private server with nothing pre-installed — just the operating system and root access. Start from a blank slate and build whatever you need: web servers, databases, development environments, CI runners, monitoring stacks, VPN endpoints, or anything else that runs on Linux.

<CardGroup cols={2}>
  <Card title="Clean Slate" icon="broom">
    Minimal Ubuntu 24.04 LTS — no bloatware, no opinionated configuration, just the OS and apt package management
  </Card>

  <Card title="Full Root Access" icon="terminal">
    Root SSH access from deployment with an auto-generated Ed25519 key pair sent in your deployment email
  </Card>

  <Card title="10-Year Support" icon="shield-halved">
    Canonical's standard security maintenance for Ubuntu 24.04 LTS covers patches through April 2034
  </Card>

  <Card title="Flexible Pricing" icon="money-bill">
    Start from \$3/month (1 vCPU, 1 GB RAM). Scale up any time. Dedicated IPv4 included with every server.
  </Card>

  <Card title="Snapshots" icon="camera">
    Create point-in-time snapshots before risky changes and roll back with one click
  </Card>

  <Card title="Browser Console" icon="display">
    Serial console access from the RepoCloud dashboard for emergency recovery without SSH
  </Card>
</CardGroup>

## Deploying Ubuntu on RepoCloud

<Steps>
  <Step title="Find Ubuntu in the Marketplace">
    Go to the RepoCloud marketplace and search for "Ubuntu". Click on the Ubuntu VPS listing.
  </Step>

  <Step title="Enter a Project Name">
    Choose a friendly name for your project (e.g., "my-server").
  </Step>

  <Step title="Choose Resource Settings">
    Select a tier for your server. All tiers are available starting from Tier 1 (1 vCPU, 1 GB RAM, \$3/month). A dedicated IPv4 address is included with every VPS at no extra charge. Servers can be upgraded to a higher tier but not downsized.
  </Step>

  <Step title="Deploy">
    Click **Deploy Ubuntu** and wait 1–2 minutes. Ubuntu bare-metal provisioning is faster than application VPS apps because there is no software installation step.
  </Step>

  <Step title="Check Your Email">
    Once deployment finishes, you receive an email with:

    * **SSH command** — `ssh root@<your-ip>`
    * **SSH Private Key** — save it to a file, `chmod 600`, and use it to connect
    * **Manage Instance** button — link to the RepoCloud manage page
  </Step>
</Steps>

<Note>
  Ubuntu VPS does not show a URL on the dashboard because it is a bare server with no web application. Access it exclusively through SSH or the browser console.
</Note>

## Connecting via SSH

### Save Your Private Key

Your deployment email includes an Ed25519 private key. Save it to a file on your local machine:

```bash theme={null}
# Paste the key contents into a file
nano ~/.ssh/repocloud_ubuntu

# Set correct permissions (required — SSH refuses keys with open permissions)
chmod 600 ~/.ssh/repocloud_ubuntu
```

### Connect

```bash theme={null}
ssh -i ~/.ssh/repocloud_ubuntu root@<your-ipv4-address>
```

Your IPv4 address is shown in the RepoCloud manage page under **Access**.

### Add More SSH Keys

You can add additional SSH keys from the RepoCloud manage page (**SSH Keys** section) or directly on the server:

```bash theme={null}
# On the server
cat >> ~/.ssh/authorized_keys << 'EOF'
ssh-ed25519 AAAA... your-other-key
EOF
```

## Initial Server Setup

After connecting via SSH, here is a recommended baseline setup:

### Update Packages

```bash theme={null}
apt update && apt upgrade -y
```

### Configure the Firewall

Ubuntu ships with UFW (Uncomplicated Firewall) available but not enabled:

```bash theme={null}
ufw allow 22/tcp     # SSH
ufw allow 80/tcp     # HTTP (if hosting a website)
ufw allow 443/tcp    # HTTPS (if hosting a website)
ufw enable
```

### Create a Non-Root User (Optional)

```bash theme={null}
adduser deploy
usermod -aG sudo deploy

# Copy SSH authorized keys
mkdir -p /home/deploy/.ssh
cp ~/.ssh/authorized_keys /home/deploy/.ssh/
chown -R deploy:deploy /home/deploy/.ssh
chmod 700 /home/deploy/.ssh
chmod 600 /home/deploy/.ssh/authorized_keys
```

### Set the Timezone

```bash theme={null}
timedatectl set-timezone UTC    # or your preferred timezone
```

### Enable Automatic Security Updates

```bash theme={null}
apt install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
```

## Common Use Cases

### Web Server (Nginx)

```bash theme={null}
apt install -y nginx
systemctl enable nginx
ufw allow 'Nginx Full'
```

Place your site in `/var/www/html/` or configure virtual hosts in `/etc/nginx/sites-available/`.

For HTTPS, install Certbot:

```bash theme={null}
apt install -y certbot python3-certbot-nginx
certbot --nginx -d yourdomain.com
```

### Database Server (PostgreSQL)

```bash theme={null}
apt install -y postgresql postgresql-contrib
systemctl enable postgresql

# Create a database and user
sudo -u postgres createuser --interactive
sudo -u postgres createdb mydb
```

### Development Environment

```bash theme={null}
# Node.js (via NodeSource)
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs

# Python
apt install -y python3 python3-pip python3-venv

# Docker
curl -fsSL https://get.docker.com | bash
```

### VPN Endpoint (WireGuard)

```bash theme={null}
apt install -y wireguard
wg genkey | tee /etc/wireguard/privatekey | wg pubkey > /etc/wireguard/publickey
```

Configure `/etc/wireguard/wg0.conf` with your network settings, then:

```bash theme={null}
systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0
```

### CI Runner (GitHub Actions)

```bash theme={null}
# Download the runner
mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64.tar.gz -L \
  https://github.com/actions/runner/releases/latest/download/actions-runner-linux-x64-2.321.0.tar.gz
tar xzf actions-runner-linux-x64.tar.gz

# Configure (use the token from your GitHub repository settings)
./config.sh --url https://github.com/your-org/your-repo --token YOUR_TOKEN
./svc.sh install
./svc.sh start
```

## RepoCloud Manage Page

Your Ubuntu VPS has a dedicated manage page in the RepoCloud dashboard:

<AccordionGroup>
  <Accordion title="Access">
    View your server's IPv4 address and SSH connection command. Ubuntu does not show a clickable URL because there is no web application — use the SSH command directly.
  </Accordion>

  <Accordion title="Power">
    **Power Off** stops the server (data preserved on disk). **Power On** starts it again. **Reboot** performs a graceful restart.
  </Accordion>

  <Accordion title="Console">
    Browser-based serial console for emergency access. Invaluable when SSH is unreachable — for example, after a firewall misconfiguration (`ufw` blocking port 22) or a failed kernel update.
  </Accordion>

  <Accordion title="SSH Keys">
    Lists all registered SSH public keys. Add keys for team members or other machines. Remove old keys when access should be revoked.
  </Accordion>

  <Accordion title="Resize">
    Switch between tiers. All tiers are available (no minimum restriction for Ubuntu). Disk cannot be shrunk after an upgrade — to downsize disk, create a new instance.
  </Accordion>

  <Accordion title="Snapshots">
    Create up to 5 point-in-time snapshots. Best practice: snapshot before upgrading the kernel, changing firewall rules, or any other potentially destructive operation. To restore, click **Restore** next to the target snapshot. If newer snapshots exist, the confirmation dialog lists exactly which ones will be permanently destroyed by the ZFS rollback — the target snapshot itself always survives. The server restarts during restore (\~10–25 seconds) and the page refreshes automatically when complete.
  </Accordion>

  <Accordion title="Custom Domain">
    Point your own domain to the server by creating a DNS A record to your dedicated IPv4 address.
  </Accordion>

  <Accordion title="Danger Zone">
    Permanently delete the server, all data, snapshots, and any IPv4 reservation.
  </Accordion>
</AccordionGroup>

## Snapshots and Backup Strategy

Snapshots capture the entire disk state at a point in time. Use them as safety nets:

1. **Before upgrades**: `apt upgrade`, kernel updates, or major configuration changes
2. **Before experiments**: testing new software stacks, network configurations, or security policies
3. **Regular intervals**: create a weekly snapshot and delete old ones (5 max)

### Restoring a Snapshot

Click **Restore** next to the snapshot you want to roll back to. If newer snapshots exist between the target and the current state, a warning lists them — those snapshots will be **permanently destroyed** because ZFS rollback cannot preserve them. The target snapshot itself always survives. The server restarts during the restore operation (typically 10–25 seconds) and the page refreshes automatically when complete.

For off-server backups, consider:

* `rsync` to another server or local machine
* `restic` or `borgbackup` to S3-compatible storage
* Database-specific dump tools (`pg_dump`, `mysqldump`) for database backups

## Resizing

You can change tiers at any time from the manage page — resizing takes a few minutes. Resizing to a larger tier permanently increases the disk allocation; you cannot resize back down to a smaller tier afterward.

### When to Resize

* **CPU-bound workloads** (compilation, encoding): move to a tier with more vCPUs
* **Memory-bound workloads** (databases, caches): move to a tier with more RAM
* **Storage-bound workloads**: note that disk cannot be shrunk after upsizing

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cannot SSH after deployment">
    Verify you saved the private key with `chmod 600`. Ensure you are using the correct IP from the manage page. If all else fails, use the browser console from the manage page.
  </Accordion>

  <Accordion title="Locked out by UFW">
    If you accidentally blocked SSH with a firewall rule, use the browser console from the RepoCloud manage page. The serial console bypasses the network stack entirely. Run `ufw allow 22/tcp` and `ufw reload` to restore SSH access.
  </Accordion>

  <Accordion title="Server unreachable after kernel update">
    A bad kernel update can prevent boot. Use the browser console to access the GRUB menu and select the previous kernel. If that does not work, restore from a snapshot.
  </Accordion>

  <Accordion title="Disk full">
    Check usage with `df -h`. Clean package caches: `apt clean`. Remove old kernels: `apt autoremove`. Check `/var/log` for large log files. If you need more space, resize to a larger tier from the manage page.
  </Accordion>
</AccordionGroup>

## Use Cases

Ubuntu VPS is ideal for:

* **Developers** who need a clean Linux environment for coding, testing, or running dev tools
* **System administrators** setting up custom infrastructure (web servers, databases, monitoring)
* **DevOps engineers** running CI runners, build servers, or deployment pipelines
* **Network engineers** deploying VPN endpoints, DNS servers, or reverse proxies
* **Students and learners** practicing Linux administration in a real cloud environment
* **Anyone** who needs a dedicated Linux server without the opinions of a pre-installed application

## Next Steps

<CardGroup>
  <Card title="Deploy Ubuntu" icon="rocket" href="https://repocloud.io/details/Ubuntu">
    Launch your Ubuntu VPS from the RepoCloud marketplace
  </Card>

  <Card title="Ubuntu Server Guide" icon="book" href="https://ubuntu.com/server/docs">
    Read the official Ubuntu Server documentation from Canonical
  </Card>

  <Card title="Coolify" icon="snowflake" href="/platforms/coolify">
    Deploy a pre-configured PaaS instead of building from scratch
  </Card>

  <Card title="VPS Apps Overview" icon="server" href="/platforms/introduction">
    Learn about all VPS Apps and the RepoCloud manage page
  </Card>
</CardGroup>
