Measured Sandbox Benchmark
| Idle RAM | Startup | Containers | Recommended VPS |
|---|---|---|---|
| 678.3 MB | 100.6s | 5 | 2 GB VPS |
Per-container RAM: n8n 400.2 MB · actual 144.3 MB · uptime-kuma 112.0 MB · caddy 14.5 MB · vaultwarden 7.3 MB (sandbox verified 2026-11-24)
View the interactive benchmark plate and full VPS sizing comparison or compare all measured stacks on VPSFolio Benchmarks.
Architecture and why these pieces fit together
Four small services, one reverse proxy, one Compose file. That is the whole shape. n8n handles workflow automation, Actual Budget tracks money, Uptime Kuma watches endpoints, and Vaultwarden stores credentials. Each one is a separate container on an internal Docker network. Caddy is the only thing that publishes a host port, and it publishes it on loopback only.
The 2 GB tier is the constraint that drives every choice here. In our individual single-app runs (n8n, Actual Budget, Uptime Kuma, and Vaultwarden), the four apps summed to 1000.3 MB; combined in this 5-container sandbox run behind Caddy, total idle RAM measured 678.3 MB (n8n 400.2 MB, actual 144.3 MB, uptime-kuma 112.0 MB, caddy 14.5 MB, vaultwarden 7.3 MB). That leaves roughly 1.3 GB of headroom on a 2 GB VPS for OS buffers and active workflow spikes. If you plan to run heavy n8n jobs, schedule them off-peak or move n8n to Postgres on a larger box later.
Why Caddy instead of nginx or Traefik? Caddy's config is short enough to live inline in compose.yml via the top-level configs: block. No host bind mounts, no separate config file to copy around, no Docker socket exposure. The whole stack is one compose.yml plus a .env. That matters when you are debugging on a VPS at 2 AM.
All four backends stay on the internal network. Caddy terminates HTTP on port 80 inside the container, and the host sees only 127.0.0.1:18080. In production you swap auto_https off for real TLS and publish 80/443. The article covers that diff in the cutover section.
Prerequisites, ports, and VPS sizing
You need Docker Engine 24+ and the Compose v2 plugin. A 2 GB VPS with 2 vCPUs and 40 GB of disk is the target. Swap is not optional at this size — add a 2 GB swapfile so the kernel has somewhere to spill when n8n spikes during a workflow run.
Ports:
-
127.0.0.1:18080— Caddy HTTP, loopback only. This is what the sandbox probes. - No other host ports. n8n, Actual, Uptime Kuma, and Vaultwarden are reachable only through Caddy.
For local testing you will point four hostnames at loopback. Add these to /etc/hosts on your workstation or use curl -H "Host: ..." as shown below:
127.0.0.1 n8n.local budget.local status.local vault.local Disk sizing: n8n's SQLite database grows with execution history, Actual's budget file grows slowly, Uptime Kuma keeps heartbeat history, and Vaultwarden stores attachments if you enable them. 40 GB is fine for a year of light use. Plan a backup rotation before you need it.
Single-file Docker Compose setup
Create the project directory and write both files. The compose.yml below is the exact file the sandbox runs — no host bind mounts, all persistent state in named volumes, all config inline.
mkdir -p ~/automation-hub && cd ~/automation-hub cat <<'EOF' > compose.yml services: caddy: image: caddy:2-alpine restart: unless-stopped ports: - "127.0.0.1:${CADDY_HTTP_PORT:-18080}:80" configs: - source: caddyfile target: /etc/caddy/Caddyfile depends_on: - n8n - actual - uptime-kuma - vaultwarden n8n: image: docker.n8n.io/n8nio/n8n:${N8N_VERSION:-stable} restart: unless-stopped environment: - N8N_HOST=${N8N_HOST:-n8n.local} - N8N_PORT=5678 - N8N_PROTOCOL=http - NODE_ENV=production - N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL:-http://n8n.local/} - N8N_SECURE_COOKIE=${N8N_SECURE_COOKIE:-false} - GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-UTC} - TZ=${GENERIC_TIMEZONE:-UTC} - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true - N8N_RESTRICT_FILE_ACCESS_TO=/files volumes: - n8n_data:/home/node/.n8n - n8n_files:/files actual: image: actualbudget/actual-server:latest restart: unless-stopped environment: TZ: ${TZ:-UTC} volumes: - actual_data:/data healthcheck: test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:5006/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 30s timeout: 5s retries: 5 start_period: 20s uptime-kuma: image: louislam/uptime-kuma:2 restart: unless-stopped volumes: - uptime-kuma:/app/data vaultwarden: image: vaultwarden/server:latest restart: unless-stopped environment: DOMAIN: ${VAULTWARDEN_DOMAIN:-http://vault.local} ADMIN_TOKEN: ${ADMIN_TOKEN} SIGNUPS_ALLOWED: ${SIGNUPS_ALLOWED:-true} TZ: ${TZ:-UTC} LOG_LEVEL: ${LOG_LEVEL:-info} ENABLE_WEBSOCKET: "true" IP_HEADER: X-Real-IP IP_HEADER_TRUSTED_PROXIES: local volumes: - vw_data:/data configs: caddyfile: content: | { auto_https off } http://n8n.local { reverse_proxy n8n:5678 } http://budget.local { reverse_proxy actual:5006 } http://status.local { reverse_proxy uptime-kuma:3001 } http://vault.local { reverse_proxy vaultwarden:80 } volumes: n8n_data: n8n_files: actual_data: uptime-kuma: vw_data: EOF Now the .env. Generate real secrets — do not ship the placeholders.
cat <<'EOF' > .env CADDY_HTTP_PORT=18080 N8N_VERSION=stable N8N_HOST=n8n.local N8N_WEBHOOK_URL=http://n8n.local/ N8N_SECURE_COOKIE=false GENERIC_TIMEZONE=UTC TZ=UTC VAULTWARDEN_DOMAIN=http://vault.local ADMIN_TOKEN=replace-with-openssl-rand-base64-48 SIGNUPS_ALLOWED=true LOG_LEVEL=info EOF Generate the admin token properly:
openssl rand -base64 48 | tr -d '\n' | sed 's/^/ADMIN_TOKEN=/' > /tmp/token && \ sed -i "/^ADMIN_TOKEN=/d" .env && cat /tmp/token >> .env && rm /tmp/token Bring it up:
docker compose up -d docker compose ps All four backends should report running. Caddy should be running and listening on 127.0.0.1:18080.
Local verification before going live
Probe each hostname through Caddy. The Host header is what Caddy matches on, so this works without touching /etc/hosts.
for h in n8n.local budget.local status.local vault.local; do echo "== $h ==" curl -s -o /dev/null -w "%{http_code}\n" -H "Host: $h" http://127.0.0.1:18080/ done You should see 200 for n8n, 200 for Actual, 302 (or 200) for Uptime Kuma, and 200 for Vaultwarden. If any return 502, the backend is not ready yet — check docker compose logs <service>.
Inspect the Caddy config it actually loaded:
docker compose exec caddy cat /etc/caddy/Caddyfile docker compose exec caddy caddy validate --config /etc/caddy/Caddyfile Check the health of Actual specifically, since it has a healthcheck defined:
docker compose ps actual docker compose logs --tail=50 actual If you want to see the full request path, tail Caddy while curling:
docker compose logs -f caddy & curl -i -H "Host: vault.local" http://127.0.0.1:18080/ Production cutover (HTTPS / remote backups)
Three changes turn this into a production stack. Do them in order and verify between each.
1. Real domain names. Point DNS A records for n8n.example.com, budget.example.com, status.example.com, and vault.example.com at your VPS IP. Update .env:
N8N_HOST=n8n.example.com N8N_WEBHOOK_URL=https://n8n.example.com/ N8N_SECURE_COOKIE=true VAULTWARDEN_DOMAIN=https://vault.example.com 2. Caddyfile diff. Remove auto_https off, change http://*.local to bare hostnames, and let Caddy issue certificates automatically. The configs: block becomes:
configs: caddyfile: content: | n8n.example.com { reverse_proxy n8n:5678 } budget.example.com { reverse_proxy actual:5006 } status.example.com { reverse_proxy uptime-kuma:3001 } vault.example.com { reverse_proxy vaultwarden:80 } 3. Publish 80 and 443. Change the Caddy ports: block to:
ports: - "80:80" - "443:443" Caddy needs to write its ACME state somewhere persistent. Add a named volume for /data on the Caddy service:
volumes: - caddy_data:/data - caddy_config:/config And declare them under top-level volumes:. Without this, every restart re-requests certificates and you will hit Let's Encrypt rate limits.
Apply:
docker compose up -d docker compose logs -f caddy Watch for certificate obtained successfully lines. Then re-run the probe loop against https:// with real hostnames.
Remote backups. Vaultwarden's SQLite database and n8n's SQLite database are the two things you cannot afford to lose. Add a cron job on the host that dumps both volumes to object storage:
0 3 * * * docker run --rm -v automation-hub_vw_data:/data -v /backup:/backup alpine tar czf /backup/vw-$(date +\%F).tgz -C /data . && rclone copy /backup/vw-$(date +\%F).tgz remote:backups/ Adjust the volume name to match docker volume ls. Do the same for n8n_data and actual_data. Uptime Kuma's history is nice to have but not critical — back it up weekly instead of nightly.
Day-2 operations, backups, and trade-offs
Upgrades. Pin versions in .env for n8n (N8N_VERSION=1.x.y) and Vaultwarden (vaultwarden/server:1.x.y) once you are stable. stable and latest are fine for the first month, then pin. Upgrade one service at a time:
docker compose pull n8n docker compose up -d n8n docker compose logs --tail=100 n8n n8n migrations run on startup and can take a minute on a large database. Do not restart mid-migration.
Backups. The named volumes are the source of truth. A docker run --rm -v <vol>:/data alpine tar czf - pattern works for all four. Test a restore into a scratch container before you trust the backup. Vaultwarden's db.sqlite3 is the file that matters; the rest is attachments and config.
Failure modes to expect.
- n8n OOM during a heavy workflow. The kernel kills the container,
restart: unless-stoppedbrings it back, and the workflow fails. Add swap and cap workflow concurrency in n8n settings. - Actual's healthcheck flapping after a disk-full event. Watch
df -hon the host. - Vaultwarden returning 502 after a Caddy restart because the backend is still booting. Caddy retries, so this usually self-heals in a few seconds.
- Uptime Kuma's SQLite locking under concurrent writes. It is single-writer; do not run two instances against the same volume.
Trade-offs. SQLite everywhere keeps the stack simple and the RAM footprint low, but it means no horizontal scaling and no live replication. If you outgrow this, move n8n to Postgres first — it is the noisiest writer. Vaultwarden can stay on SQLite for a long time; its write volume is tiny. Actual Budget is fine on SQLite indefinitely for personal use.
Caddy's automatic HTTPS is the reason this stack fits in one file. If you need mTLS, rate limiting, or complex routing rules, Caddy handles those too, but the inline config gets long fast. At that point, split the Caddyfile into its own file and accept the bind mount — but for four services on a 2 GB VPS, inline is the right call.
One more thing: keep SIGNUPS_ALLOWED=true only until you create your Vaultwarden account, then flip it to false in .env and restart. The same applies to n8n's owner account — create it immediately after first boot, before you expose the hostname publicly.
Measured in our sandbox run: total memory 678.3 MB (sum of per-container peaks over a 30s idle window after startup) across 5 containers; largest container 400.2 MB; published port(s) 18080; HTTP probe returned 200, 200, 302, 200. The run took 100.6s with the image already cached; a fresh server also has to download it. Required secret(s) ADMIN_TOKEN were generated for the test run, as the tutorial instructs. Container breakdown: n8n 400.2 MB, actual 144.3 MB, uptime-kuma 112.0 MB, caddy 14.5 MB, vaultwarden 7.3 MB. Verified routes: n8n via Caddy (HTTP 200), Actual Budget via Caddy (HTTP 200), Uptime Kuma via Caddy (HTTP 302), Vaultwarden via Caddy (HTTP 200).
Verification: we ran this docker-compose stack in a disposable Docker environment and recorded the measurements above. They describe that run, not a guarantee for your host.
Originally published with full interactive benchmark metrics and server sizing notes at https://vpsfolio.com/stacks/2gb-vps-automation-hub-caddy-n8n-actual-uptime-kuma-vaultwarden/.
