passage

Self-hosted authentication for the home lab

One front door for every app in your home lab.

Your reverse proxy asks Passage about each request, apps that speak OAuth 2.0 and OpenID Connect ask it for a token, and one admin screen decides who gets in. Users sign in once and every app behind it trusts that identity.

One static Go binary. No CGo, no Node, no separate database service. Watch the 1:09 demo.

Passage's sign-in page: a username and password form, then Sign in with a passkey, Email me a sign-in link, Sign in with Authentik and Sign in with Keycloak.
The sign-in page, with every method an admin has enabled — light palette.

Demo

A minute of the thing itself

No slides and no mock-up: one session in the running product, from the dashboard and its search to an app’s access tab and a change of theme.

The My Apps dashboard and its search, an app’s access tab, the console, then a theme change — 1:09, silent: no speech, so no caption track.

How it works

Two doors, one identity

Most lab apps have no login of their own, or one you would rather not keep a password in. Passage meets both cases with the same accounts, the same access grants and the same audit trail.

Forward-auth, for the proxy

Nginx · Traefik · Caddy

Every request passes through Passage before it reaches the app. A 200 forwards it; a 401 or 403 sends the browser back through Passage, which asks for a sign-in or explains that this account has no access. On success the upstream receives the user's name, address, id and admin flag as headers — add one auth_request_set plus proxy_set_header pair per header you want to keep.

# nginx: put one upstream behind Passage
location /auth/ {
  internal;
  proxy_pass http://localhost:8080;
  proxy_pass_request_body off;
  proxy_set_header Content-Length "";
}

location / {
  auth_request /auth/nginx;
  error_page 401 403 = @login;

  auth_request_set $u $upstream_http_x_passage_username;
  proxy_set_header X-Passage-Username $u;
  proxy_pass http://your-upstream-service;
}

location @login {
  set $login https://auth.example.com/auth/start;
  return 302 $login?rd=$request_uri;
}
  • One block per proxy: /auth/nginx, /auth/traefik, or a plain redirect through /auth/start.
  • Covers anything the proxy can reach, including apps with no login at all.
  • Works behind an existing TLS termination; Passage never needs a public port of its own.

OIDC, for the apps that speak it

OAuth 2.0 / OIDC

Passage is a full identity provider: authorization code flow with PKCE (S256), rotating refresh tokens, discovery, JWKS, userinfo, RP-initiated logout, revocation and introspection. Grafana, Gitea, Nextcloud, Jellyfin and hundreds more connect without a plugin.

# every OIDC client needs the same endpoints
issuer       https://auth.home.example.com
discovery    /.well-known/openid-configuration
authorize    /oauth/authorize
token        /oauth/token
jwks         /.well-known/jwks.json
  • Access tokens are RS256 JWTs, so a downstream API can verify them offline against the JWKS.
  • Per-app allowed scopes and RFC 8707 audiences, both optional.
  • Revoking a token adds its jti to a denylist that introspection and userinfo honour.
  • Rotate the signing key from the console; older keys keep verifying until you retire them.

Access

Who gets in, app by app

Access is a grant, not a default. A user sees an app on their dashboard because somebody granted it, and the same grant is what forward-auth and the token endpoint check — so there is one answer to “can this person use this?” and it is stored once.

On top of grants, an app can carry a policy. Every field is optional and an empty policy means no restriction; when several are set, all of them must pass. Policies apply at the proxy, at /oauth/authorize and again at the token endpoint, so a refresh cannot slip past a rule that changed.

  • Groups and roles that belong to the app, assignable per user.
  • CIDR ranges for “only from the house”, IPv4 or IPv6.
  • Hours and days for apps that should close at night.
  • Admin only for the console-adjacent pages.
  • Step-up sign-in with prompt=login, max_age and acr_values when an app needs a fresh login.
  • Sessions a user can see, revoke one at a time, or end everywhere; an optional idle timeout.
An app's Policies tab: required group platform, required role ops, allowed CIDRs 192.168.0.0/16 and 2001:db8::/32, allowed hours 09:00-17:00, allowed days 1-5 and an Admin users only switch.
An app policy — light palette: group, role, CIDRs, hours, days, admin-only, all optional.

Sign-in

As much password as you want

Pick the methods that suit the people in the house. Each one is switched on in Settings and appears on the login page immediately, with no restart and no config file to edit.

  • Passkeys

    WebAuthn platform authenticators and hardware keys. Sign in without a password — or keep the password and let a passkey satisfy the second factor.

  • Password and TOTP

    bcrypt at a configurable cost, RFC 6238 codes enrolled by QR, single-use recovery codes, and a per-account lockout after repeated failures.

  • Magic links

    A single-use link by email for existing accounts. Unknown addresses, blocked clients and mail failures all get the same page, so the form cannot be used to find out who has an account.

  • Upstream providers

    Add Authentik, Keycloak, Google or any OIDC provider in the console. Optional auto-creation and verified-email linking; the buttons appear at once.

  • Invitations

    An admin invites an address even when public registration is off. The recipient chooses a username and password, and the account starts verified because the link proves the mailbox.

  • Email when you want it

    Optional self-registration with address verification, password reset and invitation mail through your own SMTP server — or none of it.

Identity providers in the dark palette: an Authentik row and a Keycloak row, each with its issuer URL and whether new accounts are created or linked only.
Upstream providers, reviewed in the dark palette: one row each, with the issuer and what happens on a first sign-in.

The console

Everything after first boot lives in the UI

The config file sets the listener, the public URL, the database path, the cookie shape and the keys. Users, apps, grants, policies, sign-in methods, rate limits, themes and the webhook are rows in SQLite, edited in the console and applied as soon as you save.

The authentication log: sign-ins, a passkey login, a provider login, an access denied, an MFA challenge, an OAuth token exchange and a failed password, each with user, test-net address and user agent.
The authentication log — light palette — filterable by event, outcome, user and time.
Signing keys in the dark palette: the current RSA key, an active older key and a retired one, with a Rotate key button.
Signing keys: rotate without breaking live tokens.
  • Audit log

    Every sign-in, failure, lockout, passkey, magic link, MFA and OAuth event, written once and kept for 90 days.

  • Security webhook

    Each event POSTed as JSON, optionally HMAC-signed, to whatever watches the house. Its URL, secret and timeout are read per delivery.

  • Prometheus metrics

    Authentication, session and HTTP counters plus instance gauges on /metrics, optionally behind a bearer token.

  • Read-only admin API

    /api/v1 exposes users, apps, sessions and the audit log to scripts, with revocable tokens stored as SHA-256 digests.

  • Two-factor policy

    Let people enrol on their own, or require a second factor for everyone — with single-use recovery codes to get back in.

  • Thirteen colour themes

    Set a server default and let each person choose their own under Profile. Every palette is contrast-checked, and the four light themes stay deliberately light.

Self-host

Running in a few steps

One container, or one binary, and one data volume. Put it behind the same proxy it is protecting and give it a hostname of its own.

  1. Start it

    Copy the example environment file, set PASSAGE_SERVER_BASE_URL, and bring the container up. The database is a single file in /data.

  2. Create the first admin

    A one-time setup token is printed to stdout on an empty database. Open /setup, paste it, and choose a password; the page disables itself as soon as an admin exists.

  3. Add an app and point the proxy at it

    Give the app a name, a host pattern and — if it speaks OIDC — its redirect URIs. Then add the /auth/nginx or /auth/traefik block and grant the people who should reach it.

Run one replica. The SQLite database is the only state — users, grants, sessions and signing keys all live in it — so run a single replica, not a cluster.

# docker-compose.yml
services:
  passage:
    image: ghcr.io/crueber/passage:latest
    restart: unless-stopped
    ports: ["8080:8080"]
    environment:
      PASSAGE_SERVER_BASE_URL: https://auth.example.com
      PASSAGE_SESSION_COOKIE_SECURE: "true"
    volumes: ["passage-data:/data"]
volumes:
  passage-data:
# or one static binary, no Docker
CGO_ENABLED=0 go build -o passage ./cmd/passage
cp passage.example.yaml passage.yaml   # set base_url
./passage --config passage.yaml

The image is published for amd64 and arm64. Every release also carries both Linux binaries and a SHA256SUMS.txt.