Every self-hosted app you add arrives with its own login screen, its own password, and its own way of forgetting who you are. A media server, a wiki, a dashboard, a git host: that’s four user tables and four places to remember when a family member or teammate loses access. Single sign-on collapses that sprawl into one identity that every app trusts, and authentik is one of the more capable open-source ways to run that identity on your own hardware.
Authentik is an identity provider. It speaks OpenID Connect, OAuth2, SAML, and LDAP, and it can sit in front of apps with no SSO support at all by acting as a forward-auth gatekeeper. This guide covers a Docker Compose install, the first login, and connecting a first application. It then covers the decisions that matter once real accounts depend on the thing.

What to Prepare Before You Install
Authentik is lighter than a full enterprise identity suite but heavier than a static login page. A couple of CPU cores and around 2 GB of RAM is a sensible floor, and a small VM or a mini PC in a closet handles it comfortably. You need a Linux host with Docker Engine and the Compose plugin installed, plus shell access with a user who can run Docker commands.
Pick your hostname before you do anything else. Every app you connect will store redirect URLs and issuer URLs containing that hostname, so changing it later means editing each connection by hand. A dedicated subdomain such as auth.yourdomain.example works well. Plan to put a reverse proxy with a TLS certificate in front of it, whether that’s Caddy, Traefik, or Nginx Proxy Manager. Many apps get strict about plain HTTP during OIDC flows, and a login system served without encryption defeats its own purpose.
Authentik runs as a few containers: a server, a worker, and PostgreSQL, with older releases also bundling Redis. Trust the compose file you download over any diagram, including this one.
Install With Docker Compose
Create a directory for the project and move into it. Download the official compose file from the authentik documentation, then generate two secrets in a new .env file. The first command is echo “PG_PASS=$(openssl rand -base64 36 | tr -d ‘\n’)” >> .env and the second is echo “AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60 | tr -d ‘\n’)” >> .env. The first is the database password. The second is used for signing and encrypting data inside authentik, so treat it like a root credential and never regenerate it on a running install.
Run docker compose pull followed by docker compose up -d, then give the containers a minute to finish database migrations. By default the web interface listens on ports 9000 for HTTP and 9443 for HTTPS, and you can change both in the .env file if they collide with something else on the host. Open http://your-server-ip:9000/if/flow/initial-setup/ in a browser, keeping the trailing slash, and set the password for the default akadmin account. If you go straight to the proxied hostname instead, make sure the reverse proxy forwards WebSocket upgrade headers, because authentik’s outposts rely on them and the failure is quiet and confusing when they’re missing.

Connect Your First App and Lock It Down
Authentik’s mental model has two halves: a provider and an application. The provider defines the protocol and its settings, and the application is the thing users see in their dashboard, bound to that provider. In the admin interface, go to Applications and use the “Create with Provider” wizard. Choose OAuth2/OpenID for any app that supports OIDC, give it a name and slug, and pick the default authorization flow. Add the redirect URI that the app documents, which is typically a callback path on the app’s own domain. Authentik then generates a client ID and client secret.
On the app’s side, you need three values: the client ID, the client secret, and the discovery URL. For authentik the discovery URL follows a predictable pattern: your authentik hostname, then /application/o/, then the application slug, then /.well-known/openid-configuration. Most login failures at this stage come from a redirect URI that doesn’t match character for character, including http versus https and a stray trailing slash. When an app sits behind its own reverse proxy, it may also build its callback URL with the wrong scheme, so check what it thinks its public address is.
Plenty of useful self-hosted tools have no SSO support whatsoever. For those, authentik offers a proxy provider, which runs through an outpost, a small companion service that your reverse proxy consults before letting a request through. The proxy asks the outpost whether the visitor is authenticated, and the outpost bounces anyone who isn’t to the authentik login page. It’s more moving parts than a native OIDC connection, so use it only for apps that can’t do better.

An identity provider is a single point of failure, so harden it first. Add a multi-factor stage to the default authentication flow so a stolen password alone doesn’t open every app at once. Back up the PostgreSQL volume and the .env file together, because a database restored without its original secret key is far less useful than it sounds. Keep one break-glass admin whose credentials live offline. Then think about the awkward case: if the box running authentik goes down, every app that depends on it goes with it.





