How to Install Docker on Ubuntu 26.04

Updated on 23 April, 2026
Install Docker container platform on an Ubuntu 26.04 Vultr server to build, manage, and run containerized applications for modern deployment workflows.
How to Install Docker on Ubuntu 26.04 header image

Docker is an open-source container platform that packages applications with their dependencies into portable, isolated units called containers. Containers share the host operating system kernel, making them lightweight and fast to start compared to traditional virtual machines. Docker is widely used for application deployment, microservices architectures, and CI/CD pipelines.

This article explains how to install Docker on an Ubuntu 26.04 server, manage the Docker service, and run a containerized application.

Prerequisites

Before you begin, you need to:

Install Docker

The official Docker repository provides the latest Docker Engine packages. The following steps add the Docker GPG key and repository to APT, then install the Docker Engine with its companion plugins.

  1. Install the required dependency packages.

    console
    $ sudo apt install apt-transport-https ca-certificates curl -y
    
  2. Add the Docker GPG key to the server's keyring.

    console
    $ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    
  3. Add the Docker repository to the APT sources.

    console
    $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  4. Update the APT package index to include the new repository.

    console
    $ sudo apt update
    
  5. Install Docker Engine and its plugins.

    console
    $ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
    

    The command installs the following packages:

    • docker-ce: The Docker Engine community edition.
    • docker-ce-cli: The Docker command-line interface.
    • containerd.io: The container runtime that manages container lifecycles.
    • docker-buildx-plugin: Extends Docker's build capabilities for multi-platform images.
    • docker-compose-plugin: Enables multi-container application management using YAML configuration files.
  6. Confirm the installed Docker version.

    console
    $ docker --version
    

    Your output should be similar to the one below:

    Docker version 29.3.1, build c2be9cc

Manage the Docker System Service

The docker systemd service controls the Docker Engine process. The following steps enable automatic startup and demonstrate the core service management commands.

  1. Enable Docker to start automatically at boot time.

    console
    $ sudo systemctl enable docker
    
  2. Verify that Docker is active and running.

    console
    $ sudo systemctl status docker
    

    The output should display active (running), confirming that the Docker Engine is operational.

  3. Stop the Docker service.

    console
    $ sudo systemctl stop docker
    
  4. Restart the Docker service.

    console
    $ sudo systemctl restart docker
    

Add User to the Docker Group

By default, Docker commands require sudo privileges. Adding your user to the docker group allows running Docker commands without sudo.

  1. Add the current user to the docker group.

    console
    $ sudo usermod -aG docker $USER
    
  2. Apply the group membership changes by logging out and back in, or run the following command.

    console
    $ newgrp docker
    
  3. Verify that Docker commands work without sudo.

    console
    $ docker ps
    

    The command returns an empty container list without a permission error, confirming that the group membership is active.

Run a Containerized Application

Docker pulls container images from registries such as Docker Hub and runs them as isolated containers. The following steps pull an Nginx image, run it as a container, and verify access to the application.

  1. Pull the latest Nginx image from Docker Hub.

    console
    $ docker pull nginx:latest
    
  2. List all Docker images on the server.

    console
    $ docker images
    

    Verify that the nginx image with the latest tag is listed in the output.

  3. Run a container using the Nginx image and map host port 80 to container port 80.

    console
    $ docker run --name example-nginx -d -p 80:80 nginx:latest
    

    Within the command:

    • --name example-nginx: Assigns the name example-nginx to the container.
    • -d: Runs the container in detached mode as a background process.
    • -p 80:80: Maps the host port 80 to the container port 80.
  4. List all running containers.

    console
    $ docker ps
    

    Verify that the example-nginx container is listed with a status of Up.

  5. Allow HTTP traffic on port 80 through the firewall.

    console
    $ sudo ufw allow 80/tcp
    
  6. Access the server's public IP address in a web browser. The default Nginx welcome page confirms that Docker is serving the container.

    http://SERVER-IP

Conclusion

You have installed Docker on an Ubuntu 26.04 server, configured the service for automatic startup, and deployed a containerized Nginx application. Docker supports building custom images, multi-container deployments with Docker Compose, and integration with container registries for image distribution. For more information, refer to the official Docker documentation.

Comments