A virtual private server is a Linux machine you rent by the month. For a few dollars you get root access to something that runs continuously, with a fixed IP address and no one else's rules about what you may install.
That is the appeal and the catch. Nobody patches it, nobody configures the firewall, and nobody notices when it is compromised. A server exposed to the internet with password authentication starts receiving login attempts within minutes of getting an address — not eventually, within minutes.
This tutorial takes a blank Ubuntu server and makes it something you can responsibly run real work on. The order is deliberate: security before software, because the gap between the two is when servers get taken.
What you need
- A VPS running Ubuntu LTS from any provider. Entry-level is fine — 1 GB of RAM is enough to follow along.
- A terminal on your own machine.
- A domain name, for the HTTPS chapter. Not needed before that.
What you will have at the end
A hardened server, key-only SSH, a firewall with two ports open, Docker installed, an application running behind automatic HTTPS, backups that you have proven restore, and basic monitoring telling you when something is wrong.