Advertising disclosure: We may earn a commission when you buy through links on this page. It does not change the price you pay or the order of the list.

Guide

VPS for Docker: how to size it and set it up

For a small Docker stack, such as a web app, a database and a reverse proxy, a VPS for Docker with 4 GB of RAM is the comfortable starting point; bigger stacks with several databases need 8 GB or more. Pick any KVM-based Linux VPS, install Docker Engine with the Compose plugin, put a reverse proxy in front, and back up your volumes.

🗓️ Published October 26, 2026

How much RAM a Docker VPS needs

Docker itself adds very little overhead; what counts is the sum of the containers you run. Databases, search engines and anything written in Java or Node with many workers use the most memory. Size the server by the stack, with some headroom for updates and spikes:

  • 1–2 GB: one or two lightweight containers, such as a static site, a small API or a VPN
  • 4 GB: a typical stack of a web app, a database and a reverse proxy, or tools like n8n or a WordPress container stack
  • 8 GB or more: several apps with their own databases, an online shop, monitoring stacks or search engines

Choosing a VPS for Docker

Pick a KVM-based VPS: it runs its own kernel, so Docker works out of the box. Older container-based virtualisation (such as OpenVZ) can block Docker, so avoid plans that don’t say KVM or full virtualisation. Choose a current Ubuntu LTS or Debian image unless you have a reason not to.

Disk speed matters for databases, so NVMe is a plus, and RAM per dollar matters for bigger stacks. According to the providers’ pages, Hostinger uses NVMe and AMD EPYC on all VPS plans, Contabo offers very high RAM and storage for the price, and OVHcloud includes unlimited traffic and anti-DDoS. The table below compares current plans; our server finder suggests a spec for your project.

Current plans and prices

We may earn a commission when you buy through links on this page. It does not change the price you pay or the order of the list.

Best value
OVHcloud
VPS-1
  • 2 vCPU
  • 4 GB RAM
  • 40 GB NVMe
from$4.54/mo
  • Unlimited traffic
  • Anti-DDoS included
See plan →

Price checked September 28, 2026

Contabo
Cloud VPS 4
  • 4 vCPU
  • 8 GB RAM
  • 100 GB SSD
from$6.26/mo
  • Very high RAM/storage per euro
  • Unlimited traffic (fair use)
See plan →

Price checked September 28, 2026

Hostinger
KVM 1
  • 1 vCPU
  • 4 GB RAM
  • 50 GB NVMe
  • 4 TB Traffic
from$6.49/mo
  • NVMe + AMD EPYC on all VPS plans
  • Free weekly backups
See plan →

Price checked September 28, 2026 · Renews at $11.99/mo

Install Docker Engine and Compose

Use Docker’s official repository rather than an old distribution package. The steps on Ubuntu or Debian are: update the system, add Docker’s GPG key and apt repository, then install docker-ce, docker-ce-cli, containerd.io and the docker-compose-plugin. Docker’s documentation has the exact commands for your distribution.

Then check it works with “docker run hello-world”, and define each app in a compose.yaml file so you can start the whole stack with “docker compose up -d”. Keeping the compose files in a git repository makes it easy to rebuild the server later.

A reverse proxy in front of your containers

Don’t publish every app on its own port. Run one reverse proxy that listens on ports 80 and 443, gets HTTPS certificates automatically and forwards each domain or subdomain to the right container over an internal Docker network.

Caddy is the simplest option: a few lines in a Caddyfile per site, with Let’s Encrypt certificates handled for you. Traefik reads labels from your containers and configures routes on its own, which is handy when you add and remove services often. Either way, only the proxy exposes ports to the internet; databases stay on the internal network.

Volumes, backups and security

Containers are disposable; your data is not. Store databases and uploads in named volumes or bind mounts, and back them up off the server on a schedule. For databases, dump them with their own tools (pg_dump, mysqldump) rather than copying live files. A provider snapshot before big upgrades is a useful extra, not a replacement.

  • Never expose the Docker socket (/var/run/docker.sock) to the internet or to containers you don’t fully trust; access to it equals root on the host
  • Don’t open the Docker API over TCP without TLS
  • Remember that published ports can bypass ufw firewall rules; bind internal services to 127.0.0.1 or keep them unpublished
  • Use SSH keys, disable password logins and keep the host and images updated

Compare plans side by side

Sort by
ProviderPlanvCPURAMDiskPriceOffer
OVHcloudVPS-124 GB40 GB$4.54/moSeptember 28, 2026See plan →
ContaboCloud VPS 448 GB100 GB$6.26/moSeptember 28, 2026See plan →
HostingerKVM 114 GB50 GB$6.49/moSeptember 28, 2026See plan →
HostingerGame Panel 114 GB50 GB$6.99/moSeptember 28, 2026See plan →
HostingerGame Panel 1-4 GB-$6.99/moSeptember 28, 2026See plan →
OVHcloudVPS-248 GB75 GB$8.50/moSeptember 28, 2026See plan →
ContaboCloud VPS 6612 GB200 GB$8.53/moSeptember 28, 2026See plan →
HostingerKVM 228 GB100 GB$8.99/moSeptember 28, 2026See plan →
HostingerGame Panel 228 GB100 GB$9.49/moSeptember 28, 2026See plan →
HostingerGame Panel 2-8 GB-$9.49/moSeptember 28, 2026See plan →
InterServerVPS 4 slices28 GB160 GB$12.00/moSeptember 28, 2026See plan →
OVHcloudVPS-3612 GB100 GB$12.32/moSeptember 28, 2026See plan →
HostingerKVM 4416 GB200 GB$12.99/moSeptember 28, 2026See plan →
HostingerGame Panel 4-16 GB-$13.99/moSeptember 28, 2026See plan →
ContaboCloud VPS 8824 GB300 GB$15.93/moSeptember 28, 2026See plan →
OVHcloudVPS-4824 GB200 GB$23.37/moSeptember 28, 2026See plan →
DigitalOceanBasic 4 GB24 GB80 GB$24.00/moSeptember 28, 2026See plan →
InterServerVPS 8 slices416 GB320 GB$24.00/moSeptember 28, 2026See plan →
HostingerKVM 8832 GB400 GB$25.99/moSeptember 28, 2026See plan →
HostingerGame Panel 8-32 GB-$27.99/moSeptember 28, 2026See plan →
ContaboCloud VPS 121248 GB400 GB$28.44/moSeptember 28, 2026See plan →
DigitalOceanBasic 8 GB48 GB160 GB$48.00/moSeptember 28, 2026See plan →
OVHcloudRISE-1632 GB1.024 TB$60.30/moSeptember 28, 2026See plan →
OVHcloudRISE-S864 GB1.024 TB$77.00/moSeptember 28, 2026See plan →
OVHcloudRISE-M1264 GB1.024 TB$118/moSeptember 28, 2026See plan →
ContaboAMD Ryzen 12 Cores1264 GB1.024 TB$170/moSeptember 28, 2026See plan →
InterServerAMD Ryzen 5600X6128 GB4.096 TB$204/moSeptember 28, 2026See plan →
InterServerAMD Ryzen 5900X12128 GB24.576 TB$218/moSeptember 28, 2026See plan →
ContaboAMD Genoa 24 Cores24128 GB2.048 TB$226/moSeptember 28, 2026See plan →
Server finder
Tell us the project, get the spec and the cheapest plans
Try the tool →

Questions people ask

How much RAM do I need for a VPS for Docker?

About 4 GB for a typical stack of a web app, a database and a reverse proxy. Use 1–2 GB for one or two light containers and 8 GB or more for several apps with databases.

Can I run Docker on any VPS?

On any KVM or fully virtualised VPS, yes. Some older container-based VPS types (such as OpenVZ) restrict Docker, so check the virtualisation type first.

Caddy or Traefik for Docker?

Caddy is simpler to configure by hand; Traefik discovers containers automatically through labels. Both handle HTTPS certificates for you.

How do I back up Docker containers?

Back up the data, not the containers: dump databases, copy volumes to off-site storage, and keep your compose files in git so the stack can be recreated.

More guides

Related