Stacks & Infra · Multi-App Stack · 2026-12-05
1 GB VPS Monitoring & Alerting Stack Behind Caddy 2
Run Beszel server metrics, Gatus endpoint checks, and ntfy push alerts behind one Caddy 2 proxy on a 1 GB VPS — verified in one sandbox run.
- Whole-stack RAM
- 61.8MB
- Containers
- 4
- Startup
- 51.5s
- Target VPS
- 1 GB VPS
20.7 MB · beszel 16.3 MB · caddy 13.4 MB · gatus 11.3 MB - Beszel via Caddy
Host: beszel.localHTTP 200 - Gatus via Caddy
Host: status.localHTTP 200 - ntfy via Caddy
Host: ntfy.localHTTP 200
Architecture and why these pieces fit together
Three small services, one reverse proxy, no host port sprawl. Beszel watches CPU, memory, disk, and Docker containers on the VPS itself. Gatus polls HTTP endpoints and TCP ports on a schedule and flips to red when something stops answering. ntfy is the notification bus: both Beszel and Gatus push alerts into a topic, and your phone or desktop subscribes to that topic. Caddy terminates HTTP on a single loopback port and routes by Host header.
Everything runs on the Compose network. Only Caddy publishes a port, and only on 127.0.0.1. That keeps the attack surface tiny on a 1 GB box and makes the stack trivially portable: one compose.yml, one .env, no host bind mounts, no Docker socket.
Memory budget is realistic. The verified single-app measurements are 16.3 MB for Beszel, 11.4 MB for Gatus, and 18.8 MB for ntfy at idle. Caddy adds a few megabytes. That leaves most of the 1 GB for the OS, Docker, and whatever you are actually monitoring.
Prerequisites, ports, and VPS sizing
- Docker Engine 24+ with the Compose v2 plugin.
- A 1 GB VPS (Debian 12 or Ubuntu 24.04 is fine). Add 1 GB of swap if you plan to run anything else alongside.
- Port
18080on loopback is used for sandbox verification. In production you will publish80and443instead. - No inbound ports are opened for Beszel, Gatus, or ntfy. They stay internal.
- DNS records for
beszel.local,status.local, andntfy.localare only needed for local testing. Production uses real domains.
Single-file Docker Compose setup
Create the project directory and write both files.
mkdir -p ~/monitoring-stack && cd ~/monitoring-stack
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
volumes:
- caddy_data:/data
- caddy_config:/config
depends_on:
- beszel
- gatus
- ntfy
beszel:
image: henrygd/beszel:latest
restart: unless-stopped
environment:
APP_URL: ${BESZEL_APP_URL:-http://beszel.local}
TZ: ${TZ:-UTC}
volumes:
- beszel_data:/beszel_data
healthcheck:
test: ["CMD", "/beszel", "health", "--url", "http://localhost:8090"]
interval: 120s
start_period: 10s
timeout: 5s
gatus:
image: ghcr.io/twin/gatus:stable
restart: unless-stopped
environment:
TZ: ${TZ:-UTC}
GATUS_LOG_LEVEL: ${GATUS_LOG_LEVEL:-INFO}
GATUS_CONFIG_PATH: ${GATUS_CONFIG_PATH:-/config/config.yaml}
volumes:
- gatus_config:/config
- gatus_data:/data
ntfy:
image: binwiederhier/ntfy:latest
command: serve
restart: unless-stopped
environment:
TZ: ${TZ:-UTC}
NTFY_BASE_URL: ${NTFY_BASE_URL:-http://ntfy.local}
NTFY_CACHE_FILE: /var/cache/ntfy/cache.db
NTFY_CACHE_DURATION: ${NTFY_CACHE_DURATION:-12h}
NTFY_AUTH_FILE: /var/cache/ntfy/user.db
NTFY_AUTH_DEFAULT_ACCESS: ${NTFY_AUTH_DEFAULT_ACCESS:-deny-all}
NTFY_ENABLE_SIGNUP: ${NTFY_ENABLE_SIGNUP:-false}
NTFY_BEHIND_PROXY: ${NTFY_BEHIND_PROXY:-true}
NTFY_ATTACHMENT_CACHE_DIR: /var/cache/ntfy/attachments
volumes:
- ntfy_cache:/var/cache/ntfy
- ntfy_etc:/etc/ntfy
configs:
caddyfile:
content: |
{
auto_https off
}
http://beszel.local {
reverse_proxy beszel:8090
}
http://status.local {
reverse_proxy gatus:8080
}
http://ntfy.local {
reverse_proxy ntfy:80
}
volumes:
caddy_data:
caddy_config:
beszel_data:
gatus_config:
gatus_data:
ntfy_cache:
ntfy_etc:
EOF
cat <<'EOF' > .env
TZ=UTC
CADDY_HTTP_PORT=18080
BESZEL_APP_URL=http://beszel.local
GATUS_LOG_LEVEL=INFO
GATUS_CONFIG_PATH=/config/config.yaml
NTFY_BASE_URL=http://ntfy.local
NTFY_CACHE_DURATION=12h
NTFY_AUTH_DEFAULT_ACCESS=deny-all
NTFY_ENABLE_SIGNUP=false
NTFY_BEHIND_PROXY=true
EOF
Start it:
docker compose up -d
docker compose ps
Gatus boots with its built-in default config when /config is empty. That is enough to serve the dashboard. To add real checks and alerting, write a config.yaml into the gatus_config volume. The minimal alerting block that targets ntfy looks like this:
endpoints:
- name: beszel
url: http://beszel:8090
interval: 60s
conditions:
- "[STATUS] == 200"
alerts:
- type: ntfy
url: http://ntfy:80
topic: alerts
priority: 3
token: ${NTFY_ACCESS_TOKEN}
Drop that into a file and copy it into the volume:
docker compose cp ./config.yaml gatus:/config/config.yaml
docker compose restart gatus
Beszel can also send alerts. In its web UI, create a notification channel of type ntfy and point it at http://ntfy:80/alerts with the same access token. Both services now share one notification bus.
Local verification before going live
Probe each host through Caddy. The Host header is what Caddy routes on.
curl -i -H "Host: beszel.local" http://127.0.0.1:18080/
curl -i -H "Host: status.local" http://127.0.0.1:18080/
curl -i -H "Host: ntfy.local" http://127.0.0.1:18080/
Expect 200 from Beszel and Gatus, and 200 from ntfy’s web UI. If you get 502, check that the backend container is healthy:
docker compose logs --tail=50 beszel
docker compose logs --tail=50 gatus
docker compose logs --tail=50 ntfy
docker compose logs --tail=50 caddy
Beszel’s healthcheck is the quickest signal. docker compose ps should show it as healthy within a minute or two.
Production cutover (HTTPS / remote backups)
Switch Caddy to real TLS. Three changes:
- Remove
auto_https offfrom the global block. - Replace
http://beszel.local,http://status.local, andhttp://ntfy.localwith your real domains, e.g.beszel.example.com,status.example.com, andntfy.example.com. - Publish
80:80and443:443instead of the loopback port.
The diff in compose.yml:
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- - "127.0.0.1:${CADDY_HTTP_PORT:-18080}:80"
+ - "80:80"
+ - "443:443"
And in the inline Caddyfile:
- {
- auto_https off
- }
-
- http://beszel.local {
+ beszel.example.com {
reverse_proxy beszel:8090
}
- http://status.local {
+ status.example.com {
reverse_proxy gatus:8080
}
- http://ntfy.local {
+ ntfy.example.com {
reverse_proxy ntfy:80
}
Update .env so BESZEL_APP_URL and NTFY_BASE_URL use the public HTTPS URLs. Then docker compose up -d. Caddy will obtain certificates automatically.
For remote backups, do not mount the Docker socket. Instead, run a small sidecar or a host cron job that tars the named volumes and ships them off-box. Example host cron:
0 3 * * * docker run --rm -v monitoring-stack_beszel_data:/data -v /backups:/backup alpine tar czf /backup/beszel-$(date +\%F).tgz -C /data .
Repeat for gatus_config, gatus_data, ntfy_cache, and ntfy_etc. Keep the backups off the VPS.
Day-2 operations, backups, and trade-offs
Upgrades. docker compose pull && docker compose up -d. Beszel and ntfy are stateless enough that a restart is safe. Gatus reloads its config on restart; if you keep the config in the volume, it survives.
Backups. The named volumes are the only state. Back up beszel_data, gatus_config, gatus_data, ntfy_cache, and ntfy_etc. Caddy’s caddy_data holds certificates; back it up too if you want to avoid re-issuing on rebuild.
Failure modes. If ntfy is down, Beszel and Gatus will log failed notifications but keep monitoring. If Gatus is down, you lose endpoint checks but Beszel still reports host metrics. If Caddy is down, everything is unreachable from outside; keep an SSH path in.
Trade-offs. Running three services plus Caddy on 1 GB is comfortable at idle, but Gatus with many endpoints and short intervals will use more CPU. Keep intervals at 60 seconds or longer. ntfy’s cache is capped by NTFY_CACHE_DURATION; 12 hours is a reasonable default. Beszel’s agentless mode is fine for a single host; if you add more hosts, deploy the Beszel agent on each and point it at the hub.
Security. ntfy defaults to deny-all for anonymous access. Create users and access tokens before exposing it. Keep NTFY_ENABLE_SIGNUP=false. Caddy handles TLS; do not expose the backend ports.
Related guides. The single-app deep dives are at /self-host-beszel-docker-monitoring/, /self-host-gatus-docker-health-dashboard/, and /self-host-ntfy-docker-push-notifications/.
Measured in our sandbox run: total memory 61.8 MB (sum of per-container peaks over a 30s idle window after startup) across 4 containers; largest container 20.7 MB; published port(s) 18080; HTTP probe returned 200, 200, 200. The run took 51.5s including the image download. Container breakdown: ntfy 20.7 MB, beszel 16.3 MB, caddy 13.4 MB, gatus 11.3 MB. Verified routes: Beszel via Caddy (HTTP 200), Gatus via Caddy (HTTP 200), ntfy 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.