How to Install Docker on CentOS Stream

Running containerized applications requires a reliable container runtime. CentOS Stream 9 is a robust, rolling-release Linux distribution that serves as an excellent foundation for your VPS workloads. However, the official Docker packages are not included in the default system repositories. You need to configure the official upstream source to get the latest stable engine. This guide walks you through the exact process of setting up Docker Engine on your CentOS Stream 9 server. We will cover dependency installation, repository configuration, and service management. Whether you are deploying a simple web app or orchestrating complex microservices, getting the runtime environment right is your first critical step. Let us get your server ready for container deployment.

How to Install Docker on CentOS Stream.

Prerequisites

Before modifying your system packages, ensure your environment meets these basic requirements:

  1. A fresh CentOS Stream 9 server or VPS instance.
  2. Root access or a user account with sudo privileges.
  3. An active SSH connection to your machine.
  4. A stable internet connection to download packages.

How to Install Docker on CentOS Stream 9: Step-by-Step Guide 2026

Follow these instructions sequentially to configure the container runtime on your operating system. Copy and paste the commands directly into your terminal.

1. Clear Out Legacy Container Packages

Older versions were known as docker or docker-engine. If you have any of these legacy packages installed, they will conflict with modern containerd and runc dependencies. We need to uninstall them along with any associated configuration files to ensure a clean slate.

dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc

2. Set Up Essential System Dependencies

The DNF package manager needs specific utilities to handle HTTPS repositories and manage cryptographic keys. We will install dnf-plugins-core to manage repository configurations and curl to securely download the GPG key for the upstream project.

dnf install -y dnf-plugins-core curl

3. Register the Official Community Repository

Since the default AppStream does not contain the Community Edition, we must add the official upstream repository. This command downloads the repository configuration file and places it directly into your DNF configuration directory, allowing the package manager to find the latest stable builds.

dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

4. Deploy the Core Container Runtime

With the repository successfully added and metadata rebuilt, you can now install the core components. This command pulls down the engine, the command-line interface, and the containerd supervisor. We use the -y flag to automatically confirm the installation prompts.

dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

5. Activate the Service for Current and Future Boots

The installation process does not automatically start the background daemon. You must manually start the service and configure it to launch automatically during system boot. This ensures your workloads remain available after a server reboot.

systemctl start docker && sudo systemctl enable docker

6. Test the Environment with a Sample Container

To confirm everything is functioning correctly, we will run the official test image. This command downloads a lightweight container, executes a simple diagnostic script inside an isolated namespace, and prints a success message to your terminal before shutting down.

docker run hello-world

Conclusion

Your CentOS Stream 9 environment is now fully equipped to build and run containerized applications. You have successfully configured the upstream repository and started the background daemon. From here, you can pull images from the registry, write your own Dockerfiles, or deploy multi-container setups using the Compose plugin. If you need reliable infrastructure to host these workloads, check out the high-performance virtual servers available at VPS.one to scale your projects with confidence.

DN

The author

Dmitriy Novitsky

Dmitriy Novitsky, Chief Technology Officer at VPS.one, is a seasoned expert in VPS hosting. With years of experience, he shares valuable insights and technical knowledge to help users optimize their hosting performance and stay ahead in the tech world.

How to Install Docker on AlmaLinux

How to Install Docker on AlmaLinux

How to Install cPanel.

How to Install cPanel on a VPS Server

How to Fix the “Warning: Remote Host Identification Has Changed” SSH Error.

How to Fix the “Warning: Remote Host Identification Has Changed” SSH Error