Dissecting Authentik's architecture: server, worker, PostgreSQL, Redis, and outposts; understanding core concepts such as tenant, application, provider, flow, stage, and policy; following an end-to-end authentication flow from browser to token; and a glossary of key terms.

After understanding in episode 1 why Authentik is needed — one entry point for many applications — in this episode we dissect how Authentik works behind the scenes. This is the most important episode before touching configuration: without the architecture, every button in the Authentik UI is just memorization that's easy to misuse.
We'll map the architecture components, understand the core concepts (tenant, application, provider, flow, stage, policy, user & group), then follow the journey of a single request from the browser to returning with a token. Just as a pilot must understand how wings work before flying, an engineer who understands Authentik's architecture will be far faster at debugging problems in later episodes.
Authentik never runs alone. It's a coordination point among several components. Let's break them down one by one.
The heart is the server process — the web application that serves three things: the API (the front line for the web UI and integrations), the web UI (the admin interface and the user login portal), and flow execution. By default it listens on port 9000. Its image is ghcr.io/goauthentik/server. Every request from a browser or application ultimately reaches the server.
The worker is the companion process that runs asynchronous tasks: source synchronization (LDAP, social login), email delivery, scheduled tasks, and other background jobs. It uses the same image as the server (ghcr.io/goauthentik/server) only with the command: worker command. If you see odd behavior like emails not being sent or synchronization stuck, check the worker logs first with docker compose logs -f worker.
All of Authentik's persistent data — configuration, users, groups, applications, providers, flows, stages, policies, and events — is stored in PostgreSQL. This is the single source of truth. Losing the database means losing everything, so the backup episode makes PostgreSQL the top priority.
Redis plays a dual role: cache (sessions, policy results, and frequently read data) and message queue (passing tasks from the server to the worker). Since it holds transient data, Redis can be rebuilt without losing data — but without Redis, Authentik won't function normally.
An outpost is a component that runs outside the core server and communicates with it to serve a specific need. Two main types: the proxy outpost (sits in front of applications for forward auth, image ghcr.io/goauthentik/proxy) and the LDAP outpost (presents Authentik users as an LDAP directory for legacy applications). Outposts can run embedded in the server (the lab default) or separately on another host or Kubernetes (for production).
The Authentik UI has two faces: the admin interface (where you manage tenants, users, flows, applications — accessed by admins) and the user interface (where users manage their profile, MFA devices, and available applications). Episode 3 will take you there.
You'll encounter these terms constantly. Understand them now so you don't get lost later:
Flows are Authentik's main differentiator compared to other IdPs. Each flow has a designation that determines its purpose and how it's invoked:
Each flow is assembled from stages: identification, password, authenticator validation, user write, consent, email, prompt, deny, and more. Episode 4 dissects them all.
This is the "everything comes together" moment. Follow the journey of a single request:
https://grafana.example.com) integrated with Authentik via OIDC.Browser Aplikasi (SP) Authentik
| 1. buka app | |
|-------------------->| |
| 2. redirect ke auth| |
|<--------------------| |
| 3. execute flow |--------------------->|
| 4. identification + password + MFA |
|<------------------->| |
| 5. policies evaluasi -> 6. consent |
| 7. authorization code ->| |
|<--------------------| 8. tukar code -> |
| | <- id token + AT |
| | 9. halaman aplikasi |Important
Notice that the application never sees the user's password. All credentials are processed by Authentik; the application only receives tokens and identity. This is the heart of the modern SSO pattern: one place manages credentials, many applications consume identity.
| Term | Brief Meaning |
|---|---|
| IdP | Identity Provider — the party that issues identity |
| SP | Service Provider — the application that consumes identity |
| Flow | An authentication journey for a single purpose |
| Stage | The smallest building block in a flow |
| Policy | Conditional allow/deny logic |
| Tenant | Isolated namespace for branding and configuration |
| Outpost | Remote proxy/LDAP component outside the core server |
| Provider | Protocol implementation (OIDC, SAML, LDAP, Proxy, SCIM) |
| Source | Connection to external identity (Google, GitHub, LDAP) |
In this episode 2, you mapped Authentik's architecture: server (API + web UI + flow execution), worker (async tasks), PostgreSQL (the source of truth for data), Redis (cache and message queue), and outposts (proxy and LDAP) which can run embedded or separate. You also recognized the core concepts — tenant, application, provider, source, flow, stage, policy, user & group — and followed the end-to-end OIDC login journey from the application, to the authorization endpoint, through flows and policies, and back with a token.
Key takeaways:
In episode 3, we start taking action: installing Authentik with Docker Compose — assembling the server, worker, PostgreSQL, Redis, and proxy stack, managing secrets through the .env file, bootstrapping the admin, and verifying your first Authentik UI. See you in episode 3!