bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward

Docker Host Requirements: How Much RAM and CPU Do You Need?

calendar_month September 14, 2026 schedule 15 min read visibility 24 views
person
Valebyte Team
Docker Host Requirements: How Much RAM and CPU Do You Need?
summarize

TL;DR

  • An 8GB RAM VPS (4vCPU, 80GB NVMe) runs 10-20 standard Docker containers, excluding heavy apps.
  • Host requirements depend on combined peak load, not just container count. Estimate app load first.
  • Host RAM = total container limits + 25-40% headroom + 1GB for OS/Docker.
  • Host CPU = peak container CPU sum × 1.25.
  • Disk = data + images + logs + 30% free space.

A VPS with 4 vCPU, 8 GB RAM, and 80 GB NVMe can usually run 10–20 standard Docker containers, provided the stack does not include a heavy database, video transcoding, or ML inference.

What determines Docker host server requirements

Containers are not virtual machines

Docker containers share the Linux kernel, so 15 containers do not mean 15 separate operating systems. Lightweight services such as Nginx, Traefik, Redis with a small cache, a Telegram bot, a static website, or a Prometheus exporter may use only 20–150 MB RAM when idle. However, docker host server requirements depend on the combined peak load of your services, not simply on the number of containers.

A single VPS can run 30 containers if they are small services with memory limits. Conversely, 3 containers can fully consume a server: PostgreSQL using 8 GB, Elasticsearch using 4 GB, and an application encoding video with FFmpeg. When selecting infrastructure, first estimate the server requirements for self-hosted applications under load, then allocate resources between services.

Docker host resource sizing formula

A practical production formula is: host resources = total container limits + 25–40% headroom + OS resources. Reserve at least 1 GB RAM for Linux, Docker Engine, journald, SSH, and the system cache; on a VPS with 2 GB RAM, keep at least 400–600 MB free.

RAM хоста = RAM контейнеров + 1 GB для ОС + 30% запас
CPU хоста = пиковая сумма CPU контейнеров × 1,25
Диск = данные + образы + логи + 30% свободного места
Трафик = входящий + исходящий + резерв под обновления и бэкапы

For example, an application using 512 MB, PostgreSQL using 1 GB, Redis using 256 MB, Nginx using 128 MB, and monitoring using 512 MB need 2.4 GB in configured limits. With the OS and headroom, this becomes 4.5–5 GB, so a VPS with 6 GB RAM is the practical minimum and 8 GB is the safer option.

How much RAM for Docker host: memory sizing guide

Memory matters more than the container count

The question of how much ram for docker host should be answered based on working data sets. PostgreSQL uses RAM for shared_buffers and page cache, Redis stores its cache in memory, while Java applications and Elasticsearch reserve heap space. A container without a memory limit can consume all VPS RAM during a spike and trigger the OOM Killer.

  • 2 GB RAM: 3–6 lightweight containers, a reverse proxy, bot, small website, SQLite, or an external managed DB.
  • 4 GB RAM: 5–10 services, WordPress or a Node.js application, PostgreSQL with up to 1 GB of working data, Redis up to 256 MB.
  • 8 GB RAM: 10–20 containers, several applications, PostgreSQL, Redis, monitoring, and daily backups.
  • 16 GB RAM: 20–35 containers, multiple databases, Grafana, Prometheus, a CI runner, or moderate analytics.
  • 32 GB RAM and above: Elasticsearch, ClickHouse, large PostgreSQL instances, media services, and busy queues.

Swap is not a replacement for RAM. A small 1–2 GB swap file can help absorb a short spike, but sustained swapping increases database latency by tens of times. For PostgreSQL and Redis, scale RAM before the server starts heavily exchanging data with disk.

Memory limits in Compose

Even on a server with 8 GB RAM, containers should have limits. They prevent a single Node.js or PHP-FPM process from pushing out the database and proxy.

services:
  app:
    image: ghcr.io/example/app:latest
    mem_limit: 768m
    cpus: 1.0
    restart: unless-stopped

  postgres:
    image: postgres:16
    mem_limit: 1500m
    cpus: 1.5
    environment:
      POSTGRES_PASSWORD: change-me

Limits should not be too low: a PostgreSQL container limited to 256 MB will run out of memory even under a small workload. After deployment, check actual consumption with docker stats during peak hours.

Looking for a reliable server for your projects?

VPS plans from $10/month and dedicated servers from $9/month with NVMe, DDoS protection, and 24/7 support.

View plans →

Docker server requirements for stacks with 5, 15, and 30 containers

Typical configuration sizing table

Below are general guidelines for a Linux VPS running Ubuntu 22.04/24.04, Docker Engine, and NVMe storage. The calculations include approximately 30% headroom for traffic spikes, image updates, filesystem cache, and short-term log growth.

Typical stack Example services vCPU with headroom RAM with headroom Storage Monthly bandwidth
5 containers Nginx, application, PostgreSQL, Redis, cron 2 vCPU 4 GB 50 GB NVMe 0.5–1 TB
15 containers 2–4 applications, database, Redis, Traefik, worker, monitoring 4 vCPU 8 GB 80–120 GB NVMe 1–3 TB
30 containers Multiple applications, 2 databases, queues, Prometheus, Grafana, exporters 6–8 vCPU 16 GB 160–250 GB NVMe 3–6 TB

This table answers the question how many containers can a VPS run only for standard web stacks. A single Minecraft server container, a game server with an active world, or a video transcoder can require more CPU than 20 API services. Gaming workloads need separate planning: for example, game server requirements and player capacity depend on the engine, world, and tick rate.

How to allocate resources in a typical stack

For 15 containers on 8 GB RAM, a sensible allocation is 1.5 GB for PostgreSQL, 512 MB for Redis, 2–3 GB for applications and worker processes, up to 1 GB for monitoring, and around 2 GB reserved for the OS, Docker cache, and headroom. On 4 vCPU, do not assign every service a 2 CPU limit: total limits can exceed the number of cores, but you must test simultaneous peaks in that case.

To check CPU performance, use sysbench cpu --threads=4 --cpu-max-prime=20000 run. For web applications, stable response time under load matters more than the nominal core count. A processor running at 3.0 GHz per core or higher is usually better for single-threaded PHP, Python, and game-server workloads than a larger number of slower vCPU.

Quick pick
Need a dedicated server?
Bare metal with NVMe in 70+ locations — configure and order in minutes.
Browse servers

Docker host RAM CPU sizing by workload scale

Workload scale → production VPS specs

For a Docker host running 15 containers and serving up to 100 concurrent users, 4 vCPU, 8 GB RAM, and 80 GB NVMe storage are sufficient.

Workload scale vCPU RAM Storage Network port Price
Up to 25 concurrent users 2 vCPU 4 GB 50 GB NVMe 1 Gbps from $6/month, estimated as of March 2025
Up to 100 concurrent users 4 vCPU 8 GB 80 GB NVMe 1 Gbps from $12/month, estimated as of March 2025
Up to 300 concurrent users 6 vCPU 16 GB 160 GB NVMe 1 Gbps from $24/month, estimated as of March 2025
Up to 1,000 concurrent users 8–12 vCPU 32 GB 300 GB NVMe 1 Gbps from $48/month, estimated as of March 2025

Prices are general market estimates rather than a public offer: final cost depends on region, virtualization type, NVMe capacity, included bandwidth, and backup options. For an online store, SaaS, or API, measure RPS, p95 latency, database queries, and queue volume instead of relying only on registered user counts.

Docker server hardware requirements: CPU, NVMe, and networking

When CPU becomes the bottleneck

Docker server hardware requirements for CPU are especially important for PHP-FPM, Node.js worker processes, Java, image compilation, encryption, backup compression, and FFmpeg workloads. If average utilization across 4 vCPU consistently exceeds 65–70%, the host has almost no capacity left for traffic spikes or container updates.

Monitor more than the average CPU %; check load average too. On a VPS with 4 vCPU, a brief load of 4–5 is acceptable, but sustained load of 8–10 indicates a CPU task queue. For CI/CD and image builds, separate the runner from the production host: building React, Go, or Python dependencies can temporarily consume every core.

Why NVMe matters more than a large HDD

A Docker host disk stores images, writable layers, volumes, logs, and backups. PostgreSQL, MySQL, Redis with AOF, and Prometheus benefit from low I/O latency. NVMe generally delivers much more predictable random I/O performance than slow network SSD storage or HDD.

  • Keep at least 25–30% of disk space free: a full volume slows databases and breaks image updates.
  • Limit Docker JSON log size: without rotation, one failing container can consume tens of GB.
  • Store daily backups outside the primary VPS: a local copy does not protect you if the server is deleted.
  • For write-heavy databases, plan a separate volume and monitor IOPS, not just GB.
{
  "log-driver": "local",
  "log-opts": {
    "max-size": "20m",
    "max-file": "5"
  }
}

Save the configuration in /etc/docker/daemon.json, then run systemctl restart docker. Before restarting, make sure services have restart: unless-stopped.

Self hosted Docker server specs for databases and media workloads

Heavy containers change the calculation

Self hosted Docker server specs for a database cannot be selected using the same table as static websites. PostgreSQL with a 5–10 GB working set needs 16 GB RAM on the host when an application, Redis, and monitoring run alongside it. Elasticsearch usually needs dedicated memory headroom: a 2–4 GB JVM heap is not the same as total process memory consumption and page cache.

A Jellyfin, Plex, or FFmpeg container can use 2–8 vCPU for one software 1080p transcode. Hardware transcoding requires GPU compatibility and device passthrough to the container. For these workloads, a standard VPS without a GPU is suitable only for lightweight operations, direct playback, or background processing without strict SLAs.

Separate server or scale up

When one database consistently uses more than 40% of RAM and more than 30% of disk I/O, it is better to move it to a separate VPS or dedicated server. This reduces the risk that an application update, memory leak, or sudden HTTP traffic spike affects transactions.

A dedicated server makes sense with 32–64 GB RAM, sustained load on 8+ cores, large local datasets, and high IOPS requirements. For CPU inference and compute-heavy workloads, compare VPS and bare metal against your real workload profile: choosing bare metal vs VPS for ML inference depends on task duration and parallelism.

Quick pick
Need a dedicated server?
Bare metal with NVMe in 70+ locations — configure and order in minutes.
Browse servers

How to test how many containers a VPS can run

Measure peak load, not idle usage

Testing Docker server requirements starts after deploying a test stack. Run a load test, database import, background jobs, and backups simultaneously or with minimal delay between them. These combinations are the most common cause of RAM and CPU shortages.

# Текущая нагрузка контейнеров
docker stats --no-stream

# Использование диска Docker
docker system df -v

# RAM, swap и load average
free -h
uptime

# Задержки и загрузка диска
iostat -xz 1

Target values for a stable Docker host are 20–30% free RAM or available filesystem cache, swap close to 0, average CPU below 70%, disk usage below 75%, and no p95 application response-time increase when a backup job starts. If docker stats shows one database using 90% RAM, scale memory rather than the container count.

Minimum monitoring stack

For 10+ services, install node_exporter, cAdvisor, Prometheus, and Grafana, or use external monitoring. Track memory working set, container restarts, 5xx errors, free disk space, inodes, and log growth rate. A practical deployment guide covering Compose, SSL, and backups is available in Docker on a VPS: from your first container to production with backups.

Set alerts for 80% RAM usage, 75% disk usage, five container restarts within 10 minutes, and backup errors. These four alerts prevent most incidents in self-hosted stacks.

Frequently Asked Questions

Docker VPS resource answers

How much RAM does a Docker host with PostgreSQL need? For one small application, PostgreSQL, and a reverse proxy, start with 4 GB RAM and 2 vCPU. If the database stores more than 2–3 GB of active data, Redis is running, or you host several applications, 8 GB RAM is the safer choice. Reserve at least 1 GB for the OS and filesystem cache.

How many containers can run on a VPS with 4 GB RAM? A VPS with 4 GB RAM can usually handle 5–10 lightweight containers: a proxy, application, bot, Redis limited to 256 MB, and a small database. This drops to 2–4 if you run Java, Elasticsearch, media processing, or PostgreSQL with a large cache. Memory limits in Compose are essential.

Do I need 4 vCPU for 15 Docker containers? For 15 standard web containers, 4 vCPU is a practical baseline, especially with background jobs and a database. If services are idle most of the time, 2 vCPU may be enough, but response times will degrade during peaks. For image builds, FFmpeg, and CI, allocate 4–8 vCPU separately.

What disk should I choose for Docker and a database? For a Docker host with PostgreSQL or MySQL, choose NVMe from 80 GB and keep 25–30% free space. This disk holds volumes, images, and logs. With a 50 GB database, plan at least 160 GB NVMe to account for indexes, temporary files, and updates.

Conclusion

Practical recommendation

For most self-hosted Docker stacks with 10–20 services, choose a VPS with 4 vCPU, 8 GB RAM, and 80 GB NVMe. If your containers run PostgreSQL, Elasticsearch, Prometheus, or a media service, plan for at least 16 GB RAM and 30% headroom for CPU, disk, and bandwidth.

SSD NVMe
Ready to launch your VPS?

NVMe VPS activated in 60 seconds: full root access, 20+ locations, and card or crypto payments.

Choose a plan
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.