To install Docker on Debian 13 (trixie) you have two choices: Debian's own docker.io package, which on 3 December 2026 is version 26.1.5+dfsg1-9+deb13u1+b1, or Docker's official apt repository, where docker-ce is 5:29.10.1-1~debian.13~trixie. Debian 13 does not carry docker-ce at all, so apt install docker-ce fails until you add that repository.
We ran both routes in a Debian 13.8 lab on 3 December 2026 and copied the outputs below, including the ufw problem with a tested fix and six errors with their exact text. RS Computers runs KVM servers in Amsterdam, Dublin and Prishtina, and any of our VPS and VDS plans comes with Debian 13 and full root. For what to run once Docker is in place, see our broader guide to running Docker on a VPS.
Quick install (official repository, as root)
- Add the key:
install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && chmod a+r /etc/apt/keyrings/docker.asc- Create
/etc/apt/sources.list.d/docker.sources(six lines, shown below), thenapt update.- Install:
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin- Check:
docker run hello-worldanddocker compose version.
Key facts, checked on 3 December 2026:
- Docker's install page lists "Debian Trixie 13 (stable)" and "Debian Bookworm 12 (oldstable)" as supported, on amd64, armhf, arm64 and ppc64el (docs.docker.com).
- Debian's own package is
docker.io, source version26.1.5+dfsg1-9+deb13u1in trixie (Debian security tracker, packages.debian.org). - Docker's trixie repository offered 52 builds of
docker-cein our lab, from5:28.1.0-1~debian.13~trixieup to5:29.10.1-1~debian.13~trixie. - Docker's own warning about the docker group: it "grants root-level privileges to the user" (post-installation steps).
- Ports you publish from a container are reachable from outside even when ufw is set to deny incoming.
Which Docker version does Debian 13 install?
Ask apt before you install anything. As root, or with sudo in front:
# as root
apt update
apt-cache policy docker.io docker-compose docker-buildx docker-ce
A fresh Debian 13.8 system answered:
docker.io:
Installed: (none)
Candidate: 26.1.5+dfsg1-9+deb13u1+b1
Version table:
26.1.5+dfsg1-9+deb13u1+b1 500
500 http://deb.debian.org/debian trixie/main amd64 Packages
26.1.5+dfsg1-9+deb13u1 500
500 http://deb.debian.org/debian-security trixie-security/main amd64 Packages
docker-compose:
Installed: (none)
Candidate: 2.26.1-4
Version table:
2.26.1-4 500
500 http://deb.debian.org/debian trixie/main amd64 Packages
docker-buildx:
Installed: (none)
Candidate: 0.13.1+ds1-3
Version table:
0.13.1+ds1-3 500
500 http://deb.debian.org/debian trixie/main amd64 Packages
docker-ce:
Installed: (none)
Candidate: (none)
Version table:
In 26.1.5+dfsg1-9+deb13u1+b1, 26.1.5 is the Docker release and +deb13u1 marks an update built for Debian 13. The last block is the important one: docker-ce has no candidate, because Debian does not ship it.
After adding Docker's repository, the picture changes:
| Part | Debian 13 archive | Docker's apt repository |
|---|---|---|
| Engine | docker.io 26.1.5+dfsg1-9+deb13u1+b1 | docker-ce 5:29.10.1-1~debian.13~trixie |
| Command-line client | docker-cli 26.1.5+dfsg1-9+deb13u1+b1 | docker-ce-cli 5:29.10.1-1~debian.13~trixie |
| containerd | containerd 1.7.24~ds1-6+deb13u1 | containerd.io 2.4.2-4~debian.13~trixie |
| runc | runc 1.1.15+ds1-2+deb13u1 | 1.5.3, inside containerd.io |
| Compose | docker-compose 2.26.1-4 | docker-compose-plugin 5.8.1-1~debian.13~trixie |
| buildx | docker-buildx 0.13.1+ds1-3 | docker-buildx-plugin 0.39.1-1~debian.13~trixie |
In 5:29.10.1-1~debian.13~trixie, the 5: is an epoch that only affects how apt sorts versions, 29.10.1 is the Engine release (release notes), and ~debian.13~trixie marks the build for Debian 13.
docker.io or docker-ce: which one to install
Debian's docker.io | Docker's docker-ce | |
|---|---|---|
| Engine on 3 Dec 2026 | 26.1.5 | 29.10.1 |
| Extra repository and key | none | download.docker.com, key in /etc/apt/keyrings |
| Who publishes updates | Debian, through trixie and trixie-security | Docker Inc. |
| Compose and buildx | separate packages, 2.26.1 and 0.13.1 | plugins, 5.8.1 and 0.39.1 |
| Fits | servers where only Debian packages are allowed | most servers, and anything that follows current Docker docs |
Our advice: use Docker's repository unless a policy forbids third-party sources. Three major Engine versions is a wide gap, and the two sets of packages conflict, so pick one route and stay on it.
Option 1: install docker.io from Debian's repository
# as root
apt update
apt install -y docker.io docker-compose docker-buildx
docker --version
docker compose version
In our lab this installed 57 packages and printed:
Docker version 26.1.5+dfsg1, build a72d7cd
Docker Compose version 2.26.1-4
Debian's docker-compose package gives you both spellings, docker compose and docker-compose. docker run hello-world worked straight away.
Option 2: install Docker CE on Debian 13 from Docker's apt repository
These are the commands from Docker's Debian install page, written for a root shell. With a sudo account, put sudo in front of each one, tee included.
Step 1: remove Debian's Docker packages if they are installed
# as root
apt remove $(dpkg --get-selections docker.io docker-compose docker-doc docker-buildx podman-docker containerd runc | cut -f1)
On a fresh server there is nothing to remove. Existing data is kept: an image we pulled under 26.1.5 was still listed after the switch to 29.10.1.
Step 2: add Docker's key and repository
# as root
apt update
apt install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
apt update
tee prints the file it wrote. On an amd64 Debian 13 server it must read exactly:
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: trixie
Components: stable
Architectures: amd64
Signed-By: /etc/apt/keyrings/docker.asc
and apt update should now fetch https://download.docker.com/linux/debian trixie InRelease. The Signed-By line limits the key to this one repository. Its fingerprint in our lab was 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, "Docker Release (CE deb)". We did not need the gnupg package: apt read the .asc file as it is.
Step 3: install the Engine, Compose and buildx
# as root
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Our download was 107 MB and apt reported 436 MB of extra disk space. The end of the output shows the services being switched on:
Created symlink '/etc/systemd/system/multi-user.target.wants/containerd.service' ...
Created symlink '/etc/systemd/system/multi-user.target.wants/docker.service' ...
Created symlink '/etc/systemd/system/sockets.target.wants/docker.socket' ...
Verify the install: hello-world, Compose and buildx
# as root
docker --version
docker compose version
docker buildx version
docker run hello-world
Docker version 29.10.1, build c48360f
Docker Compose version v5.8.1
github.com/docker/buildx v0.39.1 334b63fe2bb0f0e89a8fd067704a0d113f57ec25
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
...
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
"Hello from Docker!" means the client reached the daemon, the daemon pulled an image and a container ran. docker info on our fresh install reported:
Server Version: 29.10.1
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Docker Root Dir: /var/lib/docker
Firewall Backend: iptables
One detail we did not expect: when we installed 29.10.1 over data left by Debian's 26.1.5, the storage driver stayed overlay2; only the clean install used overlayfs. That matches Docker's docs, which say the containerd image store is the default "for Docker Engine 29.0 and later on fresh installations" (containerd image store).
A quick Compose test:
# as root
mkdir -p /opt/web && cd /opt/web
cat > compose.yaml <<'EOF'
services:
web:
image: nginx:stable
ports:
- "8080:80"
restart: unless-stopped
EOF
docker compose up -d
docker compose ps
curl -sI http://127.0.0.1:8080 | head -1
Ours ended with Container web-web-1 Started, a PORTS column of 0.0.0.0:8080->80/tcp, [::]:8080->80/tcp, and HTTP/1.1 200 OK. Keep that PORTS line in mind for the firewall section. For buildx, docker build on a three-line Dockerfile based on debian:13-slim worked without extra setup. If you build PHP images, our guide to the official PHP image tags explains which base to pick.
Start Docker on boot
Both package sets enable the services for you. Check it:
# as root
systemctl is-enabled docker.service docker.socket containerd.service
systemctl is-active docker containerd
We got enabled three times and active twice. If yours says disabled, Docker's post-install page gives the fix: systemctl enable docker.service and systemctl enable containerd.service. After a restart of the lab system, Docker came up by itself and both test containers, which had restart: unless-stopped, showed "Up 13 seconds".
Run Docker without sudo: the docker group and what it means
A normal user cannot talk to the daemon, because the socket belongs to root and the docker group:
srw-rw---- 1 root docker 0 Dec 3 09:53 /run/docker.sock
To let the user deploy run Docker, add it to that group as root, then start a new login session for that user:
# as root
usermod -aG docker deploy
# as deploy, after logging out and back in
id
docker ps
uid=1000(deploy) gid=1000(deploy) groups=1000(deploy),102(docker)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Shells that are already open do not get the new group. Docker's docs tell you to log out and back in, or to run newgrp docker.
Now the security meaning. In our lab, deploy could not read /etc/shadow directly ("Permission denied"), but one docker run with that file mounted read all 23 lines of it as uid 0. Membership of the docker group is root access with no password prompt. Give it only to accounts you would give root, protect them with SSH keys (see our Debian 13 hardening steps), and never add the user a web application runs as. Otherwise keep using sudo docker, or look at Docker's rootless mode, which we did not test here.
Docker, nftables and ufw on Debian 13: why published ports bypass the firewall
On Debian 13 the iptables command is the nftables-backed one. Our lab printed iptables v1.8.11 (nf_tables), and Docker's rules showed up in nft list ruleset under tables marked "managed by iptables-nft, do not touch!". Docker's install page is blunt about hand-written rules: "Firewall rules created with nft are not supported on a system with Docker installed." Docker 29 also has a native nftables backend, but its docs call it "experimental" (Docker with nftables), so we stayed on the default.
Then the classic trap. We enabled ufw with deny incoming and only SSH allowed, and ran the nginx container on 8080 next to a plain Python web server on 9000. From a second machine:
8080 (Docker) -> 200
9000 (plain Python) -> timeout
ufw blocked the normal process and let the container through. Docker explains why: published ports are routed in the nat table, before the INPUT chain where ufw filters (Docker and ufw).
Fix 1: publish on 127.0.0.1 when the port is not meant to be public
Write "127.0.0.1:8081:80" instead of "8081:80". In our test that port answered 200 on the server itself and timed out from outside. The reverse-proxy layout around it is covered in the Docker on a VPS guide.
Fix 2: a default-deny rule in the DOCKER-USER chain, loaded by ufw
Docker keeps the DOCKER-USER chain for your own rules and jumps to it before its own forwarding rules (Docker with iptables). Rules in ufw's after.rules file are loaded at boot and on every reload. First find your public interface with ip route get 1.1.1.1 (the name after dev; ours was eth0). Then, as root:
# as root
cp /etc/ufw/after.rules /root/after.rules.bak
cat >> /etc/ufw/after.rules <<'EOF'
# Docker: drop new connections from the public interface to published ports
*filter
:DOCKER-USER - [0:0]
-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j RETURN
-A DOCKER-USER -i eth0 -p tcp -m conntrack --ctorigdstport 443 --ctdir ORIGINAL -j RETURN
-A DOCKER-USER -i eth0 -m conntrack --ctstate NEW -j DROP
COMMIT
EOF
ufw reload
iptables -S DOCKER-USER
Line by line: replies to connections the containers opened pass, new connections from outside to published port 443 pass, and every other new connection from the public interface to a container is dropped. Add one --ctorigdstport line per port that should be public. The port is the host side of -p, matched through conntrack because the destination has already been rewritten when a packet reaches this chain.
After the reload, port 8080 timed out from outside, still returned 200 on the server itself, and a container could still run apt-get update. Changing 443 to 8080 in the file opened the port again. A second ufw reload did not duplicate the rules, and they survived systemctl restart docker and a full restart of the system.
These rules are IPv4. With ufw active the same port was not reachable over IPv6 in our lab, but we did not test Docker networks with IPv6 enabled.
Upgrade Docker, pin a version, hold it
With the repository in place, Docker upgrades with everything else: apt update && apt upgrade. To upgrade only Docker:
# as root
apt update
apt install --only-upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
When we upgraded 29.9.3 to 29.10.1, the daemon was restarted and both running containers went back to "Up Less than a second". Docker has a live-restore setting for this; we did not test it.
To install one exact version, use the full string, epoch and suffix included:
# as root
apt list --all-versions docker-ce
VERSION_STRING=5:29.9.3-1~debian.13~trixie
apt install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING docker-ce-rootless-extras=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
If a newer version is already installed, add --allow-downgrades; ours then reported Docker version 29.9.3, build 5457199. To stop apt moving it again:
# as root
apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras
apt-mark showhold
Hold all three. We first held only docker-ce and docker-ce-cli, and a simulated apt upgrade kept those two back but still wanted to upgrade docker-ce-rootless-extras on its own. apt-mark unhold releases them.
Uninstall Docker from Debian 13 cleanly
The two rm -rf lines delete every image, container and volume.
# as root
apt purge -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
rm -rf /var/lib/docker
rm -rf /var/lib/containerd
rm /etc/apt/sources.list.d/docker.sources
rm /etc/apt/keyrings/docker.asc
apt update
That is Docker's documented procedure. In our lab it left four things behind:
- The
dockergroup, still withdeployin it. Remove it withgroupdel docker. - The
docker0network interface, plus 18 filter rules and 4 nat rules that mention Docker. They were gone after a restart of the system. /run/docker.sock, which lives on a temporary filesystem.- Two entries in state
rc(removed, config kept) from the earlier Debian packages:docker.ioandcontainerd.dpkg -l | grep -E "docker|containerd"shows them andapt purge docker.io containerdclears them.
If you added the DOCKER-USER block to /etc/ufw/after.rules, restore the backup copy and run ufw reload.
Six errors on Debian 13 and how to fix them
E: Package 'docker-ce' has no installation candidate
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
Docker's repository is not set up, or apt update was not run after adding it. The sibling message is Error: Unable to locate package docker-compose-plugin. Do step 2 above and run apt update. With the Ubuntu URL from another guide you get this instead:
E: The repository 'https://download.docker.com/linux/ubuntu trixie Release' does not have a Release file.
Missing key 7EA0A9C3F273FCD8, which is needed to verify signature
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: https://download.docker.com/linux/debian trixie InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Missing key 7EA0A9C3F273FCD8, which is needed to verify signature.
On Debian 13 the message comes from sqv, which apt calls to check signatures. The file named in Signed-By exists but does not hold Docker's key (we put a different key there to produce it). Download the key again with the curl line from step 2. Two relatives: Failed to parse keyring "/etc/apt/keyrings/docker.asc" with No such file or directory (os error 2) means the key file is missing; with Permission denied (os error 13) it needs the chmod a+r line.
E: Conflicting values set for option Signed-By regarding source
E: Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/debian/ trixie: /etc/apt/keyrings/docker.gpg != /etc/apt/keyrings/docker.asc
E: The list of sources could not be read.
Two files describe the same repository with different key paths, for example a docker.list from an earlier attempt next to the new docker.sources. apt stops completely. Delete the extra docker.list in /etc/apt/sources.list.d/ and run apt update. If both files point at the same key you get warnings instead: Target Packages (stable/binary-amd64/Packages) is configured multiple times. Same fix.
trying to overwrite '/usr/libexec/docker/cli-plugins/docker-compose', which is also in package docker-compose
dpkg: error processing archive /tmp/apt-dpkg-install-jOl7TS/6-docker-compose-plugin_5.8.1-1~debian.13~trixie_amd64.deb (--unpack):
trying to overwrite '/usr/libexec/docker/cli-plugins/docker-compose', which is also in package docker-compose (2.26.1-4)
...
E: Sub-process /usr/bin/dpkg returned an error code (1)
We hit this by installing docker-ce on top of Debian's packages without step 1. apt removed docker.io, docker-cli, containerd and runc by itself, but left Debian's docker-compose and docker-buildx, whose files sit at the same paths as Docker's plugins. The same error appeared for docker-buildx. Run the apt remove line from step 1, then repeat the install command; that completed the install in our lab.
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock
Your user is not in the docker group, or was added and has not logged in again. Check with id, run usermod -aG docker USERNAME as root and log in again. Do not make the socket world-writable instead: that gives every local user the root-level access described above.
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
The daemon is not running. Look at systemctl status docker and journalctl -u docker -n 50, then systemctl start docker. One surprise: systemctl stop docker alone prints "Stopping 'docker.service', but its triggering units are still active: docker.socket", and the next docker ps quietly starts the daemon again. We only got this error after systemctl stop docker.socket docker.service. A container that cannot find another one by name is a different problem, covered in our post on Nginx "host not found in upstream" with Docker.
How we tested
Everything above ran on 3 December 2026 in one Debian 13.8 system container with nesting enabled and 2 GiB of RAM, on a host with kernel 6.12.111+deb13-amd64. We installed Debian's packages, switched to Docker's repository, broke the repository setup on purpose to collect the errors, downgraded and upgraded, purged everything and installed once more from clean. Firewall checks came from a second machine on the same network, against ufw 0.36.2.
What we did not test: rootless mode, the experimental nftables firewall backend, live-restore, IPv6-enabled Docker networks, Swarm, and arm64. The lab was a system container, not a KVM virtual machine, so run the verify steps on your own server. If you also want PHP on the same machine without containers, see how to install PHP on Debian 13.
Frequently asked questions
Is Docker in the Debian 13 repositories?
Yes, as docker.io. On 3 December 2026 the package is 26.1.5+dfsg1-9+deb13u1+b1. The docker-ce package is not in Debian; it comes from Docker's repository at download.docker.com.
What is the difference between docker.io and docker-ce on Debian 13?
Both are Docker Engine. docker.io is built and patched by Debian, version 26.1.5 on 3 December 2026. docker-ce is built by Docker Inc. and follows upstream releases, 29.10.1 on the same day. docker-ce conflicts with docker.io, so install one or the other.
Why does docker-compose say "command not found" on Debian 13?
With Docker's official packages, Compose is a plugin and the command is docker compose, with a space. In our lab docker-compose was "command not found" while docker compose version printed v5.8.1. Debian's own docker-compose package does install the hyphenated command.
Which Debian releases does Docker support?
On 3 December 2026, Docker's install page lists Debian 13 (trixie, stable) and Debian 12 (bookworm, oldstable), on amd64, armhf, arm64 and ppc64el.
Do containers restart when Docker is upgraded?
In our test, yes. Upgrading docker-ce from 29.9.3 to 29.10.1 restarted the daemon, and both running containers (which had a restart policy) were restarted with it. Hold the packages with apt-mark hold if you want to choose the moment.
Is it safe to add my user to the docker group?
Only if that user may be root. Docker's documentation says the group "grants root-level privileges to the user", and in our lab a group member read /etc/shadow through a container mount. Use it for your own admin account only.
Sources
- Docker: Install Docker Engine on Debian (supported releases, repository setup, uninstall), checked 3 December 2026.
- Docker: Linux post-installation steps (docker group warning, start on boot), checked 3 December 2026.
- Docker: Packet filtering and firewalls, Docker with iptables and Docker with nftables, checked 3 December 2026.
- Docker: containerd image store, checked 3 December 2026.
- Debian security tracker: docker.io and packages.debian.org: docker.io in trixie, checked 3 December 2026.
- Our own lab outputs from 3 December 2026, quoted above without editing the numbers.
Need a hand?
If you want a clean Debian 13 server to run this on, RS Computers has KVM VPS and VDS plans with NVMe storage in Amsterdam, Dublin and Prishtina, each with a dedicated IPv4 and IPv6 address and full root, ready in under 60 seconds after payment.
- Starting small or testing: compare sizes on the VPS and VDS plans page. The Docker on a VPS guide has a section on which plan fits which stack.
- Busy stacks, CI builds or databases in containers: the VDS plans have dedicated vCPUs, from 4 vCPU and 8 GB RAM.
- Want it built for you: custom offers, custom setups and systems built for you (quoted per job). Write to us on Telegram or at info@rscomputers-ks.com.