The problem
My lab had grown to a dozen web interfaces, each with its own local account: two hypervisors, a container manager, media management apps, monitoring, and more. That meant a dozen passwords to manage, no MFA on most of them, and no single place to see or revoke access. Some apps had very weak built-in authentication, or none at all.
That’s the same problem identity and access management solves in a company, so I solved it the same way: one identity provider, standard protocols, and every app trusting it.
Choosing an identity provider
I chose authentik, an open-source identity provider I could self-host. I also looked at using Microsoft Entra ID (Azure AD) instead, since it’s what many employers run. Entra handles OIDC well for apps that support it, but it can’t do forward-auth for apps without their own login, LDAP needs a paid add-on, and it requires internet access to log in. authentik covers all three, so it stayed. Entra is still a good option to put in front of a Cloudflare Access setup later.
Deployment
authentik runs as a Docker Compose stack (server, worker, and PostgreSQL) managed through Portainer on my Unraid server.
The first deploy failed with env file .env not found. Portainer stores stack variables in a file called stack.env, not .env, so the compose file’s env_file reference had to change. I fixed it on one service and it still failed, because all three services referenced the file. Reading the error closely and fixing every reference got it running. It was a small lesson in reading the whole config, not only the line the error points at.
Connecting apps with OIDC
For apps with native OpenID Connect support, each one gets its own OAuth2/OIDC provider and application in authentik, with a unique client ID and secret.
Proxmox was first and went smoothly.
Unraid took more work, and each failure taught me a part of the protocol:
- Issuer mismatch. The issuer URL I entered didn’t exactly match the one authentik advertises, down to the trailing slash. OIDC compares issuers as exact strings, so “almost the same” fails.
- Authorization. Unraid has its own allow-list of who may sign in through SSO. Until I added my identity, a valid authentik login was still refused.
- Redirect URI mismatch. authentik still had an old
http://IP-based redirect URI registered, while Unraid was sending its real HTTPS callback. The identity provider will only send tokens back to a pre-registered URI, which is an important protection against token theft, so it rejected the request. Updating the registered URI fixed it.
Portainer failed differently. I had three problems:
- The authorization, token, and user-info URLs used the app-specific path instead of authentik’s shared
/application/o/...endpoints. - The “user identifier” field held my literal username instead of the claim name (
preferred_username) Portainer should read from the token. - Automatic user provisioning was off.
Each fix moved the error one step further along the OAuth flow, which made a good way to learn where each piece fits.
I kept a local admin account on critical apps as a break-glass path, so an outage in the identity provider can’t lock me out of the tools I’d need to fix it.
Forward-auth for apps without real login
Some apps, like Sonarr and Radarr, have no OIDC support. For those I used authentik’s proxy provider with its embedded outpost:
- Nginx Proxy Manager sends the app’s hostname to the authentik outpost instead of straight to the app.
- The outpost checks for a valid session and sends unauthenticated users to log in.
- Only authenticated requests are forwarded to the app, which is set to trust external authentication.
My first attempt authenticated correctly but dropped me on the authentik dashboard instead of the app. The outpost config showed why: I’d cloned the Sonarr provider and left its external host pointing at the Sonarr hostname, so the outpost didn’t recognize Radarr requests. Fixing that one field solved it.
Two follow-ups mattered:
- Block the side door. Once an app trusts external auth, anyone who can reach its port directly skips the login. A firewall between networks can’t fix this when the client and server share a network. The robust fix is to stop publishing those ports on the host and let the proxy reach the apps over an internal Docker network only, so the proxy is the only way in.
- Fix monitoring. My uptime monitor started checking the login page instead of the app. I split it into two checks, one against the app’s internal health endpoint and one against the full proxy and auth chain, so I can tell which layer failed.
Sessions, MFA, and passkeys
I configured how long sessions last and when authentik asks for credentials again, and learned the identity provider’s session is separate from each app’s own session.
MFA is required at login, and I enrolled a WebAuthn passkey. I rolled it out in the safe order: enroll my own authenticator and recovery codes first, test in a private window, and only then make it mandatory in the login flow, so a mistake couldn’t lock me out.
Making it usable
Security that’s annoying gets bypassed, so I spent time on the login experience:
- Password manager autofill didn’t work. authentik’s login UI is built from web components that render inside nested shadow DOM, which many password manager extensions can’t see into. I confirmed this by inspecting the live page’s structure. Merging the username and password steps helped, and enabling the flow’s compatibility mode, which renders without shadow DOM, fixed it completely.
- Branding. I gave the login pages a custom logo, background, and welcome text, and used CSS to remove the vendor footer, so it looks like one coherent platform.
Takeaways
- OIDC is strict by design. Issuer, redirect URI, and claim names must match exactly, and each of those checks exists to stop a specific attack.
- Forward-auth only works if the app can’t be reached around it.
- Plan for the identity provider failing. Break-glass accounts and careful MFA rollout prevent self-inflicted lockouts.
- Usability is part of security. Fixing autofill and adding passkeys makes the secure path the easy one.
Skills demonstrated
Identity and access management · OAuth2 and OpenID Connect · SSO integration and troubleshooting · forward-auth and reverse proxy configuration · MFA and WebAuthn · Docker Compose and Portainer · front-end debugging (shadow DOM)