Step 1: Get a server (VPS)
You need a computer that is online 24/7 — a VPS (virtual private server). Cloud providers everywhere offer them on a monthly plan; 1 vCPU and 2 GB RAM is plenty to start. Once you buy one you get: a public IP and a root password (or key).
💡 Pick a region close to your users first; you can buy a domain later — an IP is enough to get things working.
Step 2: Connect to the server (SSH)
SSH is how you log in to a server remotely. In a terminal on your own computer, run ssh root@your-IP and enter the password to reach the server command line. Everything from here on is typed here.
💡 On Windows the built-in PowerShell or Windows Terminal can ssh; a more secure approach is to set up key-based login and disable password login.
Step 3: Install the runtime (Docker)
Docker packages an app and its dependencies into a "container" that runs with a single command, avoiding "it works on my machine" environment problems. Once Docker and Docker Compose are installed, deploying becomes a matter of writing one config file.
💡 Official one-line script: curl -fsSL https://get.docker.com | sh.
Step 4: Define your services (docker-compose)
Use a docker-compose.yml file to describe which services you want to run (website, database, cache…), then docker compose up -d to start them all at once. This is the most common way to deploy today.
Use the Docker Compose generator →Step 5: Make it reachable from the internet (reverse proxy)
Your app may run on some port of the server (say 3000), but users access it by domain. A reverse proxy (Nginx or Caddy) forwards requests for the domain to that port, and can host multiple sites at the same time.
Use the Nginx config generator →Step 6: Add HTTPS (certificates)
HTTPS is the "little green lock" in the address bar and is now practically required. A free Let’s Encrypt certificate works fine; if you use Caddy, it requests and renews certificates automatically with almost zero config.
💡 Nginx can auto-renew with certbot; Caddy provides HTTPS out of the box.
Step 7: Automate ops (cron scheduled jobs)
Going live is only the beginning. Scheduled database backups, log cleanup, running scripts on a timer — leave all of that to cron. You just write a cron expression describing "when to run", plus the command to run.
Use the Cron expression generator →FAQ
My site will not load and shows a 502 after deploying — what do I do?
Most likely the port the reverse proxy forwards to does not match the port the app actually listens on, or the app is not running. First confirm the container is running (docker compose ps), then check whether the Nginx/Caddy upstream address points to the correct port.
Do I have to buy a domain?
You can access and verify the deploy with just an IP + port first; but to enable HTTPS and serve real users, you still need a domain.