2026-12-01 · gatus · monitoring · docker · status-page
Self-Host Gatus with Docker: Health Dashboard & Status Page
Run Gatus in Docker Compose to monitor HTTP, TCP, ICMP and DNS endpoints with conditions, alerts, and a public status page behind Caddy.
- Total RAM
- 11.4 MB
- Startup
- 40.7 s
- Port
- 8080
- HTTP
- 200
What Gatus does and what it needs
Gatus is a health dashboard and status page written in Go. You declare endpoints in YAML, attach conditions to each one, and Gatus polls them on an interval. Conditions can check status codes, response time, response body (JSON paths or substring patterns), certificate expiry, and more. When a condition fails past a threshold, it fires alerts to Slack, PagerDuty, Discord, Teams, Telegram, or a custom webhook.
The key difference from Prometheus-style monitoring: Gatus actively probes your services. It does not wait for traffic to reveal a problem. If your load balancer dies at 3 AM with zero requests in flight, Gatus still notices.
What it needs on the host:
- A single container. No database is required by default; state lives in memory and an optional file-backed store.
- A YAML config file mounted into the container. Default path is
config/config.yaml; override withGATUS_CONFIG_PATH. - Outbound network access to whatever you monitor, plus inbound access on port
8080for the dashboard and API.
The upstream project does not publish a minimum memory figure. As a Go binary with a small in-memory result buffer, idle footprint is modest; memory scales with the number of endpoints, check frequency, and how much result history you retain. Hundreds of endpoints at 60s intervals is a very different load than a dozen at 5m.
Prerequisites, ports, and volume constraints
- Docker Engine 24+ and the Compose v2 plugin (
docker compose version). - A domain pointed at your VPS if you want HTTPS. Not strictly required for a private dashboard.
- Port
8080is the documented container port. We bind it to127.0.0.1:8080so only the reverse proxy reaches it. - One bind mount for configuration:
./configon the host to/configin the container. Gatus readsGATUS_CONFIG_PATH; we set it to/config/config.yaml. - One named volume for persistent data:
gatus-datamounted at/data. This holds the file-backed storage and any TLS material Gatus writes.
If you want to test without a domain, either SSH-tunnel (ssh -L 8080:127.0.0.1:8080 user@vps) or temporarily change the port mapping to 8080:8080 and open the firewall. Revert before going public.
Production Docker Compose setup
Create the project directory and config first. Gatus refuses to start without at least one endpoint, so seed a minimal config that monitors itself.
mkdir -p /opt/gatus/config && cd /opt/gatus
cat <<'EOF' > config/config.yaml
endpoints:
- name: gatus-self
group: core
url: "http://localhost:8080/health"
interval: 60s
conditions:
- "[STATUS] == 200"
- "[RESPONSE_TIME] < 500"
EOF
Generate secrets and write the environment file. GATUS_LOG_LEVEL accepts DEBUG, INFO, WARN, ERROR, FATAL.
cat <<'EOF' > .env
TZ=UTC
GATUS_LOG_LEVEL=INFO
GATUS_CONFIG_PATH=/config/config.yaml
EOF
Now the Compose file. It boots standalone: no proxy container, no host config bind mounts beyond the config directory you just created.
cat <<'EOF' > compose.yml
services:
gatus:
image: ghcr.io/twin/gatus:stable
container_name: gatus
restart: unless-stopped
environment:
TZ: ${TZ:-UTC}
GATUS_LOG_LEVEL: ${GATUS_LOG_LEVEL:-INFO}
GATUS_CONFIG_PATH: ${GATUS_CONFIG_PATH:-/config/config.yaml}
ports:
- "127.0.0.1:8080:8080"
volumes:
- gatus-config:/config
- gatus-data:/data
volumes:
gatus-config:
gatus-data:
EOF
Start it and confirm the dashboard responds locally:
docker compose up -d
docker compose logs -f gatus
curl -sS http://127.0.0.1:8080/health
The /health endpoint returns 200 when Gatus is up. The dashboard is at /, the API at /api/v1/, and Prometheus metrics at /metrics only if you set metrics: true in the config.
Reverse proxy, HTTPS, and first-run hardening
Gatus has no built-in login by default. Anyone who can reach port 8080 sees your dashboard, your endpoint URLs, and your API. Put it behind Caddy (or Nginx) and add authentication before you expose it.
Caddyfile:
status.example.org {
encode gzip
reverse_proxy 127.0.0.1:8080
}
Caddy handles TLS automatically. For Nginx, the equivalent needs proxy_set_header Host $host;, proxy_set_header X-Forwarded-Proto $scheme;, and proxy_set_header X-Real-IP $remote_addr; so Gatus logs and any URL generation reflect the public scheme. Gatus does not require WebSocket upgrade headers for the dashboard, but if you later add a custom alerting receiver that streams, keep Upgrade and Connection headers in the proxy block.
Upload limits are not a concern here; Gatus does not accept file uploads. Request body limits can stay at the proxy default.
First-run hardening checklist:
- Enable basic auth in
config/config.yamlundersecurity.basicwith a bcrypt hash, or wire OIDC undersecurity.oidc. Do this before DNS resolves publicly. - Set
metrics: falseunless you actually scrape it. Exposing/metricspublicly leaks endpoint names and status. - If you use external endpoints (push-based checks), every one needs a
token. Treat those tokens like API keys; they authorize writes to/api/v1/endpoints/{key}/external. - Keep the
127.0.0.1:8080binding. If you must expose directly, put a firewall rule in front and accept that traffic is unencrypted. - Review
ui.hide-urlper endpoint if any URL contains a token or internal hostname.
Updating, backups, and common pitfalls
Update:
cd /opt/gatus
docker compose pull
docker compose up -d
docker compose logs --tail=50 gatus
Gatus reloads config changes on the fly when the file changes, so most edits do not need a restart. Image updates do.
Backup the two things that matter: the config directory and the gatus-data volume.
cd /opt/gatus
tar czf gatus-config-$(date +%F).tar.gz config/
docker run --rm -v gatus_gatus-data:/data -v "$PWD":/backup alpine \
tar czf /backup/gatus-data-$(date +%F).tar.gz -C /data .
Restore by extracting into the same paths with the stack stopped.
Two pitfalls worth knowing up front:
- Config merge surprises. If
GATUS_CONFIG_PATHpoints at a directory, every*.yamland*.ymlfile is deep-merged. Primitive values likealerting.slack.webhook-urlmay only be defined once across all files; defining it twice with different values fails the merge. Split configs by concern, not by copy-paste. $in config values. Gatus expands environment variables in the config file. Any literal$(regex, passwords, JSON bodies) must be escaped as$$, or the value silently mangles at load time.
Also watch the default concurrency: 3. With many endpoints, checks queue and intervals drift. Raise it deliberately, or set concurrency: 0 for unlimited if you know your outbound capacity.
Measured in our sandbox run: total memory 11.4 MB (sum of per-container peaks over a 30s idle window after startup) across 1 container; largest container 11.4 MB; published port(s) 8080; HTTP probe returned 200. The run took 40.7s with the image already cached; a fresh server also has to download it.
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.