---
title: "Use Ubuntu LTS or Debian stable on servers · Agent Wranglers"
url: https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/ubuntu-lts-or-debian
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Use Ubuntu LTS or Debian stable on servers

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

For AI agents: [llms.txt](https://agentwranglers.se/llms.txt) is a short guide that sends you to the rules your problem needs, and [rules.json](https://agentwranglers.se/playbook/stack/rules.json) holds every rule of this playbook as JSON.

- Level: Recommended
- Chapter: [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure)
- Rule: Run servers and container base images on a Ubuntu LTS release or Debian stable that is inside its standard security support.
- Cost: Open source. Both are free to run. Ubuntu Pro adds paid extended support.
- How: Ubuntu has shipped a long-term support release every two years since 2006. Ubuntu 26.04 LTS came out in April 2026 with standard security maintenance until May 2031. Debian 13 came out on 9 August 2025 with security support until August 2028 and LTS until June 2030. Ubuntu is the most used Linux in the Stack Overflow Developer Survey 2025, at 27.7% for professional use. Debian follows at 10.4%. Both are free software, and AI tools know `apt` and `systemd` well. Turn on security updates as [Install security updates by themselves](https://agentwranglers.se/playbook/infrastructure/servers/automatic-security-updates) says. Choose something else when your cloud's managed container service needs its own image. Then use the image it names.
- Check: `grep VERSION_ID /etc/os-release` on every server and base image names a release inside its standard support window. No server runs a non-LTS Ubuntu release.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Shell example

```sh
. /etc/os-release && echo "$ID $VERSION_ID"
sudo apt-get update && sudo apt-get install -y unattended-upgrades
```

### Dockerfile example

```dockerfile
FROM ubuntu:26.04
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
```

## Sources

- [Ubuntu release cycle](https://ubuntu.com/about/release-cycle)
- [Debian 13 trixie](https://www.debian.org/releases/trixie/)

## Related rules

- [Install security updates by themselves](https://agentwranglers.se/playbook/infrastructure/servers/automatic-security-updates) in Infrastructure

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/ubuntu-lts-or-debian">Agent Wranglers software choices playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Avoid HashiCorp tools under the Business Source License for new work](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/avoid-busl-hashicorp)
- Next: [Use nginx or Caddy as the web server and reverse proxy](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/nginx-or-caddy)
- [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure)
