Guides ยท Sep 27, 2026
How to Install Docker and Docker Compose on a VPS
Install Docker Engine and the Docker Compose plugin on an Ubuntu or Debian VPS from the official repository, run your first container and start a Compose stack.
Docker lets you run apps in isolated containers with a single command. This guide installs the official Docker Engine and Compose plugin on Ubuntu or Debian. Using our Debian 12 + Docker image? Docker is already installed, so skip to step 3.
1. Add Docker's official repository
sudo apt update
sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
. /etc/os-release
sudo curl -fsSL https://download.docker.com/linux/$ID/gpg -o /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/$ID $VERSION_CODENAME stable" | sudo tee /etc/apt/sources.list.d/docker.list
2. Install Docker Engine and Compose
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER # log out and back in afterwards
3. Run your first container
docker run --rm hello-world
4. Start a Compose stack
Create compose.yaml:
services:
web:
image: nginx:alpine
ports:
- "80:80"
restart: unless-stopped
docker compose up -d
docker compose ps
Visit your server's IP in a browser and you'll see the nginx welcome page.
A note on firewalls
Docker writes its own firewall rules, so ports you publish with ports: are reachable even if UFW doesn't list them. To keep a service private, bind it to localhost instead: "127.0.0.1:8080:80".
Which plan for Docker?
A few small containers run comfortably on the 4 GB Ripple plan. Databases, or stacks with many services, are happier on Wave (8 GB) or Swell (12 GB).
Need a server for this?
Every TidalVPS VPS comes with full root access, unmetered traffic, daily backups and DDoS protection.