A Step-by-Step Guide to Install Docker on Ubuntu Server

Richard 6 Min Read
Install Docker on Ubuntu Server

Welcome to our comprehensive guide on installing Docker on an Ubuntu Server! Docker is a powerful containerization platform that simplifies the process of managing and deploying applications. In this guide, we will walk you through the installation process with clear and concise steps. So let’s dive in and get Docker up and running on your Ubuntu Server hassle-free!


  • An Ubuntu VPS Server instance (compatible with Ubuntu Server 18.04 and above).
  • Sudo privileges on your Ubuntu Server instance.

Step 1: Update and Upgrade Ubuntu Server:

Update the apt package lists and upgrade the installed packages by running the following commands:

sudo apt update
sudo apt upgrade

Step 2: Install Required Dependencies:

Next, install the necessary dependencies to ensure Docker runs smoothly:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Step 3: Add Docker’s Official GPG Key:

Add Docker’s official GPG key to verify the authenticity of the Docker packages:

curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Step 4: Add Docker APT Repository:

Add the Docker APT repository to your system’s sources.list.d directory:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Step 5: Install Docker Engine:

Perform the installation of Docker Engine by running:

sudo apt update
sudo apt install docker-ce docker-ce-cli

Step 6: Manage Docker as a Non-Root User (Optional):

If you prefer running Docker commands without using sudo, add your Ubuntu user to the ‘docker’ group:

sudo usermod -aG docker $USER

Note: Log out and log back in to apply the group membership changes.

Step 7: Verify Docker Installation:

Confirm that Docker has been installed successfully by running a simple test command:

docker run hello-world

If everything working correctly, you can see ‘Hello from Docker!’ message confirming your installation.

Congratulations! You have successfully installed Docker on your Ubuntu Server. Now you can leverage its power to manage and deploy containers with ease.

Additional Tips:

– Remember to regularly update Docker to benefit from the latest features and security enhancements. Use the following commands:

sudo apt update
sudo apt upgrade docker-ce

– Check Docker’s official documentation for detailed information on advanced usage, container management, and configuration options.

Happy containerizing with Docker on your Ubuntu Server!

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

View More Posts
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day