Which Ubuntu to install on a VPS and what to do after installation
Ubuntu is the most common image in hosting control panels and probably the best-documented server system: any error already has an answer on a forum. For the plans in the table above you can pick it when ordering or reinstall it from the panel in a couple of minutes. The questions are usually different: which version to take and what to do right after the first login.
Which version to choose
Only LTS releases go on a server: they come out every two years, in April, and receive standard updates for five years. Interim versions numbered .10 are supported for just nine months and aren't suitable for a VPS.
- 24.04 LTS — a reliable choice for a new server: the packages are time-tested, standard support runs until 2029, and every piece of software has instructions for it.
- 26.04 LTS — the newest. Not every host offers its image yet, and some third-party software adds support for a new LTS with a delay.
- 22.04 LTS — if your software specifically requires it. Standard support ends in spring 2027.
- 20.04 and older — only for old projects: security updates for them come only through an Ubuntu Pro subscription, which is free for personal use on a few machines.
After installation, check the release with cat /etc/os-release. Hosts don't always update the images in their panels on time, and the first update of a fresh server sometimes pulls in hundreds of packages.
The first half hour after installation
- Update the system:
apt update && apt upgrade. If the kernel was updated, reboot. - Create a user with sudo, add an SSH key and disable password and root login in
sshd_config. In 24.04 SSH starts via a systemd socket by default: after changing the port, runsystemctl daemon-reloadand restartssh.socket, otherwise the new port won't work. - Enable the firewall: first
ufw allow OpenSSH, thenufw enable. Doing it the other way round is the classic way to lose access to your server. - Make sure automatic security updates are working (the unattended-upgrades package).
- On a machine with 1 GB of memory, create a swap file: cloud images usually come without one.
Ubuntu or Debian
Ubuntu is based on Debian, and the difference is smaller than it seems. Ubuntu offers newer kernels and packages, PPA repositories, snap and a huge number of ready-made guides. Debian is more conservative, slightly lighter on memory and does without snap; it's chosen for small plans and servers that run for years without intervention. More on the Debian VPS page. For Docker and a typical website either system will do: take the one you're more used to.
We take the list of available operating systems from the hosts' websites. If the version you need isn't among the images when ordering, on most KVM plans you can install the system from your own ISO.