Self-hosted knowledge keeper for 3D printing projects
Overview
Refer to the API reference for endpoints: docs/api-reference.md.
/admin/settings./api/v1/auth/oauth/oidc/authorize.This is the required setup path for homelab installs.
This walkthrough uses Authentik 2024.x and homelab-friendly examples. Replace auth.example.com and 3dkenji.example.com with your hosts.
3DKenji (display name for administrators)Authorization Code (do not use implicit)Confidentialhttps://3dkenji.example.com/api/v1/auth/oauth/oidc/callbackopenid email profile3DKenji3dkenjihttps://auth.example.com/application/o/3dkenji/
/admin/settings and fill in the OAuth / OIDC Configuration form:
oidchttps://auth.example.com/application/o/3dkenji/<from Authentik><from Authentik>https://3dkenji.example.com/api/v1/auth/oauth/oidc/callbackopenid email profilehttps://3dkenji.example.com/api/v1/auth/oauth/oidc/authorize in your browser. You should be redirected to Authentik’s login page and back to 3DKenji after authentication.confidential access, set redirect URI as above, enable openid scope.openid email profile scopes are allowed..well-known/openid-configuration URL resolves and use the provided client credentials./.well-known/openid-configuration at the issuer URL.POST /api/v1/auth/oauth/{provider}/link which returns an authorize_url to complete linking.DELETE /api/v1/auth/oauth/{provider}/unlink — unlinking requires a local password to already be set on the account to prevent lockout.preferred_username claim when present; otherwise a safe slug is generated.Warning: If your primary admin account is OIDC-only and the identity provider becomes unavailable, you may lose administrative access. Set a local recovery password immediately after enabling OIDC.
POST /api/v1/auth/admin/recovery-login using username/password.POST /api/v1/auth/admin/set-local-password with your JWT to set a local password.state values are single-use and expire after 5 minutes.SECRET_KEY.SECRET_KEY casually. If you change it, you must re-enter saved OAuth client secrets because bcrypt is not suitable here: password hashes are one-way, while OAuth client secrets must be decryptable for token exchange./admin/settings, enable OAuth / OIDC, and save the form.{provider} in the URL; default is oidc.SECRET_KEY changed.| Variable | Default | Required | Description |
|---|---|---|---|
SECRET_KEY |
dev-secret-key in dev examples |
yes | Used for JWT signing and for deriving the encryption key that protects stored OAuth client secrets. Keep it stable. |
These values are configured in /admin/settings and stored in the app_settings table:
| Setting | Required When Enabled | Description |
|---|---|---|
enabled |
yes | Turns OAuth / OIDC sign-in on or off. |
provider_name |
yes | Provider slug used in URLs, usually oidc. |
issuer_url |
yes | Provider issuer URL exposing .well-known/openid-configuration. |
client_id |
yes | OAuth client ID from the provider. |
client_secret |
yes | OAuth client secret, stored encrypted in the database. |
callback_url |
yes | Redirect URI registered with the provider. |
scopes |
no | Space-separated scopes, usually openid email profile. |
cookie_secure |
no | Marks auth cookies as Secure when HTTPS is in use. |
If something here doesn’t match your provider UI, open the provider’s application/client settings and verify the issuer, client credentials, and redirect URIs. If you need help with a specific provider, include the provider name and a sanitized copy of the .well-known/openid-configuration JSON.