When Authelia misbehaves, users can't log in and every application is locked. This episode dissects the most common problems: 503 from the proxy, redirect loops, inconsistent sessions, a disconnected database, TOTP failures, cookie domain mismatches, up to debugging the authentication flow step by step.

Episode 28 made Authelia fast. Now the unavoidable part: the day something breaks. Authelia symptoms can be misleading — users see "page not accessible", when the root cause is deep inside the configuration. Episode 29 trains you to trace symptoms back to the root.
The key to Authelia troubleshooting is understanding the flow: browser → reverse proxy → Authelia (verify) → Redis (sessions) → database (data) → redirection. Every symptom can be mapped to one link in this chain. Start with the most frequent ones.
The most common symptom: all applications show 502 or 503, as if nothing is alive. Yet Authelia is running. What's happening is almost always one of:
curl -fsS http://authelia:9091/api/health. Failing means a network, DNS, or dead container problem./api/verify, not the root /. Make sure the auth URL in the proxy configuration is exact.authelia_request_duration metric from episode 26.The inspection order: is the container alive? → does the health check pass? → is the network connected? → is the endpoint correct?
The user logs in, succeeds, then keeps being redirected back to the login page. This is the classic symptom of a session not visible to the instance evaluating verify. Two main causes:
session.redis configuration is inconsistent between instances (remember episode 24).Set-Cookie.Check with browser developer tools: is the authelia_session cookie set, on which domain, and is it sent along on the verify request? If the cookie disappears mid-way, the problem is in the headers being stripped by the proxy.
Sessions behave strangely — logging in over and over, or stopping entirely. Check this order:
redis-cli ping from the Authelia side.session.expiration and session.inactivity kill sessions too fast. Match them to user expectations and security policy.Authelia fails to store or read MFA data. Logs show a connection error or an encryption error:
storage block. Verify directly with psql -U authelia -h postgres -d authelia -c 'SELECT 1'.storage.encryption_key differs from when the data was written. This always leads back to an unintended rotation — restore the secrets from backup (episode 27).The user is sure their TOTP code is correct, but it's always rejected. TOTP is a function of time — a code is only valid within a 30-second window computed from the server clock. A clock skew between the Authelia server and the user's device, or the server clock drifting on its own, makes codes always wrong.
Authelia checks time via its built-in NTP. Make sure the server is time-healthy:
timedatectl status
chronyc trackingBesides that, note totp.skew in the configuration — how many time windows (default 1) are tolerated. Raise it slightly during device transitions, but don't make it too loose; that weakens the TOTP security guarantees built in episode 9.
A session cookie is only sent for matching domains. If Authelia is at auth.example.com but the cookie is set for example.com or vice versa, the session never arrives. Multi-domain session configuration in modern Authelia is defined in the cookies block — each entry has its own domain and authelia_url. Make sure both are consistent with how the proxy routes requests.
Tip
All the problems above share the same pattern: symptoms on the surface, root in the configuration. Always start from logs and health checks before blindly changing configuration. Change one configuration at a time, then test.
Two tools solve half the problems before touching the runtime. First, validate the configuration — Authelia rejects invalid configuration from the start, so syntax errors are caught early:
authelia validate-config --config /config/configuration.ymlSecond, test access control decisions logically — faster than reloading the browser:
authelia access-control check-policy \
--config /config/configuration.yml \
--user arman \
--url https://app.example.comThis command answers "what policy does this user receive for this URL?" — the best debugging tool for confusing rules from episode 6.
When a problem gets past validation, the log is the primary witness. Raise the level to debug to see the authorization decision flow, then observe each message per step. The key questions the log answers:
One pattern that often misleads: errors at the error log level on verify requests are usually the expected response for a user not logged in — verify returns 401/302 and that's normal. Don't read logs without understanding the flow; read logs while looking at the actual HTTP response.
Episode 29 equips you with detective skills: mapping the six most common problems — 503 from the proxy, redirect loops, sessions, database, TOTP depending on time synchronization, and cookie domain mismatch — then handling each at the root, validating the configuration with authelia validate-config, testing rules with authelia access-control check-policy, and reading debug logs without misinterpreting them.
Key points:
debug logs + check-policy are the best debugging pair.You now hold all the skills. Episode 30 — the final episode — summarizes everything in Production Checklist & Best Practices: a pre-production checklist, security and operational best practices, common traps, a recap of the journey, and the future of Authelia. See you in episode 30!