FaroTrend Mascot
FaroTrend

Digital Culture

Install Docker on an Ubuntu VPS: official commands and what the server costs

How to install Docker on an Ubuntu VPS with the official script, what Docker warns about that method, and the monthly cost of a server for containers.

FaroTrend Mascot
By FaroTrend
Published Nov 25, 2026 · Updated Nov 25, 2026, 02:00 PM UTC
3 min read1 views
Monthly cost of a VPS for Docker
ProviderPlanResourcesPriceTermsLink
HostingerKVM 11 vCPU · 4 GB · 50 GB NVMe$6.49/mo24-month term; renews at $11.99Hostinger
HostingerKVM 22 vCPU · 8 GB · 100 GB NVMe$8.79/mo24-month term; renews at $14.99Hostinger
HetznerCX232 vCPU · 4 GB · 40 GB NVMefrom €5.99/moExcl. VAT, hourly; out of stock when checkedhetzner.com
DigitalOceanBasic 2 GB1 vCPU · 2 GB · 50 GB SSD$12/moHourly, no contractdigitalocean.com
DigitalOceanBasic 4 GB2 vCPU · 4 GB · 80 GB SSD$24/moHourly, no contractdigitalocean.com

Short answer

The fastest way to get Docker on an Ubuntu VPS is the official get.docker.com script: two commands and it is installed. It suits tests and personal servers; for production, Docker recommends the repository method.

Quick install

Connect to the server over SSH and run:

Terminal (bash)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo docker run hello-world

The last command pulls a test image and confirms Docker works.

What Docker warns about the script

The official docs are clear about its limits:

  • It needs root or sudo privileges.
  • It detects your distribution and configures the package manager for you.
  • It does not let you customize most parameters.
  • It installs dependencies without asking for confirmation.
  • It always installs the latest stable release.

That is why Docker says it is not recommended for production environments and suggests examining any downloaded script before running it. The same page explains the alternative: add Docker's repository and install with apt.

Which VPS to pick

Docker itself uses little: the containers are what need resources. For two or three light services a 4 GB plan is enough. If you will run a database next to an app, 8 GB gives more room, and there Hostinger KVM 2 is the cheapest per gigabyte if you accept paying 24 months.

After installing

Three things worth doing right after the install finishes:

  • Check whether Docker Compose is there with docker compose version. You will need it to bring up several containers from a single file.
  • By default every command needs sudo in front. Docker's post-install guide explains how to add your user to the docker group, and warns that the group grants root-level privileges.
  • Containers do not come back on their own after a reboot unless you create them with a policy such as --restart unless-stopped.

If you ever want to upgrade Docker, the docs note that re-running the script can cause issues: use the system package manager for that instead.

Sources

Prices read on the official pages on November 10, 2026. They change often: confirm the final price in each provider's checkout.

Sources & References (4)

Share this guide with friends

Share directly via WhatsApp, Telegram, or X with verified technical preview.

Did you find this article interesting?

Your vote helps calibrate recommendations in the community.

Comments (0)

Recommended Reading