Skip to content

Sign-in (Keycloak)

Fedisport signs people in with OpenID Connect. The bundled Keycloak does passwords, passkeys, two-factor and email, and lets Fedisport make accounts from invitations.

Set up by Fedisport

fedisport setup-keycloak runs on every docker compose up (the keycloak-setup service). From your settings and the name in Admin → Site it creates or updates:

  • the realm: its name on sign-in pages and emails, the Fedisport theme with your logo, passkeys, sign-in by email, no self-registration, no renaming;
  • email, when KEYCLOAK_SMTP_HOST is set;
  • the sign-in client and its addresses;
  • the account-management service account, with only the roles it needs;
  • the username rules: 3–30 characters, a-z 0-9 _ (the username is the handle).

On a new realm it also sets the password policy and brute-force protection; after that, tune them in the console. docker compose run --rm keycloak-setup fedisport setup-keycloak --check shows what it would change.

The admin console

It lives at KEYCLOAK_ADMIN_URL (by default http://localhost:8080), never on the public host: reach it through an SSH tunnel. User admin, password KEYCLOAK_ADMIN_PASSWORD.

Another provider

Any OpenID Connect provider can sign people in: set FEDISPORT_OIDC_ISSUER, FEDISPORT_OIDC_CLIENT_ID and _SECRET, and FEDISPORT_IDP_ADMIN=none. Accounts are then made at the provider by hand, and invitations are codes typed at the first sign-in.