docs/self-hosting/auth/providers/keycloak.mdx
Keycloak is an open-source Identity and Access Management solution.
<Steps> ### Create Client in KeycloakOpenID Connectlobechat (or any name you prefer)In the client Settings tab:
<Callout type={'info'}> Callback URL format:
- Local development: `http://localhost:3210/api/auth/callback/keycloak`
- Production: `https://your-domain.com/api/auth/callback/keycloak`
Go to the Credentials tab and copy the Client secret.
The issuer URL format: https://your-keycloak-domain/realms/your-realm
For example: https://keycloak.example.com/realms/master
| Environment Variable | Type | Description |
|---|---|---|
AUTH_SECRET | Required | Session encryption key, generate with openssl rand -base64 32 |
AUTH_SSO_PROVIDERS | Required | Set to keycloak |
AUTH_KEYCLOAK_ID | Required | Client ID |
AUTH_KEYCLOAK_SECRET | Required | Client Secret |
AUTH_KEYCLOAK_ISSUER | Required | https://your-keycloak-domain/realms/your-realm |
<Callout type={'tip'}> Go to 📘 Environment Variables for detailed information. </Callout> </Steps>
<Callout type={'info'}> After successful deployment, users will be able to authenticate with Keycloak and use LobeHub. </Callout>