Health and monitoring
Check health, read logs, set up monitoring.
Checking health
scripts/cliprctl health
| Area | What is checked |
|---|---|
| Containers | Is every service running? Does its health check report "healthy"? Was it restarted (a sign of crashes)? |
| Application | Does /api/health answer inside the app container, which version runs? How full is the data volume (warning from 85 %, critical from 95 %)? |
| Access via Caddy | Is Clipr reachable over HTTPS at CLIPR_DOMAIN? How long is the certificate still valid? |
| Wiki | Only with the wiki: is it reachable, is editing on, does the app provide its SSO keys? |
| Proton Mail Bridge | Only with the overlay: STARTTLS connection from the app container to the bridge, with the same certificate checks as the app. |
| Configuration | Permissions of .env (600), is the initial password still in it? |
Certificates: with Let's Encrypt, health warns when fewer than 14 days remain – automatic renewal is then stuck (scripts/cliprctl logs caddy). The internal certificate authority (CLIPR_TLS=internal) issues certificates valid for a few hours and renews them itself; here it only matters that the certificate has not expired.
For monitoring and cron
scripts/cliprctl health --quiet # prints only OK, WARNING (n) or CRITICAL (n)
echo $? # 0 = OK, 1 = warning, 2 = critical
The exit codes follow the usual monitoring convention (Nagios, Icinga, Checkmk). Example sending an email on problems via cron:
*/15 * * * * cd /path/to/Clipr && scripts/cliprctl health --quiet >/tmp/clipr-health || mail -s "Clipr: $(cat /tmp/clipr-health)" admin@example.org </tmp/clipr-health
scripts/cliprctl status is the short form (health --brief) and is also shown after every deployment.
Logs
scripts/cliprctl logs app -f # follow the app live
scripts/cliprctl logs caddy --tail 100
scripts/cliprctl logs wiki
Logs are limited per container (app 5 × 10 MB, wiki 3 × 5 MB, relay 3 × 1 MB) and rotated by Docker. CLIPR_LOG_LEVEL=DEBUG gives more detail for the app; keep INFO in normal operation.
Security-relevant events (sign-ins, failed attempts, sign-ins to companion services) are also recorded by the app in the security log of the system database; it is cleaned up after 180 days.
Restarting and stopping
scripts/cliprctl restart app # waits until the app is "healthy" again
scripts/cliprctl stop # stop everything
scripts/cliprctl deploy # start again
Resources
| Container | Memory limit | Processes | File system |
|---|---|---|---|
| app | CLIPR_MEM_LIMIT (1 GB) |
256 | read-only, /tmp in memory |
| caddy | 256 MB | 128 | read-only |
| wiki | 256 MB | 128 | read-only |
| imap-relay | 64 MB | 64 | read-only |
All containers run without additional Linux capabilities (cap_drop: ALL, Caddy may only open ports below 1024) and with no-new-privileges.