Skip to content

Configuration

Tinyauth has a very simple configuration and everything is configurable with either CLI arguments or environment variables. The available environment variables/CLI options are:

NameEnvironment VariableCLI ArgumentDescriptionDefaultRequired
PortPORT--portThe port that the API/UI listens on.3000no
AddressADDRESS--addressThe address the API/UI listens on.0.0.0.0no
App URLAPP_URL--app-urlThe URL that tinyauth uses when redirecting for authentication.-yes
SecretSECRET--secretA 32 character long key used to encrypt the cookies.-yes (except if secret file is used)
Secret FileSECRET_FILE--secret-filePath to a file containing the secret.-no
UsersUSERS--usersA comma separated list of username:hash combinations used for logging in (needs to be escaped in docker).-yes (except if users file is used)
Users FileUSERS_FILE--users-fileA file with a list of of username:hash combinations in every line (.htpasswd equivalent)-no
Cookie SecureCOOKIE_SECURE--cookie-secureSend cookie only with a secure connection (https).falseno
Github Client IDGITHUB_CLIENT_ID--github-client-idClient ID to use for Github OAuth.-no
Github Client SecretGITHUB_CLIENT_SECRET--github-client-secretClient secret to use for Github OAuth.-no
Github Client Secret FileGITHUB_CLIENT_SECRET_FILE--github-client-secret-filePath to a file containing the client secret.-no
Google Client IDGOOGLE_CLIENT_ID--google-client-idClient ID to use for Google OAuth.-no
Google Client SecretGOOGLE_CLIENT_SECRET--google-client-secretClient secret to use for Google OAuth.-no
Google Client Secret FileGOOGLE_CLIENT_SECRET_FILE--google-client-secret-filePath to a file containing the client secret.-no
Generic Client IDGENERIC_CLIENT_ID--generic-client-idClient ID to use for Generic OAuth.-no
Generic Client SecretGENERIC_CLIENT_SECRET--generic-client-secretClient secret to use for Generic OAuth.-no
Generic Client Secret FileGENERIC_CLIENT_SECRET_FILE--generic-client-secret-filePath to a file containing the client secret.-no
Generic ScopesGENERIC_SCOPES--generic-scopesComma separated list of scopes to use in Generic OAuth.-no
Generic Auth URLGENERIC_AUTH_URL--generic-auth-urlAuthentication URL to use for Generic OAuth.-no
Generic Token URLGENERIC_TOKEN_URL--generic-token-urlThe URL to use when requesting the token for Generic OAuth.-no
Generic User URLGENERIC_USER_URL--generic-user-urlThe URL to use when retrieving user information in Generic OAuth.-no
Disable ContinueDISABLE_CONTINUE--disable-continueDisables the continue screen and immediately redirects when the user logins.falseno
OAuth WhitelistOAUTH_WHITELIST--oauth-whitelistComma separated list of emails to whitelist for OAuth.
Cookie ExpiryCOOKIE_EXPIRY--cookie-expirySet cookie max age in seconds.3600no
Log LevelLOG_LEVEL--log-levelSet the log level for the logger.1no