Skip to content

Self-hosting

Monitoring and security

Health endpoints, the components checked, alerts, logs, rotating secrets, the TLS check and differences from the cloud.

Last updated:

Health endpoints

  • /api/health: only whether it is up; the container health check uses it.
  • /api/health/components: the components' state as JSON; 503 if any fails.
  • /api/metrics: measurements in Prometheus format.

The last two need Authorization: Bearer HEALTH_TOKEN; without a token set they answer 404.

What is checked

Every minute the worker checks: the cell and journal databases, the worker's heartbeat, the job queues, the file store, the age of virus signatures, the web, release approval, pandoc, clock drift and disk use (80 and 90 percent). External services and the SMTP login are checked every five minutes. The database backup (thresholds of 26 and 50 hours for the last backup, 10 and 20 minutes for WAL) and the file backup (45 minutes and 2 hours) are watched too. With HEALTH_CERTIFICATES on, certificates are checked hourly.

Alerts and logs

When a component fails or recovers, the operators on call (otherwise all operators) are e-mailed, and with ALERT_WEBHOOK_URL set a signed webhook is also sent, with three attempts. The health page in the operator console shows the same state. Container logs are limited to 10 files of 50 MB each per container.

Rotating secrets and TLS

To rotate the encryption key or the authentication secret, give the old one as SECRETS_KEY_PREVIOUS or AUTH_SECRET_PREVIOUS, restart the services and run the rotation tool first as a dry run, then for real; once the tool reports that nothing is left under the old key, remove the old value. Rotating the authentication secret signs everyone out. The package's tls-check.sh checks that the entrance refuses TLS 1.0 and 1.1 and accepts 1.2 and 1.3, and checks weak cipher suites, the HTTP redirect and HSTS.

Differences from the cloud

An institution's installation has no global directory, no release rings and no creating of new organizations; the entrance is Caddy or the institution's proxy; backups go to a local disk. The portal shows the institution's name and language; journalos.org's product pages and this documentation are not served on an institution's installation.

A question this page does not answer? Write to us.