{"slug": "1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget", "title": "1 GB VPS Privacy Stack: Caddy 2, Vaultwarden, Memos, and Actual Budget", "summary": "A developer published a Docker Compose stack that runs Vaultwarden, Memos and Actual Budget behind a single Caddy 2 reverse proxy on a 1 GB VPS, with the Caddyfile embedded directly in compose.yml via a top-level configs entry so no host paths or Docker socket are mounted. Only Caddy binds a host port (127.0.0.1:18080 in the sandbox profile, 80/443 in production), and all state lives in named volumes. The writeup reports idle memory of roughly 7 MB for Vaultwarden, 18 MB for Memos and 148 MB for Actual, arguing disk I/O and backups, not RAM, are the real constraint.", "body_md": "This tutorial was written with AI assistance from the project's official documentation. Verification status is stated at the end of the article.\n\nThree services, one proxy, one file. Caddy 2 terminates HTTP (and later HTTPS) and routes by `Host` header to three internal containers. Vaultwarden handles passwords, Memos handles notes, Actual Budget handles envelope budgeting. None of them publish ports on the host. Only Caddy binds `127.0.0.1:${CADDY_HTTP_PORT:-18080}:80` in the sandbox profile, which keeps the attack surface to a single ingress.\n\nThe Caddyfile lives inside `compose.yml` as a top-level `configs:` entry with `content: |`. No `./Caddyfile` bind mount, no `/var/run/docker.sock`, no host paths. Persistent state lives in named volumes: `vaultwarden_data`, `memos_data`, `actual_data`, `caddy_data`, `caddy_config`. That means you can copy `compose.yml` and `.env` to any VPS and `docker compose up -d` without shipping a directory tree.\n\nWhy these three fit on 1 GB: Vaultwarden is a Rust binary that idles around 7 MB. Memos is a Go binary idling around 18 MB. Actual Budget is a Node process idling around 148 MB. Caddy adds a few MB. The real constraint is not RAM but disk I/O and backup discipline — Actual writes SQLite frequently, Memos writes SQLite on note changes, Vaultwarden writes SQLite on vault mutations. Plan for snapshots, not for tuning.\n\nEach app was verified individually in its own guide: [Vaultwarden](https://dev.to/vaultwarden-docker-compose-self-hosting/), [Memos](https://dev.to/self-host-memos-docker-compose/), [Actual Budget](https://dev.to/self-host-actual-budget-docker/). This stack reuses those exact image tags, internal ports, and volume paths.\n\n`docker compose version` should print v2.x).`docker` group, or `sudo` for every command.`127.0.0.1:18080` is published in the sandbox profile. In production you publish `80:80` and `443:443` on Caddy.\nSizing notes for 1 GB:\n\n`json-file` driver grows unbounded; set `log-opts` in `/etc/docker/daemon.json` or per-service `logging:` blocks if you plan to keep logs long.\nCreate the stack directory and write both files. The `compose.yml` below is the exact file used for verification.\n\n```\nmkdir -p ~/privacy-stack && cd ~/privacy-stack\ncat <<'EOF' > compose.yml\nservices:\n  caddy:\n    image: caddy:2-alpine\n    container_name: caddy\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:${CADDY_HTTP_PORT:-18080}:80\"\n    environment:\n      VAULT_HOST: ${VAULT_HOST:-vault.local}\n      MEMOS_HOST: ${MEMOS_HOST:-memos.local}\n      BUDGET_HOST: ${BUDGET_HOST:-budget.local}\n    configs:\n      - source: caddyfile\n        target: /etc/caddy/Caddyfile\n    volumes:\n      - caddy_data:/data\n      - caddy_config:/config\n    depends_on:\n      - vaultwarden\n      - memos\n      - actual\n\n  vaultwarden:\n    image: vaultwarden/server:latest\n    container_name: vaultwarden\n    restart: unless-stopped\n    environment:\n      DOMAIN: ${VAULT_DOMAIN:-http://vault.local}\n      ADMIN_TOKEN: ${ADMIN_TOKEN}\n      PUSH_INSTALLATION_KEY: ${PUSH_INSTALLATION_KEY:-}\n      SIGNUPS_ALLOWED: ${SIGNUPS_ALLOWED:-true}\n      TZ: ${TZ:-UTC}\n      LOG_LEVEL: ${LOG_LEVEL:-info}\n      ENABLE_WEBSOCKET: \"true\"\n      IP_HEADER: X-Real-IP\n      IP_HEADER_TRUSTED_PROXIES: local\n    volumes:\n      - vaultwarden_data:/data\n\n  memos:\n    image: neosmemo/memos:${MEMOS_TAG:-stable}\n    container_name: memos\n    restart: unless-stopped\n    environment:\n      TZ: ${TZ:-UTC}\n    volumes:\n      - memos_data:/var/opt/memos\n\n  actual:\n    image: actualbudget/actual-server:latest\n    container_name: actual\n    restart: unless-stopped\n    environment:\n      TZ: ${TZ:-UTC}\n    volumes:\n      - actual_data:/data\n    healthcheck:\n      test: [\"CMD\", \"node\", \"-e\", \"fetch('http://127.0.0.1:5006/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\"]\n      interval: 30s\n      timeout: 5s\n      retries: 5\n      start_period: 20s\n\nconfigs:\n  caddyfile:\n    content: |\n      {\n        auto_https off\n      }\n\n      http://vault.local {\n        reverse_proxy vaultwarden:80\n      }\n\n      http://memos.local {\n        reverse_proxy memos:5230\n      }\n\n      http://budget.local {\n        reverse_proxy actual:5006\n      }\n\nvolumes:\n  caddy_data:\n  caddy_config:\n  vaultwarden_data:\n  memos_data:\n  actual_data:\nEOF\n```\n\nNow write `.env`. Generate real secrets — do not ship the defaults.\n\n```\ncat <<'EOF' > .env\n# Hostnames used by Caddy for Host-header routing\nVAULT_HOST=vault.local\nMEMOS_HOST=memos.local\nBUDGET_HOST=budget.local\n\n# Sandbox HTTP port on the host loopback\nCADDY_HTTP_PORT=18080\n\n# Vaultwarden\nVAULT_DOMAIN=http://vault.local\nADMIN_TOKEN=replace-with-strong-random-token\nPUSH_INSTALLATION_KEY=\nSIGNUPS_ALLOWED=true\nLOG_LEVEL=info\n\n# Memos\nMEMOS_TAG=stable\n\n# Shared\nTZ=UTC\nEOF\n```\n\nGenerate `ADMIN_TOKEN` with `openssl rand -base64 48`. Vaultwarden expects a long random string; the admin panel is disabled if it is empty.\n\nStart the stack:\n\n```\ndocker compose up -d\ndocker compose ps\n```\n\nAll four containers should be `running`. Caddy will be `running` even if a backend is still warming up; Caddy returns 502 until the upstream answers.\n\nProbe each virtual host through Caddy on the loopback port. The `Host` header is what Caddy uses to route, so `curl` must set it explicitly.\n\n```\ncurl -i -H \"Host: vault.local\" http://127.0.0.1:18080/\ncurl -i -H \"Host: memos.local\" http://127.0.0.1:18080/\ncurl -i -H \"Host: budget.local\" http://127.0.0.1:18080/\n```\n\nExpected results:\n\n`200 OK` with the web vault HTML.`302` to `/auth` on first run).\nIf any probe returns `502`, the upstream is not ready or the service name in the Caddyfile is wrong. Check logs:\n\n```\ndocker compose logs --tail=50 caddy\ndocker compose logs --tail=50 vaultwarden\ndocker compose logs --tail=50 memos\ndocker compose logs --tail=50 actual\n```\n\nCommon failure modes:\n\n`dial tcp: lookup vaultwarden: no such host` — Caddy started before the backend container existed. `docker compose restart caddy` fixes it; `depends_on` only orders startup, not readiness.`503` for the first 20–30 seconds while it initializes its SQLite database. The healthcheck has a 20s `start_period` for this reason.`404` if `MEMOS_TAG` resolves to an image that changed its default port. The verified tag is `stable` on port `5230`.\nOnce the three probes pass, open the web vault and create the first Vaultwarden account. Then set `SIGNUPS_ALLOWED=false` in `.env` and `docker compose up -d vaultwarden` to close registration. Do the same for Memos and Actual through their own admin flows.\n\nWhen you are ready to expose the stack to the internet, three changes are required. Do them together; partial cutover leaves you with plain HTTP on a public IP.\n\n**1. Remove `auto_https off` from the Caddyfile.** Caddy will then attempt ACME on its own. The global block becomes empty, so delete it entirely.\n\n**2. Replace `http://*.local` with real domain names.** Caddy needs the real hostname to request the right certificate. Use environment variables so the same file works in both profiles.\n\n**3. Publish `80:80` and `443:443` on Caddy.** Replace the loopback port mapping.\n\nThe diff against the sandbox `compose.yml`:\n\n```\n   caddy:\n     image: caddy:2-alpine\n     container_name: caddy\n     restart: unless-stopped\n     ports:\n-      - \"127.0.0.1:${CADDY_HTTP_PORT:-18080}:80\"\n+      - \"80:80\"\n+      - \"443:443\"\n     environment:\n       VAULT_HOST: ${VAULT_HOST:-vault.local}\n       MEMOS_HOST: ${MEMOS_HOST:-memos.local}\n       BUDGET_HOST: ${BUDGET_HOST:-budget.local}\nconfigs:\n   caddyfile:\n     content: |\n-      {\n-        auto_https off\n-      }\n-\n-      http://{$VAULT_HOST} {\n+      {$VAULT_HOST} {\n         reverse_proxy vaultwarden:80\n       }\n\n-      http://{$MEMOS_HOST} {\n+      {$MEMOS_HOST} {\n         reverse_proxy memos:5230\n       }\n\n-      http://{$BUDGET_HOST} {\n+      {$BUDGET_HOST} {\n         reverse_proxy actual:5006\n       }\n```\n\nUpdate `.env` with real hostnames and the matching Vaultwarden domain:\n\n```\nVAULT_HOST=vault.example.com\nMEMOS_HOST=notes.example.com\nBUDGET_HOST=budget.example.com\nVAULT_DOMAIN=https://vault.example.com\n```\n\nThen `docker compose up -d`. Caddy will request certificates on first request to each hostname. Watch the logs:\n\n```\ndocker compose logs -f caddy\n```\n\nYou should see `certificate obtained successfully` for each domain. If ACME fails, the usual causes are: DNS not yet propagated, port 80 blocked by the provider firewall, or a CAA record that excludes Let's Encrypt.\n\n**Remote backups.** The stack itself does not include a backup sidecar. The cleanest pattern is a host-level cron that runs `docker run --rm` against the named volumes, or a separate Compose project with a `restic` container. Do not add a backup container to this stack — it complicates the single-file guarantee and the backup target (S3, B2, rsync) is environment-specific. A minimal host cron:\n\n```\n# /etc/cron.d/privacy-stack-backup\n0 3 * * * root cd /home/deploy/privacy-stack && docker run --rm \\\n  -v privacy-stack_vaultwarden_data:/data/vaultwarden:ro \\\n  -v privacy-stack_memos_data:/data/memos:ro \\\n  -v privacy-stack_actual_data:/data/actual:ro \\\n  -v /srv/backups:/backup \\\n  alpine sh -c 'tar czf /backup/privacy-$(date +\\%F).tgz -C /data .'\n```\n\nAdjust the volume prefix to match your Compose project name (`docker volume ls` shows it). For off-site copies, pipe the tarball through `restic` or `rclone` instead of writing to `/srv/backups`.\n\n**Upgrades.** Pin image tags in `.env` for reproducibility. `latest` and `stable` are convenient but move under you. For a household stack, pinning to a specific digest and upgrading monthly is safer than tracking `latest`.\n\n```\ndocker compose pull\ndocker compose up -d\ndocker compose ps\n```\n\nVaultwarden and Memos handle in-place upgrades cleanly. Actual Budget occasionally requires a database migration on first start after an upgrade; the healthcheck's `start_period` covers it, but watch the logs for `migration` lines.\n\n**Backups.** The three SQLite databases are the entire state. Back them up nightly, verify the tarball opens, and keep at least one copy off the VPS. A backup you have never restored is not a backup. Test the restore path quarterly: stop the stack, extract the tarball into the named volumes, start the stack, log in.\n\n**Failure modes to expect.**\n\n`docker compose logs caddy | grep -i error` weekly, or use an external uptime check on `https://vault.example.com`.` ADMIN_TOKEN` in `.env`, `docker compose up -d vaultwarden`, and invalidate sessions in the admin panel.\n**Trade-offs.**\n\n`compose.yml` to change the Caddyfile. That is the point: one file to copy, one file to review, one file to back up. If you need dynamic Caddy config, move to a separate Caddy project with its own volume.`vim` a config file on the host. Use `docker compose config` to inspect the rendered file, and `docker compose exec caddy cat /etc/caddy/Caddyfile` to see what Caddy actually loaded.\n**Measured in our sandbox run:** total memory 173.9 MB (sum of per-container peaks over a 30s idle window after startup) across 4 containers; largest container 138.2 MB; published port(s) 18080; HTTP probe returned 200, 200, 200. The run took 99.9s 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: actual 138.2 MB, memos 18.5 MB, caddy 10.2 MB, vaultwarden 7.1 MB. Verified routes: Vaultwarden via Caddy (HTTP 200), Memos via Caddy (HTTP 200), Actual Budget via Caddy (HTTP 200).\n\n*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.*\n\n*Originally published with full interactive benchmark metrics and server sizing notes at [https://vpsfolio.pages.dev/stacks/1gb-vps-privacy-stack-caddy-vaultwarden-memos-actual/](https://vpsfolio.pages.dev/stacks/1gb-vps-privacy-stack-caddy-vaultwarden-memos-actual/).*", "url": "https://wpnews.pro/news/1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget", "canonical_source": "https://dev.to/gongkang/1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget-131n", "published_at": "2026-11-20 03:35:39+00:00", "updated_at": "2026-11-20 03:43:19.201566+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Caddy", "Vaultwarden", "Memos", "Actual Budget", "Docker"], "also_reported_by": [], "takeaway": "Embedding the Caddyfile as a compose.yml configs entry and keeping all state in named volumes lets the whole three-service stack move to any VPS as just compose.yml plus .env, with only Caddy publishing a port.", "recommendation": {"advice": "Keep a single ingress proxy and named volumes for self-hosted services, and set Docker log-opts since the json-file driver grows unbounded on a 1 GB VPS.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget", "markdown": "https://wpnews.pro/news/1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget.md", "text": "https://wpnews.pro/news/1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget.txt", "jsonld": "https://wpnews.pro/news/1-gb-vps-privacy-stack-caddy-2-vaultwarden-memos-and-actual-budget.jsonld"}}