Caddy — Runbook
Routine Tasks
Restart
ssh [email protected] "systemctl restart caddy"
Check status
ssh [email protected] "systemctl status caddy"
Logs
| Log | Contents | Location | Loki query | Format |
|---|---|---|---|---|
| Caddy service | HTTP requests, TLS cert events, reverse proxy errors, startup | LXC 105 journald | {job="caddy", unit="caddy.service"} |
JSON |
| Full LXC journal | All systemd units (ssh, cron, alloy, etc.) | LXC 105 journald | {job="caddy"} |
Mixed |
Notes:
- Caddy logs are JSON — use | json for structured queries: {job="caddy", unit="caddy.service"} | json | level="warn"
- {job="caddy"} without the unit filter returns ALL journal entries from the LXC, not just Caddy
- SSH fallback: ssh [email protected] "journalctl -u caddy -f"
Troubleshooting
Service not reachable via HTTPS
- Check Caddy logs for TLS or binding errors:
{job="caddy"} |= "error" - Verify Caddy is running:
ssh [email protected] "systemctl status caddy" - Check if the upstream service is reachable from Caddy's LXC