black friday 2026 label for the hellobar

Get ready for Black Friday! See offers →

VPS8 min. read

Docker on a VPS: everything you need to get started

Last updated: 25 Oct 2026
VPS dashboard with Docker terminal commands and running containers.

Docker on a VPS means running your applications in containers on a virtual server you control. To set it up, you need a server with a Linux version Docker supports, such as a 64-bit Ubuntu release. You also need root access, or a user with sudo, which lets that user run commands with root's rights. You then install Docker Engine from Docker's own package repository and run a small test container to check that it works.

What is Docker?

Docker packages an application, with everything it needs to run, into a container. A container is an isolated process that carries its own files, so it doesn't depend on what's installed on the server around it. The same container behaves the same way on your laptop and on your VPS.

Containers are also lighter than virtual machines. A virtual machine runs a whole operating system with its own kernel, the core of the system that talks to the hardware. Containers share the kernel of the server they run on, so you can run more applications on the same resources.

Is Docker a VPS?

No. Docker is software, and a VPS is the server you run it on. A VPS, or virtual private server, is a virtual server on shared hardware with its own fixed share of CPU cores, RAM and storage. With our VPS, other customers on the same hardware can't use your share. You also get root access to install the software you need, Docker included. Docker then runs your applications in separate containers on that server. If you're also weighing up a dedicated server, see how a VPS differs from a dedicated server.

Why run Docker on a VPS?

A VPS gives Docker a server that stays online, and our VPS plans come with 99.99% uptime. On that server, Docker keeps your applications apart and easy to move:

  • Each container runs in isolation, so a problem in one has little effect on the server and the other containers.
  • A container runs on a laptop, a virtual machine or a cloud server alike, so your apps stay portable between servers.

Docker has its catches too. It takes time to learn if you haven't worked with containers before, and large applications can outgrow a small VPS, so the resources you choose matter. On a VPS you manage yourself, installing, updating and securing Docker is also your job, because we don't provide support for Docker installations. If you're comfortable on the command line and want control over your setup, those trade-offs are usually worth it.

Choose a VPS for Docker

To install Docker yourself, you need a VPS with root access where you choose the software. Our VPS and our Managed VPS differ in who looks after the server, as our guide to the difference between a VPS and a managed VPS explains in full:

VPS and Managed VPS compared

VPSManaged VPS
Root access and configurationFull, yours to controlWe set it up and maintain it
SoftwareYou install and manage itWe handle it
Updates, patches and maintenanceYour responsibilityWe take care of it
Security and server hardeningYour responsibilityWe take care of it
Best forPeople comfortable managing a serverPeople who'd rather not manage the server themselves
1 / 1

When you compare VPS plans for Docker, check three things:

  • Room to grow. With our VPS, you can upgrade your plan at any time from your control panel, without a server migration.
  • Fast storage. Docker keeps images, containers and volumes on the server's disk. An image is the template a container starts from, and a volume holds the data a container keeps, such as a database. Our VPS plans use NVMe SSD storage, a fast type of solid-state drive, so your containers can read and write that data quickly.
  • A supported operating system. Docker Engine needs one of the Linux versions it supports. On our VPS you choose Ubuntu, Debian, AlmaLinux or CentOS when you set up the server. Choose Ubuntu if you want to follow the steps in this guide.

Our advice: if you'd rather not handle updates and security, Managed VPS takes the server work off your hands. It makes setup easier, but your options to customise the server may be limited. So if Docker is the reason you want a server, choose a VPS you manage yourself. You get root access and full control over the software on it.

System requirements for Docker on a VPS

Docker Engine on Ubuntu needs the 64-bit version of an Ubuntu release Docker supports. Docker's install page lists these releases:

  • Ubuntu Stonking 26.10
  • Ubuntu Resolute 26.04 (LTS)
  • Ubuntu Noble 24.04 (LTS)
  • Ubuntu Jammy 22.04 (LTS)

Docker Engine runs on x86_64 (amd64), armhf, arm64, s390x and ppc64le processors. Ubuntu derivatives such as Linux Mint aren't officially supported, though Docker may still work on them.

For the install itself, you reach the server's command line over SSH, a secure connection, and work as a user that has sudo rights. It's best practice to use your own user account for this rather than logging in as root every day.

How much CPU, RAM and storage you need depends on the applications you run, how many there are and how busy they get. You don't have to guess the final size up front. Start with a plan that fits your apps today, and run docker stats to see how much CPU and memory each container uses. When the server keeps running close to its limits, it's time to upgrade.

Install Docker on your VPS

The install steps depend on the distribution your Linux VPS runs. The steps below install Docker Engine on Ubuntu and follow Docker's Ubuntu install page, so check it for changes before you start. For another distribution, Docker’s official documentation has the steps for each supported platform.

Docker's GPG key, which you add in step 3, lets Ubuntu check that the packages from Docker's apt repository really come from Docker.

Run these steps on a VPS running a supported 64-bit Ubuntu version:

  1. Connect to your VPS over SSH as a user with sudo rights.
  2. Remove any unofficial Docker packages that would conflict with the official ones: sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc docker-buildx podman-docker containerd runc | cut -f1). apt may tell you that none of them are installed, which is fine.
  3. Set up Docker's apt repository. This tells Ubuntu where to download Docker from, and Docker's GPG key lets it check that the packages really come from Docker. Copy the commands under "Set up Docker's apt repository" on Docker's Ubuntu install page and run them in order: they add the key, add the repository to your apt sources and run sudo apt update.
  4. Install the latest Docker packages: sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin.
  5. Check that Docker is running with sudo systemctl status docker. If it is not, start it with sudo systemctl start docker.
  6. Test the installation with sudo docker run hello-world. It downloads a test image, runs it in a container, prints a confirmation message and exits.

The install also adds Docker Compose as a plugin. Compose defines and runs applications made of several containers, such as a web app and its database.

Run Docker without sudo

After the install, only root and users with sudo can run docker commands. If you'd rather not type sudo every time, the docker group gives you that right. The steps below follow Docker's post-installation steps for Linux.

  1. Create the docker group with sudo groupadd docker. Some Linux distributions create it during the install, and then you don't need this step.
  2. Add your user to the group with sudo usermod -aG docker $USER.
  3. Log out and log back in so the new group membership takes effect, or run newgrp docker. A VPS is a virtual machine, so you may need to restart it before the change applies.
  4. Check that it works with docker run hello-world, this time without sudo.

Check your firewall before you publish your first container. You publish a port when you start a container with the -p option. In docker run -p 8080:80 nginx, the option makes the container reachable on port 8080 of your server. If you use ufw or firewalld to manage your firewall, ports you publish from a container bypass your firewall rules, so a rule that blocks the port won't stop the traffic. Publish only the ports you need. A port published on 127.0.0.1 only, such as -p 127.0.0.1:5432:5432 for a database, can be reached from the server itself but not from the internet.

What to do next with Docker on your VPS

With Docker running, you can browse official images on Docker Hub and start your first containers. Docker Hub is Docker's public library of images, so you don't have to package common software such as a web server or a database yourself. Updates and security patches on a VPS you manage are yours to run, and Docker is part of them. To update Docker, run sudo apt update and then the install command from step 4 again. That installs the latest version from Docker's apt repository. If you don't have a server yet, start with a Linux VPS running Ubuntu so you can follow this guide from the first step.

Our VPS plans come with full root access, NVMe SSD storage and 1 Gbit/s networking.

Choose a VPS

Recommended reading

  • n8n workflow automation running on a self-hosted VPS, showing connected app nodes, server infrastructure, and workflow controls.
    VPS20 Oct 2025

    n8n VPS: automate with hosting on your own server

    Work more efficiently with n8n automation on your own VPS. Learn how to use n8n in combination with AI.
  • Illustration of a server stack processing requests and connecting to a website, email, files, and user devices.
    VPS3 Oct 2025

    What is a server? Beginner’s guide to servers and their functions

    Servers ensure that websites, online shops, and other online services run smoothly. Learn more about what a server is and how it works.
  • Illustration of a VPS control panel showing server details, surrounded by cards for website hosting, cloud storage, development and testing, a game server, and a VPN.
    VPS3 Oct 2025

    What to use a VPS for: 12 projects you can start

    Looking to create a sandbox or set up a game server? You might need a Virtual Private Server. Read on to find out what a VPS can be used for.