Root servers

Installing Docker on a root server: Debian and Ubuntu

Package sources, Docker Engine, Compose and the security points that count after installation. Ready to use in five minutes.

6 min readUpdated 20.10.2026FameSystems editorial team
In short

Docker runs on any KVM root server with Debian or Ubuntu in five minutes: add the Docker package sources, install Docker Engine and Compose, add your user to the "docker" group, done. The KVM root server is important, because in LXC containers Docker only runs with restrictions.

Requirements

  • A KVM root server with Debian 12 or Ubuntu 22.04 or 24.04. Container vServers (LXC) are not suitable for Docker.
  • At least 2 GB of memory, for several containers 4 GB or more.
  • A user with sudo rights and SSH access.
  • An up-to-date system: run "apt update" and "apt upgrade" first.

Installation in five steps

  • Install dependencies: apt install ca-certificates curl gnupg
  • Load the Docker GPG key to /etc/apt/keyrings/docker.gpg and add the Docker package source for your distribution to /etc/apt/sources.list.d/docker.list.
  • Update package lists and install: apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
  • Add your user to the group: usermod -aG docker youruser, then log in again.
  • Test: docker run hello-world
Use the package source from Docker itself, not the "docker.io" package from the distribution. It is usually considerably older.

Docker Compose: several containers as one project

With Compose you describe an application including database, cache and reverse proxy in one file "compose.yaml" and start everything with "docker compose up -d". Create a separate directory per project, then volumes, networks and updates stay cleanly separated.

Security: ports, updates, root

  • Only publish ports that must be reachable from outside. "127.0.0.1:8080:80" instead of "8080:80" keeps services local.
  • Docker writes its own firewall rules. After installation, check whether your ufw rules still apply.
  • Keep images up to date: "docker compose pull" and "docker compose up -d" at regular intervals.
  • Include volumes in your backup, containers themselves are replaceable.

Which server for Docker?

For a few services a KVM root server with 4 GB RAM is enough. Databases, build pipelines or many parallel containers benefit from more cores, the EPYC line fits here. If you run an entire stack for a team and want to virtualise yourself, take a dedicated server with Proxmox and Docker VMs inside.

Matching product

KVM root server for Docker

Own kernel, dedicated cores and RAM, NVMe storage. Debian or Ubuntu installed in minutes, Docker in five more.

Published 20.10.2026Updated 20.10.2026

Frequently asked questions

Short answers to the points that usually remain open after the article.

On LXC vServers only with restrictions and not recommended. Use a KVM root server for Docker.

As soon as an application consists of more than one container, yes. Compose is installed as a plugin directly with Docker.

Docker itself hardly any. The demand comes from the containers: add up the RAM of every application and leave 1 to 2 GB free for the system.

Docker adds its own iptables rules ahead of ufw's. So publish ports specifically on 127.0.0.1 or use a reverse proxy as the only open service.