How to Install Docker on Debian 13 (Trixie): A Step-by-Step Guide
Debian is one of the most well-known and respected names in the Linux world, which doesn’t need much of an introduction. As a general-purpose distribution, it’s built a rock-solid reputation for stability and reliability, making it a go-to choice for millions of people—from regular home users to large enterprises.
With all these strengths, you can’t go wrong choosing it for your containerization needs. And if you’re here, it probably means you’ve already made that choice and are ready to get Docker set up. Well, you’re in the right place.
This guide—tested and proven in our lab—will walk you step-by-step through installing Docker on Debian 13 (Trixie). Follow along, and in just a few minutes, you’ll have everything up and running, ready to launch your containers. So, let’s get started.
Install Docker on Debian 13 (Trixie)
Step 1: Refresh the Package Base
First, refresh the packages on your Debian 13 system to ensure you’re using the latest software versions available in the distro’s repos. If there are pending updates, apply them.
sudo apt update
If you’re unsure about using Debian’s APT package manager, I highly recommend checking out our “Linux APT Command in Examples.” Now, back to the topic.
Step 2: Install Prerequisites
First, run the two commands below to update the package index and install the prerequisites necessary to add and use a new HTTPS repository.
sudo apt install apt-transport-https ca-certificates curl gpg
Step 3: Add Docker’s GPG Repo Key
Before we go any further, I want to clear something up. Docker is available for installation straight from the official Debian repositories. However, one disadvantage of this approach is that the version available is not always the most recent.
That’s why, below, I will approach it a little differently, as I’ll show you how to install Docker on Debian 13 from the official Docker repository. The main advantage is that this way you always get the latest up-to-date version, plus it will automatically receive all future software updates as they become available as part of the regular system updates.
So, let’s now import the Docker GPG repository key. The command below downloads and stores it in a format that the APT package manager can use to verify Docker packages. This security feature ensures that the software you’re installing is authentic.
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
Notice that the command produces no output.
Step 4: Add Docker Repository
With the GPG key imported, it’s time to add the official Docker repository to our Trixie system so you can install and update Docker directly from upstream’s maintained DEB packages.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/
As with the previous command, its execution produces no output. Then refresh your package list so the package manager knows about the new repository.
sudo apt update
Great. As you can see from the command’s output, the newly added Docker repo is now available, so our Debian 13 system can use it to install packages from it. Additionally, you can also use the command below to verify that the Docker repo was properly added.
apt-cache policy
Step 5: Install Docker on Debian 13 (Trixie)
Finally, run the following command to install the latest up-to-date Docker release on Debian 13.
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
This installs the following Docker components:docker-ce:
The Docker engine itself.
docker-ce-cli: A command-line tool that lets you talk to the Docker daemon.
containerd.io: A container runtime that manages container’s lifecycle.
docker-buildx-plugin: This extension for Docker enhances the capabilities of building images, with a focus on multi-platform builds.
docker-compose-plugin: A configuration management plugin that helps manage multi-container Docker applications using a single YAML file.
Confirm with “Y.” Wait for the installation to finish—it should take no more than 30 seconds.
That’s all. Docker should now be installed; the service should be started and enabled to run automatically on boot by default. Let’s verify.
sudo systemctl is-active docker
Step 6: Verify the Docker Installation
We come to the most exciting part. Let’s test if our new Docker installation works correctly by running a simple containerized application called “hello-world.”
sudo docker run hello-world
Well done! As we can see, everything works properly.
Enabling Non-root Users to Run Docker Commands
So far, we have successfully installed Docker on Debian 13. However, as you may have noticed, only root and users with sudo privileges can execute docker commands by default.