How to Set Up Your First VPS for Self-Hosting

So you want to self-host. Smart move. But where do you actually run your services?

For most people, the answer is a VPS (Virtual Private Server). It's a virtual machine in the cloud that you control completely — install whatever you want, run whatever you want, break whatever you want. Your rules.

This guide will take you from zero to a secure, running server in about 30 minutes. No prior experience required.

Why a VPS?

You could self-host on hardware at home, and many people do. But a VPS has some advantages:

  • Always on — No worrying about power outages or your router restarting
  • Fast upload speeds — Home internet upload is usually terrible
  • Public IP — No fighting with CGNAT or port forwarding
  • Cheap — Basic VPS plans start around €3-5/month
  • Separate from your home network — If someone hacks your VPS, they don't get your home network

Choosing a VPS Provider

For Europeans: Hetzner

Hetzner offers the best price-to-performance ratio I've found. Their cheapest shared vCPU plan (CX22) gives you 2 vCPUs, 4GB RAM, and 40GB storage for about €4/month.

For Americans: Vultr or DigitalOcean

Vultr has datacenters worldwide and competitive pricing. Their $6/month plan gets you 1 vCPU, 1GB RAM, and 25GB storage.

Step 1: Create Your VPS

  1. Create an account at your chosen provider
  2. Choose Ubuntu 24.04 LTS as your OS
  3. Pick 1-2 vCPUs, 2-4GB RAM to start
  4. Add an SSH key
  5. Create the server

Step 2: Set Up SSH Access

ssh-keygen -t ed25519 -C "your-email@example.com"

Step 3: Initial Server Security

apt update && apt upgrade -y
adduser yourname
usermod -aG sudo yourname

Step 4: Install Docker

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker yourname

Step 5: Deploy Your First Service

docker run -d --name uptime-kuma --restart always -p 3001:3001 -v uptime-kuma:/app/data louislam/uptime-kuma:1

Visit http://your-server-ip:3001 — you now have a running service!

Check out our other guides for specific service setups. Welcome to self-hosting.