Docker hosting: running containers on your own VPS
Published · updated
Docker hosting on your own server means a Linux VPS or dedicated server with Docker Engine installed, where you run your containers with docker compose and look after the host yourself. On our price list a VPS with 2 vCPU, 4 GB of memory and 80 GB of NVMe costs $13.34 a month, enough for a few web containers and a small database.
The Docker facts below come from Docker's documentation as we read it on 24 November 2026. Our prices are from our price list on the same day, per month and without tax.
How big a server Docker needs
Docker itself asks for very little: the Engine is a single daemon, and containers share the host's kernel instead of booting a system of their own. The size of the server is the sum of what your containers use, plus the operating system. A container has no memory limit unless you give it one, so a single container that grows can take memory from all the others.
| VPS size | For | Per month |
|---|---|---|
| 1 vCPU, 2 GB, 40 GB NVMe | One small service, a bot or a VPN | $6.67 |
| 2 vCPU, 4 GB, 80 GB NVMe | A few web containers and a small database | $13.34 |
| 4 vCPU, 8 GB, 160 GB NVMe | An app with its database, a cache and a reverse proxy | $26.68 |
| 8 vCPU, 16 GB, 320 GB NVMe | Several projects, or CI builds in containers | $53.36 |
These sizes are our suggestion: Docker publishes no server sizes. Check what each container really uses with docker stats, and set a memory limit on the ones that can grow.
The vCPUs of our VPS are shared, which means the physical cores serve several virtual machines in turn. For builds that keep every core busy, a dedicated server can cost less: the Ryzen 7 6800H with 8 cores, 16 threads and 32 GB of memory is $79 a month, while a VPS with 16 vCPU and 32 GB costs $106.72. Its drive is smaller, 256 GB of NVMe against 640 GB.
Which Linux to install
Docker's install pages list Ubuntu 26.10, 26.04 LTS, 24.04 LTS and 22.04 LTS, and Debian 13 and 12. Its RHEL page lists RHEL 8, 9 and 10 and does not mention Rocky Linux or AlmaLinux. Of the systems we install, Ubuntu 24.04 LTS and Debian 12 are the two on Docker's list, so choose one of them for a Docker host.
Install from Docker's own apt repository, following its instructions. The packages are docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin and docker-compose-plugin; the last one gives you the docker compose command.
Three defaults to change on day one
A fresh Docker install is made to work straight away, not to run unattended for months. Three of its defaults cause most of the trouble on a small server.
Published ports bypass the firewall
Our servers start with a firewall that has only SSH open. Docker's documentation warns that traffic to a published container port is routed before ufw's rules apply, so a port published with -p 5432:5432 is reachable from the internet whatever ufw says. Publish only the reverse proxy on 80 and 443, and bind everything else to 127.0.0.1, for example -p 127.0.0.1:5432:5432, or leave it unpublished on a Docker network the proxy shares.
Logs grow without limit
The default logging driver is json-file, and by default it does not rotate: its max-size option defaults to unlimited. A container that logs every request slowly fills the drive, and on a VPS with 80 GB a full drive stops every container on it. Docker's documentation recommends the local driver instead, which rotates logs by default.
Put {"log-driver": "local"} in /etc/docker/daemon.json, or keep json-file with "max-size": "10m" and "max-file": "3", then restart Docker. The setting applies only to containers created after the change, so recreate the ones already running.
Containers stay down after a reboot
The default restart policy is no: when the server restarts, your containers stay stopped. Set restart: unless-stopped in your compose file for every service that must always run. Unlike always, it keeps a container you stopped by hand stopped, even after the Docker daemon restarts. A reboot you ask for from our Console brings Docker back, and your containers only if their policy says so.
Backups and the single drive
Each of our servers has one NVMe drive, with no RAID. Your data lives in Docker volumes or bind-mounted folders on that drive: an image can be pulled again, a database volume cannot. Copy the volumes and your compose files to storage outside the server, and dump databases with their own tools, such as pg_dump or mysqldump, instead of copying their files while they run.
Your own server or a managed container host
The first results for "docker hosting" are managed platforms and VPS plans with Docker preinstalled. A managed platform runs your image, scales it and keeps the host patched; you pay for that in the price, and you work within its limits on ports, disks and background jobs. On your own server you install Docker once, run anything a compose file describes, and update the host and the images yourself.
If you want a web interface on top, Coolify and Dokploy run on the same kind of server and deploy from Git. Choose the location nearest your users: we have 14 locations, and the configurator shows an estimated latency from where you are.
Questions
What is Docker hosting?
A server where Docker Engine runs your containers. It can be a managed platform that runs your image for you, or your own VPS or dedicated server with Docker installed, where you deploy with docker compose and look after the host.
How much memory does a Docker server need?
Docker publishes no minimum: the server needs the memory of all your containers plus the system. For a few web containers and a small database, 4 GB is a reasonable start. On our price list a VPS with 2 vCPU, 4 GB and 80 GB of NVMe costs $13.34 a month.
Does ufw protect Docker containers?
Not their published ports. Docker routes traffic to published ports before ufw's rules apply, so those ports are open whatever ufw says. Bind the ports you don't want public to 127.0.0.1 and publish only your reverse proxy.
How do I stop Docker logs from filling the disk?
Use the local logging driver, which rotates logs by default, or set max-size and max-file for json-file in /etc/docker/daemon.json. Then restart Docker and recreate the containers, because the setting applies only to new ones.
Sources, read on 24 November 2026: Docker on Ubuntu, Docker on Debian, Docker on RHEL, JSON file logging driver, Configure logging drivers, Docker and ufw, Restart policies.
Written and checked by the VPS Provider team.