Debian on a VPS: which release to install and how to keep a server running for years
Debian is chosen for servers that need to run for years without attention: a release comes out roughly every two years, packages within it barely change, and security fixes arrive without new program versions. Ubuntu, Astra Linux, Kali and dozens of other systems are built on Debian, so apt instructions fit almost any server software. Almost every host offers a Debian image in its panel, but the version, installation method and set of packages in the image differ, and that's worth checking before you order.
Which release to choose
- Debian 13 "trixie" is the current stable release, out in August 2025. Choose it for a new server: several years of regular support lie ahead, followed by a couple more years of LTS.
- Debian 12 "bookworm" moved from regular support to LTS in 2026, run by a separate team. Security updates still come, but there's no longer any reason to pick it for a new project.
- Debian 11 and older are only for legacy systems that can't be migrated yet. Their free support has ended, and such a server should be upgraded or rebuilt.
The testing and unstable branches are not put on servers: they don't get timely security fixes. If you need a newer version of one program, first look at the backports repository, where newer package versions built for the stable release are placed. Check your OS version with cat /etc/debian_version: hosts' images often lag several point releases behind, and the first apt update && apt full-upgrade downloads a noticeable amount.
What plain Debian doesn't include
Debian installs the minimum, and what Ubuntu includes out of the box you have to add yourself here. The difference is described in detail on the VPS with Ubuntu page; for a server, this is what matters:
- Automatic security updates are not always enabled in cloud images. Install the unattended-upgrades package and check that it takes updates from the security repository.
- Firewall. The system has nftables, but no rules. You can write them in
/etc/nftables.confor install ufw if you prefer. Allow SSH first, then enable filtering. - sudo may not be installed if a root password was set during installation. Add the package and put your user in the sudo group, then disable root login over SSH.
- Swap. Cloud images usually come without a swap partition; on a plan with 1 GB of memory, create a swap file, otherwise the first heavy apt run or build will run out of memory.
A minimal Debian without a GUI takes about a gigabyte of disk and runs comfortably on 512 MB of memory, making it one of the leanest options for small plans. For a web server with a database, budget 2 GB or more; for Docker with several containers, 2–4 GB or more and a disk with room for images.
Upgrading to a new release without reinstalling
Debian officially supports in-place upgrades, but only one release at a time: from 11 to 12, then from 12 to 13. The procedure:
- Take a disk snapshot in your host's panel: it's the quickest way to roll back.
- Fully update the current release and reboot if the kernel was updated.
- Read the section on upgrade issues in the new release's release notes.
- Replace the release codename in the repository lists, run
apt update, thenapt upgrade --without-new-pkgsandapt full-upgrade. - Run the upgrade inside screen or tmux: an SSH disconnect midway will leave the system half-upgraded.
Third-party repositories (PHP, databases, Docker) are best disabled during the upgrade and re-enabled with the new release's codename afterwards. If the host puts its own kernel or monitoring agent in the image, check that they have a version for the new Debian.
What to check in a plan
Debian works on any virtualisation, but on containers (OpenVZ, LXC) the kernel is shared and the host chooses its version: newer modules such as WireGuard or non-standard sysctl parameters may not work there. If you need your own kernel stack, your own disk layout or encryption, choose a KVM VPS and install the system from the official netinst image via the VNC console; a list of plans with this option is on the VPS with custom ISO page. And check which Debian release is currently in the image list when ordering: some hosts still offer only old versions.