← Back to Wiki
Self-Hosting

Single Sign-On with Authentik, Authelia, Keycloak or Okta

If you already run an identity provider, Outpost can hand login off to it. Anything that speaks standard OpenID Connect discovery works, including Authentik, Authelia, Keycloak, Zitadel, Okta and Entra. It is off unless you configure it, so leaving these unset changes nothing.

At your provider

Create an OAuth2 or OIDC application:

In your .env

OIDC_ISSUER=https://auth.example.com/application/o/outpost
OIDC_CLIENT_ID=...
OIDC_CLIENT_SECRET=...
OIDC_DISPLAY_NAME=Authentik      # the button reads "Continue with Authentik"
# OIDC_SCOPES=openid profile email
# OIDC_ALLOW_SIGNUP=false        # existing members only, default is true
# OIDC_REDIRECT_URI=https://...  # only if the server sees a different host than the browser does

OIDC_ISSUER is the base URL whose /.well-known/openid-configuration your provider serves. Paste that URL into a browser to confirm you have the right one. It must be https, or localhost for testing.

Configuration is environment-only on purpose. A client secret is a deployment credential like your database URL, and putting it in a settings table would make reading instance settings enough to walk off with it.

Restart the container, then check the server agrees it is on:

curl https://chat.example.com/auth/oidc/config
# {"enabled":true,"displayName":"Authentik"}

How accounts are matched

The desktop app

Desktop sign-in opens your real browser rather than a window inside the app, so an existing provider session and your password manager both work, and you can see the provider's actual address bar. The browser returns you to the app through an outpost:// link, which the installer registers.

Two consequences worth knowing. The session token never travels in that link, only a short-lived single-use code the app exchanges. And if your desktop environment does not know the app owns the scheme, the browser will complete the login and nothing will happen, which is a packaging problem rather than a configuration one.

On mobile, use a browser for the sign-in step.

If it does not work

Keep at least one password account with owner rights. If your identity provider goes down and everybody signs in through it, nobody can administer the instance.