New

EmeraldHost 2.0 is here: faster, more intuitive, and made for everyone - the new panel!

Learn more
Guides
Services & ToolsInstall Docker

How to Install Docker on Your Linux VPS

Install Docker on a Linux VPS (Ubuntu/Debian)

1 min read
Oct 15, 2023

Docker allows you to run applications in isolated containers.

Install Docker

  1. Update system
    First, update the package lists:

    sudo apt update
    
  2. Install dependencies
    Install the required packages:

    sudo apt install ca-certificates curl gnupg -y
    
  3. Add GPG key
    Add the official Docker GPG key:

    sudo install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
    
  4. Add repository
    Add the official Docker repository:

    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  5. Install Docker
    Update the package lists and install Docker:

    sudo apt update
    sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
    
  6. Verify installation
    Check if Docker was installed correctly:

    sudo docker run hello-world
    

    If the installation was successful, a confirmation message will be displayed.

Useful commands

Command Description
docker ps Show running containers
docker ps -a Show all containers
docker images Show downloaded images
docker start <container> Start a container
docker stop <container> Stop a container
docker rm <container> Delete a container
docker compose up -d Start Docker Compose
docker compose down Stop Docker Compose
Written byEmeraldHost Team
Last updated on Mar 19, 2026 Edit on GitHub

Did this article help you?

Your feedback helps us improve our guides.

Help shape the guides

€10.00 in credit for every new guide, €5.00 for every improvement.

Contact Support

Create a support ticket and our team will get back to you as soon as possible – personal and professional.

Go to Support
1257 members online

Discord Community

Connect with other players, get quick help from the community, and stay up to date with the latest news.

Join Discord

Join our Discord community 1257 members online right now