Skip to content

Configuration

Tinyauth can be either configured with environment variables or CLI flags. The full list of configuration options is available below.

INFO

Every configuration option that has a FILE_ equivalent (e.g. USERS and USERS_FILE), allows for the FILE_ environment variable/CLI flag to be used instead of the original one.

INFO

In some configuration options like the GENERIC_SCOPES environment variable, you may need to use spaces (e.g. GENERIC_SCOPES=openid profile email). In this case you shouldn't use quotes as docker can handle the spaces.

General

NameDescriptionDefaultRequired
PORT/--portThe port the UI and API listens on.3000no
ADDRESS/--addressThe address the UI and API listens on.0.0.0.0no
APP_URL/--app-urlThe URL tinyauth uses for the redirects and the cookie domain.-yes
SECRET/--secretThe secret tinyauth uses to encrypt the cookies.-yes
USERS/--usersA comma separated list of tinyauth users.-yes
USERS_FILE/--users-fileA file containing a list of tinyauth users.-no
SECRET_FILE/--secret-fileA file containing the cookie secret.-no
COOKIE_SECURE/--cookie-secureSend cookie only with HTTPS.falseno
DISABLE_CONTINUE/--disable-continueDisable the continue screen.falseno
OAUTH_WHITELIST/--oauth-whitelistA list of usernames that are allowed to login with OAuth (can be a regex if it has the slash prefix and suffix).-no
SESSION_EXPIRY/--session-expirySet cookie and session expiry in seconds.86400no
LOG_LEVEL/--log-levelSet the log level for the app (-1 through 6).1no
APP_TITLE/--app-titleSet the login screen title.Tinyauthno
LOGIN_MAX_RETRIES/--login-max-retriesThe max retries to login after which the account gets locked.5no
LOGIN_TIMEOUT/--login-timeoutThe timeout in seconds for the locked accounts.300no
FORGOT_PASSWORD_MESSAGE/--forgot-password-messageSet a custom message for the forgot password screen.You can reset your password by changing the `USERS` environment variable."no
OAUTH_AUTO_REDIRECT/--oauth-auto-redirectAutomatically redirect to your OAuth provider on login (available options are none,github,google and generic).noneno

Github OAuth

NameDescriptionDefaultRequired
GITHUB_CLIENT_ID/--github-client-idThe Github client ID.-no
GITHUB_CLIENT_SECRET/--github-client-secretThe Github client secret.-no
GITHUB_CLIENT_SECRET_FILE/--github-client-secret-fileA file containing the Github client secret.-no

Google OAuth

NameDescriptionDefaultRequired
GOOGLE_CLIENT_ID/--google-client-idThe Google client ID.-no
GOOGLE_CLIENT_SECRET/--google-client-secretThe Google client secret.-no
GOOGLE_CLIENT_SECRET_FILE/--google-client-secret-fileA file containing the Google client secret.-no

Generic OAuth

NameDescriptionDefaultRequired
GENERIC_CLIENT_ID/--generic-client-idThe generic provider client ID.-no
GENERIC_CLIENT_SECRET/--generic-client-secretThe generic provider client secret.-no
GENERIC_CLIENT_SECRET_FILE/--generic-client-secret-fileA file containing the generic provider client secret.-no
GENERIC_AUTH_URL/--generic-auth-urlThe authentication URL for the generic provider.-no
GENERIC_TOKEN_URL/--generic-token-urlThe token URL for the generic provider.-no
GENERIC_USER_URL/--generic-user-urlThe user information URL for the generic provider.-no
GENERIC_SCOPES/--generic-scopesThe generic provider scopes.-no
GENERIC_NAME/--generic-nameThe name for the generic client button on the UI.Genericno
GENEIRC_SKIP_SSL/--generic-skip-sslIgnore self-signed certificates.falseno