Setup & operation

Can I run Docker on a VPS?

Short answer

On a KVM VPS, yes, without restriction — install Docker Engine from the official repository and everything works, including buildx, Compose and Docker-in-Docker. On OpenVZ or LXC-based virtual servers Docker either fails or requires unsafe host configuration, because it needs cgroups and namespaces that shared-kernel virtualisation does not expose.

Size the instance by summing your container memory limits and adding about 1 GB for the host. A typical web application, background worker and PostgreSQL stack fits comfortably in 8 GB.

Put the Docker data root on NVMe. Image layer extraction and container filesystem writes are IO-bound, and on slow storage every deployment feels slow for reasons that look like CPU but are not.

See also: OpenVZ · NVMe · KVM · LXC