NewExtra server protection with Measured Boot & UKI images.View Measured Boot
BlogDocumentationFAQNo Third-Party CookiesContact Us
  • Pricing
Log inSign up
Cloud VPSVDSMemory-Optimized VDSStorage-Optimized VDSWindows VPSBitcoin VPSDDoS ProtectionPrivate Networking (VPC)Floating IPsAdditional Server SupportMicrosoft LicensesDatacenterNetworkDocumentationFAQNo Third-Party CookiesConfidential ComputingSelf-Hosted VPNBlogAboutBrand GuidelinesAffiliatesContact UsLegal & Compliance

Products

  • Pricing
  • Cloud VPS
  • VDS
  • RAM-Optimized VDS
  • Storage-Optimized VDS
  • Windows VPS
  • Bitcoin VPS
  • DDoS Protection
  • Private Networking (VPC)
  • Floating IPs
  • Microsoft Licenses
  • Additional Server Support

Explore

  • Documentation
  • Developers API Docs
  • FAQ
  • Datacenter
  • Network
  • Looking Glass
  • Confidential Computing
  • Cookie Policy
  • Self-Hosted VPN

Company

  • Blog
  • Contact Us
  • About Us
  • Brand Guidelines
  • Affiliates

Legal & Compliance

  • Terms of Service
  • Privacy Policy
  • Data Processing Agreement
  • Acceptable Use Policy
  • Microsoft Software Terms of Use
  • Refund Policy
  • Report Abuse

Products

  • Cloud VPS
  • VDS
  • RAM-Optimized VDS
  • Storage-Optimized VDS
  • Windows VPS
  • Bitcoin VPS
  • DDoS Protection
  • Private Networking (VPC)
  • Floating IPs
  • Microsoft Licenses
  • Additional Server Support
Pricing

Explore

  • Documentation
  • Developers API Docs
  • FAQ
  • Datacenter
  • Network
  • Looking Glass
  • Confidential Computing
  • Cookie Policy
  • Self-Hosted VPN

Company

  • Blog
  • Contact Us
  • About Us
  • Brand Guidelines
  • Affiliates

Legal & Compliance

  • Terms of Service
  • Privacy Policy
  • Data Processing Agreement
  • Acceptable Use Policy
  • Microsoft Software Terms of Use
  • Refund Policy
  • Report Abuse

© VPS.BG Ltd. 2026 · All rights reserved!

Made with passion in Bulgaria · VAT ID: BG203144520

Contents

  • What do I need to install Docker?
  • How to install Docker on a cloud server
  • How can I test my installation?
  • Extra post-installation tips

Subscribe to Our Newsletter

Join 5000+ subscribers and receive helpful content, deals and more! We promise no spam - 100% great content. Unsubscribe anytime.

Share Article

#Docker
  1. Documentation
  2. /
  3. #Docker
  4. /
  5. How to install Docker on a VPS or VDS server

How to install Docker on a VPS or VDS server

Published: 08 February 2021 • 4 min read

#Tutorial#Docker

Docker is a software platform for building and launching Linux containers. As a technology, containerization allows kernel processes to be isolated, ultimately making the virtual environment think that each container is the only process running on the server.

While Docker sounds very similar to virtual machines in terms of how it works, the 2 are quite different. With Docker, all containers share the  same kernel, while every virtual machine (VPS/VDS) has its own individual kernel with the exception being OpenVZ-based VPS servers, where the virtual machine is a container in itself.

What do I need to install Docker?

Before you can install the software, you are going to need to get a Linux-based server, preferably one running Debian, Ubuntu or CentOS or Windows Server.

If you have a cloud VPS or VDS server that is based on OpenVZ 6, keep in mind that you won’t be able to install Docker. Because of this, we recommend getting a KVM-based cloud server.

How to install Docker on a cloud server

Installing Docker on a cloud server is very easy. First, you need to connect to your server via SSH with a privileged (root) user.

Next, you will need to update the package list for your server. You can do so with the following command:

For Debian/Ubuntu:

apt-get update

For CentOS:

yum update

Once your packages have been updated, you will need to run this command:

curl -sS https://get.docker.com/ | sh

This script will automatically detect your operating system, install all of the required packages and also install Docker.

IMPORTANT: If you don’t have curl installed on your server, you can install it using this command:

apt-get install curl

For CentOS:

yum install curl

If you have just installed curl, you will need to run the docker install command again.

How can I test my installation?

Once the installation concludes, you can test whether everything has been installed with the help of a hello-world image.

To perform this test, simply run this command:

docker run hello-world

If everything has been successfully installed and is working properly, you should see this output:

Unable to find image 'hello-world:latest' locally

latest: Pulling from library/hello-world

0e03bdcc26d7: Pull complete

Digest: sha256:31b9c7d48790f0d8c50ab433d9c3b7e17666d6993084c002c2ff1ca09b96391d

Status: Downloaded newer image for hello-world:latest



Hello from Docker!

This message shows that your installation appears to be working correctly.



To generate this message, Docker took the following steps:

 1. The Docker client contacted the Docker daemon.

 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.

    (amd64)

 3. The Docker daemon created a new container from that image which runs the

    executable that produces the output you are currently reading.

 4. The Docker daemon streamed that output to the Docker client, which sent it

    to your terminal.



To try something more ambitious, you can run an Ubuntu container with:

 $ docker run -it ubuntu bash



Share images, automate workflows, and more with a free Docker ID:

 https://hub.docker.com/



For more examples and ideas, visit:

 https://docs.docker.com/get-started/

Extra post-installation tips

Here are some additional post-installation suggestions for Docker that you can benefit from.

Non-root access to Docker

Currently, you should be logged into the server via a root user, which will allow you to manage Docker. If you wish to use Docker with a non-root user, you’d need to use sudo every time you want to use the application.

Instead, we can give non-root access to the docker management commands by typing these commands into the console:

groupadd docker
usermod -aG docker YOUR_USER

This will automatically set up access and you will not have to use sudo every time you want to make changes. 

Configure Docker to start with the OS

Making sure that Docker starts along with the operating system will make sure that the software and all Docker containers will start automatically, which can be very useful if you are going to be rebooting your OS.

You can do that by running this command:

systemctl enable docker

If you need assistance installing Docker on your VPSBG server, please do not hesitate to contact us.

Additionally, you can also get a cloud server with Docker already installed with the help of our application templates! Save time and boost your productivity!

Subscribe to Our Newsletter

Join 5000+ subscribers and receive helpful content, deals and more! We promise no spam - 100% great content. Unsubscribe anytime.

Share Article

Related Content

15 January 2023

How to set up Laravel Forge on your VPS server

Learn how to install Laravel Forge on your VPS or VDS and start managing your Linux server. Deploy PHP applications and databases with ease.

#Tutorial#Laravel
01 October 2025

How to Run a Discord Bot on a VPS

Learn how to create a Discord bot application and how to self-host your own Discord bot on a cloud VPS server with our detailed tutorial.

#Tutorial#Docker
01 April 2025

How to perform AMD SEV-SNP attestation inside a guest virtual machine

In this tutorial, we are going to show you how to perform AMD SEV-SNP attestation inside a guest virtual machine to verify trust and security.

#Tutorial#SEV
19 July 2023

How to install Windows on a cloud server

In this tutorial, we are going to show you how to install Windows OS on your cloud server from an ISO file with Windows Server 2022 & VirtuIO drivers.

#Tutorial#Windows

Unrivaled Performance & Security

Deploy a powerful and reliable Cloud VPS today to ensure your privacy. SEV-SNP included for maximum protection.

Configure VPSContact Us