ENGINEERING REFERENCE / CTR / 002

VPS for Docker Sizer

Size a VPS for Docker using application containers, companion services, build cache and peak requests.

Reference specifications

STATIC / DEFAULTS

Docker reference profiles include the selected companion services and off-host backups.

Workload / hardwareMinimumRecommendedNotes / price
Docker and Compose2 vCPU / 4 GB RAM / 60 GB disk4 vCPU / 4 GB RAM / 75 GB diskshared CPU · x86_64
Small stateless stack1 vCPU / 2 GB RAM / 25 GB disk2 vCPU / 2 GB RAM / 30 GB diskshared CPU · x86_64
Build-heavy stack4 vCPU / 8 GB RAM / 150 GB disk6 vCPU / 8 GB RAM / 195 GB diskshared CPU · x86_64
01 / CONTAINER SIZING

Size a VPS for Docker around the stack

A VPS for Docker needs enough capacity for the host operating system, application containers and every service that shares the machine. Begin by counting application containers separately from Postgres, Redis and the reverse proxy. Those companion services have their own switches in the calculator, so counting them twice would inflate the estimate.

Docker host memory and disk allowances for four application containers, Postgres, Redis, proxy and build cache.
A four-container example shows modeled memory and disk allowances, recommended headroom and log rotation.

Reference sizing tiers

Tier Scenario inputs CPU RAM Storage Catalog price Network at price endpoints
Minimum containerCount=4; concurrency=10; buildCacheGb=10; appDataGb=10; includePostgres=true; includeRedis=false; includeReverseProxy=true 2 vCPU · shared x86_64 4 GB 60 GB NVMe/SSD $6.60–$96.00 USD/mo Contabo Cloud VPS 4 (Core VPS) (Unmetered); Vultr High Frequency 16 GB (5 TB)
Recommended containerCount=4; concurrency=10; buildCacheGb=10; appDataGb=10; includePostgres=true; includeRedis=false; includeReverseProxy=true 4 vCPU · shared x86_64 4 GB 75 GB NVMe/SSD $6.60–$96.00 USD/mo Contabo Cloud VPS 4 (Core VPS) (Unmetered); Vultr High Frequency 16 GB (5 TB)
Comfortable containerCount=12; concurrency=60; buildCacheGb=50; appDataGb=40; includePostgres=true; includeRedis=true; includeReverseProxy=true 6 vCPU · shared x86_64 8 GB 195 GB NVMe/SSD $23.37–$23.37 USD/mo OVHcloud VPS-4 (2027) (Unmetered, 3 Gbps port)

Compare shared and dedicated processor options with the VPS CPU benchmark before sizing for sustained builds.

A sleeping sidecar and an image-processing worker have different CPU demands. Enter peak requests in flight, then compare the suggested host with measured usage during idle periods, traffic spikes and deployments.

The minimum is a planning floor. The recommended host adds 25% to calculated CPU and RAM and 30% to storage before rounding to common steps. It does not guarantee that arbitrary containers will fit: Java heaps, video encoding, large database caches and simultaneous builds can exceed the model substantially.

Compute: account for deployment and steady load

For a small API and proxy, shared vCPU can be reasonable when CPU use comes in bursts. If a queue is busy all day, multiple builds run together or request latency varies under sustained demand, dedicated vCPU can provide a more consistent scheduling allocation. It is still necessary to benchmark the specific processor and compare the results over the same sustained workload.

Concurrency is not the number of monthly visitors. It is the number of requests or jobs active at the same time. Load-test the stack with realistic request durations, cache behavior and downstream dependencies. Watch p95 latency and CPU steal time as well as average utilization; a short CPU spike alone does not prove the host is undersized.

Our model increases the baseline for every application container and enabled sidecar, then adds an allowance for concurrency. It selects dedicated CPU when estimated demand crosses the engine threshold or a Postgres stack handles high concurrency. Selecting Shared is a preference: the result still reports dedicated when the modeled workload needs it.

Memory: sum concurrent peaks

To size memory for the host, add the resident memory of the operating system, application runtimes, worker processes, database and cache. Containers share the host kernel but do not share every process or heap. Reserve additional capacity for startup and deployment overlap, when both an old and a replacement service may briefly be present.

Docker memory limits protect neighboring containers but do not create more physical RAM. Set limits with enough room for realistic peaks, monitor out-of-memory events and inspect application caches. A small swap file may soften a transient spike, but sustained swapping can make a database or web service unusably slow.

Postgres and Redis deserve separate measurement when they run on the same host. Their working set depends on data volume and access patterns, not merely whether the process is enabled. For a large dataset, estimate database memory and I/O independently and consider placing the database on a separate host or managed service.

Storage: include build layers and persistent data

A Docker host needs disk space for the OS, image layers, build cache, application data, logs and volumes. The tool adds your build cache and data to its image and service baselines. Large CI builds may need a separate build machine.

Persistent volumes are not backups. With stateful data, schedule off-host backups, encrypt them where appropriate and test restores. Plan for temporary space during database maintenance or a restore. Rotate container logs and monitor free space before a disk-full event interrupts writes; verify that alerts reach the person who can respond.

Capacity is not the same as disk performance. A database can saturate IOPS or experience poor p95 latency even with plenty of free gigabytes. Check the provider's volume type, throughput limits and regional offer. NVMe describes the storage interface; it is not a guarantee of a particular workload result.

Deploy, observe, then adjust

Before choosing a VPS for Docker, verify image architecture and the availability of every native dependency. This comparison uses x86 as its default; ARM images may be suitable when the entire stack supports them. Check whether managed backups, an IPv4 address, bandwidth or additional storage are included in the quoted plan.

After deployment, record CPU usage and steal, container resident memory, disk free space, I/O latency, network transfer and request or job latency. Compare a realistic peak with the calculator's estimate. If the workload is memory-bound, changing only CPU count is unlikely to fix the problem.

Docker Compose, n8n and Chromium OOM checklist

  • Docker normally gives a container 64 MB of /dev/shm; Chromium may crash under that limit. Set shm_size: '1gb' on the browser service, or use Chromium's --disable-dev-shm-usage flag when appropriate and account for its temporary-disk use.
  • Set a measured mem_limit for each service and init: true to reap child processes. Leave host memory for the OS, database and overlapping containers; a limit that is too low can itself trigger an OOM kill.
  • For a properly configured n8n queue deployment, use EXECUTIONS_MODE=queue with Redis, Postgres and appropriately limited workers. Enable EXECUTIONS_DATA_PRUNE=true and set retention for execution history.
  • Close each Playwright browser context after the job, bound concurrent browsers, and measure real peaks with docker stats; inspect dmesg | grep -i oom on the host for OOM kills when permissions allow.

Reference pricing excludes VAT and may vary by region or availability. Follow each provider link to confirm the actual plan. Read the methodology, compare the AI agent sizer for browser automation, or return to the vps specs calculator for other workloads. Our affiliate disclosure explains how qualifying links may fund the site.

For a separate memory budget, use the RAM calculator; estimate off-host backup and application egress with the bandwidth calculator.

FIELD NOTES / FAQ

VPS for Docker: frequently asked questions

How many containers fit on a VPS?

There is no fixed number: each image has a different memory, CPU and storage footprint. Count application containers and model sidecars separately.

Does the Docker estimate include Postgres?

Only when the Postgres switch is enabled. Measure its working set separately for a substantial database.

Is shared CPU enough for Docker?

It can suit bursty services. Sustained builds, a continuously busy queue or latency variation may favor dedicated CPU.

Why enter build-cache storage?

Image layers, build cache, logs and persistent volumes consume disk. Include local cache and data, and rotate logs.

Are Docker volumes a backup?

No. A volume on the same machine shares its failure domain. Keep independent off-host backups and test restores.

Do the plan prices include VAT?

The reference prices exclude taxes and VAT. Confirm region, extras, availability and current billing with the provider.