authcha learn

Learn / Operations

Daily health, services and logs

Module 1 of 6 · 20 minutes

By the end you can

  • Run the quick health checks from the console and the shell
  • Restart one service, and know when a restart is not enough
  • Read the right log for a RADIUS, console or code-delivery problem
  • Turn debug mode on safely, and off again

A one-minute health check

Do this every morning, or wire it into monitoring. From the Authcha host:

cd /opt/authcha
docker compose ps                                  # every service running? db, redis, otp_service healthy?
curl -sk https://127.0.0.1/api/health              # {"status":"ok","db_ok":true}
docker compose logs --tail 50 freeradius | grep -i "ready to process"
df -h /var/lib/docker /opt/authcha                 # disk space

In the console, System shows each container's state and health, and the backups. The Dashboard summarizes authentication activity and system state.

The health endpoint needs no login, which makes it good for load balancers and monitors. Alert when the request fails, when status is not ok, or when db_ok is false. Two lighter probes exist: /api/healthz (the process is up) for supervisors, and /api/readyz (the database answers within 2 seconds) for load balancers.

Managing services

docker compose ps                              # state of every service
docker compose logs -f freeradius              # follow one service's log
docker compose restart freeradius              # restart one service
docker compose up -d                           # start anything stopped; apply compose or .env changes
docker compose up -d --force-recreate admin    # re-read .env for one service

The service names are freeradius, db, redis, otp_service, admin, ops and caddy.

Which log, for which problem

SymptomLook here
A login was accepted or rejected, and whyLive Auth → Logs, or docker compose logs -f freeradius
The console or an API call misbehavesdocker compose logs -f admin
One-time codes are not arrivingdocker compose logs otp_service and Audit Trail → OTP Funnel
Everything, the last hourdocker compose logs --since 1h

In the console, viewers can see the RADIUS and OTP logs. The database, cache and console logs are for admins only. Passwords are never logged.

Debug mode, with a guard

For a hard problem, you can make RADIUS log every request in full. It is protected so it cannot be left on by accident. Both lines are needed in .env:

FREERADIUS_DEBUG=true
FREERADIUS_DEBUG_CONFIRM=log-secrets

Then docker compose up -d freeradius.

Stop logs filling the disk

Container logs use Docker's logging driver. Set rotation in /etc/docker/daemon.json, then restart Docker:

{ "log-driver": "json-file", "log-opts": { "max-size": "50m", "max-file": "5" } }

LabHands-on

Steps 1 to 3 on the demo as demo-viewer (password Authcha-View-2026). The rest on your install.

  1. Open System on the demo. Check every service shows healthy.
  2. Open Live Auth and filter the log by result. Find a rejection and read its reason.
  3. Open the Dashboard and find the authentication summary.
  4. On your install, run the four quick checks above and note the results.
  5. Edit a harmless value in .env. First run docker compose restart admin, then check if the console saw the change (it will not). Then run docker compose up -d --force-recreate admin and check again.
  6. Turn debug mode on, send one login, find the full request in the log, then turn it off again.

Check yourselfQuiz

1You edited .env by hand. What do you run so the console uses the new value?
2Which health check needs no login and suits a load balancer?
3Why does debug mode need two settings?
4Where do you look first when a code is not arriving?
5Which setting stops container logs from filling the disk?

Cheat sheetKeep this

  • Health: docker compose ps, curl -sk https://127.0.0.1/api/health, check disk space.
  • Service names: freeradius, db, redis, otp_service, admin, ops, caddy.
  • Edited .env? Recreate, not restart: docker compose up -d --force-recreate <service>.
  • Debug: FREERADIUS_DEBUG=true and FREERADIUS_DEBUG_CONFIRM=log-secrets. Turn it off after.
  • Rotate logs in /etc/docker/daemon.json.
  • Read more: Operations.