TABI CLOUD
VPS

How to install Docker on a VPS and run your first container

5 min read · Updated October 2026 · By Tabi Cloud

Docker packages an app and everything it needs into a container, so it runs the same way everywhere. It is handy on a VPS for running several apps without them clashing. The steps below follow Docker's official convenience script for Ubuntu and Debian. Commands may differ on other distributions, and the official Docker docs are the best reference for the latest method.

Before you start

Install Docker

  1. curl -fsSL https://get.docker.com -o get-docker.sh
  2. sudo sh get-docker.sh
  3. sudo systemctl enable --now docker
  4. sudo docker run hello-world

If you see a welcome message, Docker works. Reading a script before running it is good practice, so open get-docker.sh first if you want to check it.

Run Docker without sudo

  1. sudo usermod -aG docker $USER
  2. Log out and back in
  3. docker ps

Members of the docker group effectively have root power, so only add trusted users.

Everyday commands

Run a real example

  1. docker run -d --name web -p 8080:80 --restart unless-stopped nginx
  2. Visit http://YOUR_SERVER_IP:8080
  3. If a firewall is on, allow the port with sudo ufw allow 8080/tcp

The restart policy brings the container back after a reboot.

Docker Compose

Compose describes several containers in one docker-compose.yml file. Newer Docker installs include it as a plugin, so run docker compose up -d and docker compose down.

Tips

Need help? Our support team is on Discord and email.

Want your own server? Join our Discord and tell us the game. We set it up and send you the details. Need help with an error from this guide? Open a ticket there.

GET STARTED ON DISCORD

More guides

VPSWhat is a VPS and how is it different from shared hosting?VPSHow to choose a VPS plan: vCPU, RAM and diskVPSFirst steps on a new Linux VPS: SSH, updates, user and keys