Environment variables

Every variable a self-hosted Doska reads from .env: what it does, and whether it is required.

AUTH_LOGIN, AUTH_PASSWORD and AUTH_SECRET are required: the server has no defaults and won't start without them. Everything else is optional.

VariableRequiredWhat it does
AUTH_LOGINyesLogin of the first admin account, created on first boot.
AUTH_PASSWORDyesThat account's first password.
AUTH_SECRETyesSigns session tokens. Generate with openssl rand -hex 32.
BASE_URLnoThis server's public origin, no trailing slash. Cookie sync works without it; MCP OAuth needs it.
WEB_PORTnoHost port the web UI is published on (default 8080).
DOCKER_IMAGE_TAGnoRelease channel: latest (stable), beta (prerelease), or an exact version.
POSTGRES_PASSWORDnoSecures the bundled Postgres.
DATABASE_URLnoPoint at your own managed Postgres; the bundled db is then ignored.
OIDC_ISSUERnoIssuer URL of your identity provider. Set it and single sign-on is on.
OIDC_CLIENT_IDwith OIDC_ISSUERClient id from the provider.
OIDC_CLIENT_SECRETwith OIDC_ISSUERClient secret from the provider.
OIDC_NAMEnoName on the sign-in button (default SSO).
OIDC_AUTO_CREATEnooff: signing in through the provider no longer creates accounts.

AUTH_LOGIN and AUTH_PASSWORD

These create one account, once, on the server's first boot. It's the admin, so it can add everyone else from the app's Accounts screen.

After that they do nothing. Editing AUTH_PASSWORD and restarting won't change the password. Use Accounts, where the admin can set anyone's, its own included. Leave the pair in .env regardless: the server won't start without it.

DOCKER_IMAGE_TAG also decides what the desktop app runs: it follows whatever version the server it syncs with runs, so beta here puts the connected desktop app on beta too.

Single sign-on

Any OpenID Connect provider: Authentik, Keycloak, Pocket ID, Google. Register Doska there as a web app with this redirect URI

<BASE_URL>/api/auth/oauth2/callback/oidc

and put the issuer URL, client id and secret into the OIDC_* variables. The issuer must serve the standard discovery document at <OIDC_ISSUER>/.well-known/openid-configuration. The sign-in page gets a Continue with SSO button, or whatever OIDC_NAME says. Passwords keep working, so the admin can always get in.

Doska asks for the openid, profile and email scopes, with PKCE, so allow those for the client. It reads three claims from the profile, each with a fallback:

ClaimUsed for
preferred_usernameThe login.
nameThe account's name. Missing, the login is used.
emailThe account's email. Missing, a placeholder built from sub is stored.

A login that is already taken gets a number appended, so the second rita becomes rita2.

First sign-in through the provider creates an account, named after the provider's username or the email's local part. It never takes over an existing one: to attach the provider to an account you already have, sign in with the password, open your account from the bottom of the sidebar and press Connect under Sign-in. OIDC_AUTO_CREATE=off makes that the only way in through the provider.