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), then the file can be used instead of the environment variable.

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.-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

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