24.04 against 22.04: what you will notice
| Topic | Ubuntu 22.04 LTS | Ubuntu 24.04 LTS |
|---|---|---|
| Standard support ends | 2027 | 2029 |
| Default Python | 3.10 | 3.12, without distutils |
pip install outside a venv | Allowed | Refused: use a virtual environment |
| Default PHP | 8.1 | 8.3 |
| Package sources file | /etc/apt/sources.list | /etc/apt/sources.list.d/ubuntu.sources |
| Changing the SSH port | Edit sshd_config, restart ssh | Also restart ssh.socket |
| Headless Chrome, Puppeteer | Works as before | AppArmor may block the sandbox |
Most "it worked on my old server" reports come from three of those rows: Python packages that still import distutils, deployment scripts that call pip as root, and an SSH port that does not change because systemd opens the socket. After editing the port on 24.04 run:
sudo systemctl daemon-reload
sudo systemctl restart ssh.socketKeep the current session open and test the new port in a second window before you log out.
What LTS means for your calendar
An LTS release appears every second April and gets five years of standard security maintenance. Non-LTS versions last nine months and have no place on a server. Canonical's Ubuntu Pro adds five more years and also covers the universe packages; it is free for personal use on up to five machines, so an old 22.04 server does not have to become unsafe the day standard support stops. Check what you have with pro security-status.
If you want a release that is not on the list, ask support before ordering. When you compare Ubuntu with Debian rather than one Ubuntu with another, start from the Linux VPS page.
The first half hour on a new server
Log in as described in connecting with SSH and follow the order below. The commands assume you are root.
1. Bring the system up to date
apt update && apt full-upgrade -y
[ -f /var/run/reboot-required ] && reboot2. Create your own account
adduser deploy
usermod -aG sudo deploy
install -d -m 700 -o deploy -g deploy /home/deploy/.ssh
install -m 600 -o deploy -g deploy ~/.ssh/authorized_keys /home/deploy/.ssh/The last line copies the key you added when ordering; skip it if you log in with a password. Open a second terminal, log in as deploy and try sudo -v before going on.
3. Set the clock and the name
timedatectl set-timezone Asia/Baku
hostnamectl set-hostname web1.example.comLogs in local time save arguments later. If your team works across time zones, keep UTC on purpose.
4. Switch the firewall on
ufw allow OpenSSH
ufw allow 80,443/tcp
ufw enable
ufw status verboseAllow SSH first, always. If you use another port, allow that number instead of the OpenSSH profile. Should you lock yourself out anyway, the browser console in the panel still reaches the server.
5. Let security updates install themselves
apt install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
unattended-upgrade --dry-run --debug | tail -n 20Only the security pocket is applied by default. Kernel fixes still need a reboot, so choose a monthly quiet hour.
6. Add swap on small servers
fallocate -l 2G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstabSwap keeps a 1–2 GB server alive through a short peak. If it is used all day, you need more RAM.
Next come key-only login, fail2ban and the rest of the hardening checklist, and a certificate through nginx and Let's Encrypt.
Netplan without locking yourself out
Ubuntu reads its network settings from YAML files in /etc/netplan/. Your address is already configured, so normally you leave them alone. Two rules if you do need a change, for example extra DNS servers:
- Put it in a new file with a higher number, such as
60-dns.yaml, instead of editing the one that came with the image. - Apply it with
netplan try, which rolls back after 120 seconds unless you confirm.
# /etc/netplan/60-dns.yaml: replace eth0 with the name from "ip link"
network:
version: 2
ethernets:
eth0:
nameservers:
addresses: [1.1.1.1, 9.9.9.9]Then chmod 600 /etc/netplan/60-dns.yaml, netplan try, and resolvectl status to see the result.
Plans that fit an Ubuntu server
- Starter₼19.90/mo
1 vCPU · 2 GB RAM · 30 GB NVMe
Public IP +₼10/mo, With public IP: ₼29.90/mo
- Standard₼39.90/mo
2 vCPU · 4 GB RAM · 60 GB NVMe
Public IP +₼10/mo, With public IP: ₼49.90/mo
- Professional₼73.90/mo
4 vCPU · 8 GB RAM · 100 GB NVMe
Public IP +₼10/mo, With public IP: ₼83.90/mo
| Plan | vCPU | RAM | NVMe | Server, monthly | With public IP |
|---|---|---|---|---|---|
| Starter | 1 | 2 GB | 30 GB | ₼19.90/mo | ₼29.90/mo |
| Standard | 2 | 4 GB | 60 GB | ₼39.90/mo | ₼49.90/mo |
| Professional | 4 | 8 GB | 100 GB | ₼73.90/mo | ₼83.90/mo |
Prices in manat (AZN), billed monthly. The public IP is +₼10 a month and is assigned automatically.
As starting points: Starter for one site or an internal tool, Basic when builds or cron jobs need a second vCPU beside it, Standard for several sites or Docker, Professional when a database shares the machine with the application. Nano works for a single small service once swap is on. The public IP adds ₼10 a month to the server price. The whole list is on the pricing page.
Moving from 22.04 to 24.04
You can upgrade in place with do-release-upgrade, which goes from one LTS to the next. Disable outside repositories first, copy databases and /etc to another machine, and keep the console open in case SSH restarts.
For a server that carries a business, a second machine is calmer: install 24.04 next to the old one, move and test, then switch DNS. You pay for two servers for a few days and have a way back the whole time.
Ubuntu VPS questions
Should I choose Ubuntu 24.04 or 22.04 for a new VPS?
24.04, in nearly every case: it has two more years of standard support. Choose 22.04 when a control panel, driver or commercial program lists only that release.
Does the Ubuntu image come with a desktop?
Plan on a server without one and work over SSH. You can install a light desktop yourself, but count on roughly 1 GB more memory and a larger list of updates.
What is the default user on an Ubuntu VPS?
Use the login from your activation email; the same details are shown in the panel. Create a personal sudo account right after the first login and use that one from then on.
Why does pip say "externally-managed-environment"?
On 24.04 the system Python belongs to apt. Run apt install python3-venv, then python3 -m venv .venv, and install packages inside that environment.
Can I upgrade Ubuntu without reinstalling the server?
Yes, with do-release-upgrade between neighbouring LTS releases. Copy your data out of the server first, because a failed upgrade can leave it unable to boot.