Skip to content

Docker on a VPS

Container runtime

Category
Dev / Tools
Author
Docker, Inc.
License
Apache-2.0
Version
29.8.2

The script is free · VPS from $2.79 per month · installs in about 60 seconds

Install over SSH

root@vps:~# curl -fsSL https://get.docker.com | sh

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/moby/mobyok
  • Version29.8.2ok

✓ Docker 29.8.2 installed · about 60 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Containers
  • Docker Compose
  • DevOps

Docker runs applications in containers, each with its own dependencies, isolated from the system and from each other. A service is installed with one command from a ready-made image and removed just as easily.

Most self-hosted projects (n8n, Uptime Kuma, Nextcloud, bots) publish official images, so Docker is the first thing to install on a new VPS. With Docker Compose the whole stack is described in one file and moves to another server in minutes.

The official get.docker.com script installs Docker Engine, the CLI, containerd and the Docker Compose plugin from Docker's repository.

  • Isolation of apps and their dependencies
  • Thousands of ready-made images on Docker Hub
  • Docker Compose: the whole stack in one YAML file
  • Volumes keep data separate from the container
  • Auto-restart of services after a crash or reboot

Recommended plan

For Docker: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 60 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Docker

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Check the install

    docker run --rm hello-world

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.

Install command
curl -fsSL https://get.docker.com | sh

After installation

  1. 1.Check the install: docker run --rm hello-world
  2. 2.Check Compose: docker compose version
  3. 3.Run services with --restart unless-stopped so they come back up after a server reboot

Docker FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

Does Docker open ports bypassing UFW?

Yes. Docker writes ports published with -p into iptables itself, and UFW rules don't apply to them. If a service is only needed locally, publish it as -p 127.0.0.1:port:port.

How do I update Docker?

Via the package manager: apt update && apt upgrade. The script added the official Docker repository, so updates come from there.

Where is container data stored?

In /var/lib/docker. Named volumes are in /var/lib/docker/volumes. Check disk usage with docker system df.

Docker installs at checkout — in the bot.