Yesterday, 25 April 2024, Ubuntu 24.04 LTS was released, codenamed Noble Numbat. Ubuntu LTS (Long Term Support) releases come every two years, and they are almost the only ones we use on servers: interim releases only get updates for nine months, while LTS releases get them for five years by default. In this article we sum up what the new version brings to Ubuntu Server users and when it’s worth upgrading.
How long is Ubuntu 24.04 LTS supported?
According to the release announcement, Ubuntu Server gets maintenance updates for five years, so until 2029. An Ubuntu Pro subscription extends this to ten years, and according to Canonical’s announcement, the new Legacy Support add-on extends it by another two years, to twelve years in total. Ubuntu Pro, by the way, is free for personal use on up to five machines, and it also extends security fixes to the packages of the universe repository.
What’s new on servers?
Based on the release notes, the most important software versions are:
| Component | Ubuntu 22.04 LTS | Ubuntu 24.04 LTS |
|---|---|---|
| Linux kernel | 5.15 | 6.8 |
| systemd | 249 | 255 |
| Python | 3.10 | 3.12 |
| PHP | 8.1 | 8.3 |
| PostgreSQL | 14 | 16 |
| nginx | 1.18 | 1.24 |
| Apache | 2.4.52 | 2.4.58 |
| OpenJDK (default) | 11 | 21 |
| QEMU / libvirt | 6.2 / 8.0 | 8.2 / 10.0 |
The 6.8 kernel supports newer hardware, and some of the features of the formerly separate low-latency kernel are now available in the standard kernel. For virtualisation hosts, QEMU 8.2 and libvirt 10.0 bring new features, and for developers there are GCC 14, LLVM 18, Go 1.22, Rust 1.75 and .NET 8.
Changes you need to watch out for
Some of the changes also affect existing settings or habits:
- New APT source file. Ubuntu’s own repositories are no longer in the
/etc/apt/sources.listfile, but in/etc/apt/sources.list.d/ubuntu.sources, in the new deb822 format. If you edit repositories through automation (Ansible, cloud-init), adjust it accordingly. - needrestart restarts automatically. After a library update, services are restarted by default, including when updates are installed by unattended-upgrades. This is safer, but it can cause surprises with a sensitive service; the behaviour can be configured in
/etc/needrestart/needrestart.conf. - TLS 1.0 and 1.1 disabled. Old clients or devices (for example an older printer or an industrial controller) won’t be able to connect to the server’s TLS services.
- Kea DHCP server. Kea is the supported DHCP server instead of ISC DHCP.
- AppArmor. The use of unprivileged user namespaces is restricted by AppArmor. This can affect some container and sandboxed applications; the restriction can be relaxed with sysctl.
- Python packages. You can’t install directly into the system Python with
pip(“externally-managed-environment” error). This may be new for those coming from 22.04: use a virtual environment (python3 -m venv) or the distribution’s packages. - Frame pointers. Packages are built with frame pointers, so performance analysis tools (perf, bpftrace) give a more accurate picture on production systems too.
The xz affair and Ubuntu 24.04
Preparations for the release were disrupted by the xz backdoor discovered in March. The affected package was only in the development noble-proposed repository and didn’t make it into the final release, but Canonical rebuilt the packages compiled during the affected period as a precaution, so the beta slipped by a week. The final release came out on the planned day.
Two small changes are also related to this: the OpenSSH package no longer depends on libsystemd (this is exactly the route by which the xz backdoor got into sshd on other distributions), and the default priority of the proposed repository has been lowered, so packages from there are not installed automatically.
When and how should you upgrade?
You can safely install new servers on 24.04 right now, if the software running on them supports it.
For existing 22.04 servers, we recommend waiting. Following Canonical’s usual practice, the LTS-to-LTS upgrade is only offered from the first point release; according to the announcement, 24.04.1 is expected on 15 August. By then, the bugs that come up during upgrades will have been collected and fixed. With the do-release-upgrade -d option you could upgrade even now, but we don’t recommend it on a production server.
The pre-upgrade checklist:
- A full backup or snapshot of the machine, and a tested restore plan.
- The list of external repositories (PPAs, vendor repositories): the upgrader disables these, and afterwards you have to re-enable their 24.04 versions one by one.
- Compatibility of the applications with the new versions: PHP 8.1 to 8.3, Python 3.10 to 3.12, PostgreSQL 14 to 16 (the database cluster has to be upgraded separately, for example with the
pg_upgradeclustercommand). - The list of configuration files you have modified, so that you answer the upgrader’s questions deliberately.
- Console access (IPMI, hypervisor console, cloud serial console), in case the machine doesn’t come back on SSH.
When the time comes, the upgrade goes like this:
sudo apt update && sudo apt full-upgrade
sudo reboot
sudo do-release-upgrade
When run over SSH, the upgrader also starts a backup SSH server on another port in case the connection drops; if there is a firewall in front of the machine, allow this port temporarily, or run the upgrade in screen or tmux.
And 20.04?
Standard support for Ubuntu 20.04 LTS ends in spring 2025. If you still have such servers, it’s worth planning the switch now: 22.04 can be an intermediate step, but a fresh installation of 24.04 and moving the applications over is often a cleaner solution. We wrote about handling systems at the end of their life cycle in this article.
We help with upgrading Ubuntu servers, installing new servers and ongoing operations; you can read more about this on the Infrastructure and operations page.