Stacks & Infra · Multi-App Stack · 2026-11-20
1 GB VPS Privacy Stack: Caddy 2, Vaultwarden, Memos, and Actual Budget
Co-host Vaultwarden, Memos, and Actual Budget behind one Caddy 2 proxy on a 1 GB VPS with single-file Compose inline configs and zero host mounts.
- Whole-stack RAM
- 173.9MB
- Containers
- 4
- Startup
- 99.9s
- Target VPS
- 1 GB VPS
138.2 MB · memos 18.5 MB · caddy 10.2 MB · vaultwarden 7.1 MB - Vaultwarden via Caddy
Host: vault.localHTTP 200 - Memos via Caddy
Host: memos.localHTTP 200 - Actual Budget via Caddy
Host: budget.localHTTP 200
Architecture and why these pieces fit together
Three 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.
The 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.
Why 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.
Each app was verified individually in its own guide: Vaultwarden, Memos, Actual Budget. This stack reuses those exact image tags, internal ports, and volume paths.
Prerequisites, ports, and VPS sizing
- A 1 GB RAM VPS (Debian 12 or Ubuntu 24.04 recommended), 10–20 GB disk.
- Docker Engine 24+ and the Compose v2 plugin (
docker compose versionshould print v2.x). - A non-root user in the
dockergroup, orsudofor every command. - Ports: only
127.0.0.1:18080is published in the sandbox profile. In production you publish80:80and443:443on Caddy. - DNS: three A/AAAA records pointing at the VPS — one each for the vault, notes, and budget hostnames.
Sizing notes for 1 GB:
- Add 1–2 GB of swap. Actual Budget’s Node process can spike during first-run migrations. Swap prevents the OOM killer from taking out Caddy.
- Keep the Docker daemon’s log driver bounded. The default
json-filedriver grows unbounded; setlog-optsin/etc/docker/daemon.jsonor per-servicelogging:blocks if you plan to keep logs long. - Disk: SQLite files are small, but Vaultwarden attachments and Actual’s monthly budget history add up. 20 GB is comfortable for a single household.
Single-file Docker Compose setup
Create the stack directory and write both files. The compose.yml below is the exact file used for verification.
mkdir -p ~/privacy-stack && cd ~/privacy-stack
cat <<'EOF' > compose.yml
services:
caddy:
image: caddy:2-alpine
container_name: caddy
restart: unless-stopped
ports:
- "127.0.0.1:${CADDY_HTTP_PORT:-18080}:80"
environment:
VAULT_HOST: ${VAULT_HOST:-vault.local}
MEMOS_HOST: ${MEMOS_HOST:-memos.local}
BUDGET_HOST: ${BUDGET_HOST:-budget.local}
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile
volumes:
- caddy_data:/data
- caddy_config:/config
depends_on:
- vaultwarden
- memos
- actual
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
environment:
DOMAIN: ${VAULT_DOMAIN:-http://vault.local}
ADMIN_TOKEN: ${ADMIN_TOKEN}
PUSH_INSTALLATION_KEY: ${PUSH_INSTALLATION_KEY:-}
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:
- vaultwarden_data:/data
memos:
image: neosmemo/memos:${MEMOS_TAG:-stable}
container_name: memos
restart: unless-stopped
environment:
TZ: ${TZ:-UTC}
volumes:
- memos_data:/var/opt/memos
actual:
image: actualbudget/actual-server:latest
container_name: actual
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
configs:
caddyfile:
content: |
{
auto_https off
}
http://vault.local {
reverse_proxy vaultwarden:80
}
http://memos.local {
reverse_proxy memos:5230
}
http://budget.local {
reverse_proxy actual:5006
}
volumes:
caddy_data:
caddy_config:
vaultwarden_data:
memos_data:
actual_data:
EOF
Now write .env. Generate real secrets — do not ship the defaults.
cat <<'EOF' > .env
# Hostnames used by Caddy for Host-header routing
VAULT_HOST=vault.local
MEMOS_HOST=memos.local
BUDGET_HOST=budget.local
# Sandbox HTTP port on the host loopback
CADDY_HTTP_PORT=18080
# Vaultwarden
VAULT_DOMAIN=http://vault.local
ADMIN_TOKEN=replace-with-strong-random-token
PUSH_INSTALLATION_KEY=
SIGNUPS_ALLOWED=true
LOG_LEVEL=info
# Memos
MEMOS_TAG=stable
# Shared
TZ=UTC
EOF
Generate ADMIN_TOKEN with openssl rand -base64 48. Vaultwarden expects a long random string; the admin panel is disabled if it is empty.
Start the stack:
docker compose up -d
docker compose ps
All four containers should be running. Caddy will be running even if a backend is still warming up; Caddy returns 502 until the upstream answers.
Local verification before going live
Probe each virtual host through Caddy on the loopback port. The Host header is what Caddy uses to route, so curl must set it explicitly.
curl -i -H "Host: vault.local" http://127.0.0.1:18080/
curl -i -H "Host: memos.local" http://127.0.0.1:18080/
curl -i -H "Host: budget.local" http://127.0.0.1:18080/
Expected results:
- Vaultwarden returns
200 OKwith the web vault HTML. - Memos returns
200 OK(or a302to/authon first run). - Actual Budget returns
200 OKwith the login page.
If any probe returns 502, the upstream is not ready or the service name in the Caddyfile is wrong. Check logs:
docker compose logs --tail=50 caddy
docker compose logs --tail=50 vaultwarden
docker compose logs --tail=50 memos
docker compose logs --tail=50 actual
Common failure modes:
dial tcp: lookup vaultwarden: no such host— Caddy started before the backend container existed.docker compose restart caddyfixes it;depends_ononly orders startup, not readiness.- Actual Budget returns
503for the first 20–30 seconds while it initializes its SQLite database. The healthcheck has a 20sstart_periodfor this reason. - Memos returns
404ifMEMOS_TAGresolves to an image that changed its default port. The verified tag isstableon port5230.
Once 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.
Production cutover (HTTPS / remote backups)
When 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.
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.
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.
3. Publish 80:80 and 443:443 on Caddy. Replace the loopback port mapping.
The diff against the sandbox compose.yml:
caddy:
image: caddy:2-alpine
container_name: caddy
restart: unless-stopped
ports:
- - "127.0.0.1:${CADDY_HTTP_PORT:-18080}:80"
+ - "80:80"
+ - "443:443"
environment:
VAULT_HOST: ${VAULT_HOST:-vault.local}
MEMOS_HOST: ${MEMOS_HOST:-memos.local}
BUDGET_HOST: ${BUDGET_HOST:-budget.local}
configs:
caddyfile:
content: |
- {
- auto_https off
- }
-
- http://{$VAULT_HOST} {
+ {$VAULT_HOST} {
reverse_proxy vaultwarden:80
}
- http://{$MEMOS_HOST} {
+ {$MEMOS_HOST} {
reverse_proxy memos:5230
}
- http://{$BUDGET_HOST} {
+ {$BUDGET_HOST} {
reverse_proxy actual:5006
}
Update .env with real hostnames and the matching Vaultwarden domain:
VAULT_HOST=vault.example.com
MEMOS_HOST=notes.example.com
BUDGET_HOST=budget.example.com
VAULT_DOMAIN=https://vault.example.com
Then docker compose up -d. Caddy will request certificates on first request to each hostname. Watch the logs:
docker compose logs -f caddy
You 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.
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:
# /etc/cron.d/privacy-stack-backup
0 3 * * * root cd /home/deploy/privacy-stack && docker run --rm \
-v privacy-stack_vaultwarden_data:/data/vaultwarden:ro \
-v privacy-stack_memos_data:/data/memos:ro \
-v privacy-stack_actual_data:/data/actual:ro \
-v /srv/backups:/backup \
alpine sh -c 'tar czf /backup/privacy-$(date +\%F).tgz -C /data .'
Adjust 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.
Day-2 operations, backups, and trade-offs
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.
docker compose pull
docker compose up -d
docker compose ps
Vaultwarden 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.
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.
Failure modes to expect.
- OOM killer takes out Actual during a large import. Add swap, or run Actual on a separate VPS if the household grows.
- Caddy certificate renewal fails silently if port 80 is blocked. Monitor
docker compose logs caddy | grep -i errorweekly, or use an external uptime check onhttps://vault.example.com. - Vaultwarden admin token leaked. Rotate
ADMIN_TOKENin.env,docker compose up -d vaultwarden, and invalidate sessions in the admin panel. - Disk fills from Docker logs. Set
log-optsin/etc/docker/daemon.jsonand restart Docker.
Trade-offs.
- Single VPS means single point of failure. For a household, that is acceptable; for a business, split Vaultwarden onto its own host.
- Caddy’s automatic HTTPS is excellent, but it needs ports 80 and 443. If your provider blocks 80, use DNS-01 with a Caddy DNS plugin — that requires a custom Caddy image, which breaks the single-file guarantee.
- Inline configs mean you edit
compose.ymlto 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. - No host bind mounts means you cannot
vima config file on the host. Usedocker compose configto inspect the rendered file, anddocker compose exec caddy cat /etc/caddy/Caddyfileto see what Caddy actually loaded.
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).
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.