Manoj Yadav

Centralized Auth in the Homelab: Authelia vs. Authentik vs. Keycloak

As your homelab expands past three or four services, authentication quickly turns into a mess.

Some tools have built-in logins. Some have hardcoded default passwords. Others have zero authentication whatsoever, expecting you to hide them behind an internal network. And having to remember six different credentials across your browser tabs is a pain.

When looking for a single sign-on (SSO) and reverse proxy authentication solution, the self-hosted community usually debates between three platforms: Authelia, Authentik, and Keycloak.

I tested all three on my low-power thin-client fleet (HP T630). Here is how they compare, the architectural trade-offs of each, and why I ended up deploying Authelia.


The Three Contenders

1. Keycloak: The Enterprise Giant

Keycloak is the battle-tested industry standard maintained by Red Hat. It powers large enterprise setups with millions of users.

  • The Good: Unrivaled standards compliance, enterprise federation, complex RBAC, fine-grained client scopes.
  • The Catch: It is a massive Java application. Even on modern Quarkus builds, it easily demands 1.2 to 1.8 GB of RAM just idling with zero traffic. It takes 30 seconds to boot, requires an external PostgreSQL cluster, and forces you to navigate deep enterprise concepts (realms, mappers, flows, and federations) just to put a login screen in front of Sonarr or a simple internal dashboard.

2. Authentik: The Modern All-in-One

Authentik has exploded in popularity recently because of its polished web dashboard, built-in user self-service portal, and native outpost proxies.

  • The Good: Gorgeous UI, built-in application dashboard, supports practically every protocol under the sun (Forward-auth, OIDC, SAML, SCIM, LDAP outpost), and allows self-service password resets.
  • The Catch: The architecture is surprisingly heavy. Running Authentik requires four separate containers: the core server, a Celery background worker, PostgreSQL, and Redis. At idle, this stack consumes around 1.0 to 1.4 GB of RAM. On a thin client with 8–16 GB of total system memory, dedicating over 1 GB solely to identity management is a tough sell. Additionally, while “blueprints” exist, its configuration leans heavily on clicking through a web UI rather than clean, version-controlled YAML text files.

3. Authelia: The Lightweight Ninja

Authelia is built in Go and focuses on doing one job with surgical precision: intercepting HTTP requests at your reverse proxy and validating credentials.

  • The Good: It is a single Go binary running in one container. It idles at just 35 to 50 MB of RAM, boots in under 1 second, and its entire configuration lives in human-readable YAML files (configuration.yml and users_database.yml) that can be committed straight into a Git repository.
  • The Catch: No fancy built-in application dashboard (it’s purely a login gate), no self-service user registration portal, and no native SAML support.

Head-to-Head Comparison

Feature Authelia Authentik Keycloak
Idle Memory ~35 – 50 MB ~1.0 – 1.4 GB ~1.2 – 1.8 GB
Container Count 1 container 4 (Server + Worker + PG + Redis) 2+ (Keycloak + PostgreSQL)
Runtime Language Go Python & Go Java (JVM / Quarkus)
Config Style Declarative YAML in Git Web UI clicking (Blueprints optional) Web UI / CLI scripts
User Directory YAML file, SQLite, or LDAP PostgreSQL internal / LDAP PostgreSQL internal / LDAP / AD
Protocols Forward-Auth, OIDC, WebAuthn Forward-Auth, OIDC, SAML, LDAP, SCIM OIDC, SAML, Kerberos, LDAP
End-User Portal Minimal login card Full app launcher & dashboard Account management console
Cold Boot Time < 1 second ~20–30 seconds ~30–45 seconds
Fit for Thin Clients Exceptional (RPi / T630) Heavy for 8GB nodes Overkill for homelab

How Forward-Auth Works with Traefik

The real reason Authelia shines in a homelab is that 95% of self-hosted apps don’t need complex OpenID Connect token handshakes; they just need Forward-Auth:

User Request: https://dashboard.home.example.com
             │
             ▼
     [ Traefik Proxy ] ─── (Forward request cookies?) ───► [ Authelia ]
             │                                                    │
       Session Valid?                                          Validated?
      ┌──────┴──────┐                                        ┌──────┴──────┐
     YES            NO                                      YES            NO
      │              │                                       │              │
      ▼              ▼                                       ▼              ▼
[ Backend App ]  [ Redirect to login ]                 [ Return 200 ]  [ Show 2FA/WebAuthn ]
  1. You visit dashboard.home.example.com.
  2. Traefik’s forward-auth middleware asks Authelia: “Is this browser session authenticated?”
  3. If yes (with 2FA / WebAuthn hardware key verification), Authelia immediately returns 200 OK. Traefik transparently forwards the traffic to your backend container.
  4. If no, Authelia redirects you to the login screen. Once you authenticate, you are seamlessly redirected back to your app.

Wildcard SSL & Private DNS (10.0.X.X)

For single sign-on cookies to work across your entire homelab, all apps must share a single root domain (e.g., *.home.example.com).

Instead of installing custom self-signed root certificates on every device in the house:

  1. DNS-01 Challenge: Traefik uses Cloudflare’s API to solve Let’s Encrypt challenges without opening any inbound ports on the router.
  2. Wildcard Cert: Let’s Encrypt issues a trusted wildcard cert for *.home.example.com (with a local CA fallback for offline networks).
  3. Internal Resolution: The public internet never knows my internal IPs. My local Pi-hole resolves *.home.example.com to the internal Traefik IP on the server VLAN (10.0.20.x).

Every phone and laptop gets a valid, green-padlock HTTPS connection with zero certificate warnings.


When Should You Pick Authentik Over Authelia?

While Authelia is the best choice for resource-constrained nodes, Authentik is genuinely worth considering if:

  • You share your homelab with non-technical family members and want a polished application launcher dashboard (like Heimdall or Homarr built-in).
  • You run legacy enterprise software that strictly requires SAML 2.0 authentication.
  • You need an LDAP outpost to provide credentials to network shares or older services that cannot use reverse proxy forward-auth.
  • You have plenty of RAM (16 GB+ on the host) and don’t mind running a PostgreSQL + Redis stack.

The Verdict

For a lean, power-efficient homelab running on refurbished thin clients (HP T630), Authelia is unmatched.

It lives in Git, uses less than 50 MB of RAM, survives sudden reboots without database corruption, and secures your entire service fleet with hardware 2FA in front of Traefik.