Skip to content

Configuration

Tinyauth can be configured using environment variables or CLI flags. The table below provides a comprehensive list of configuration options.

EnvironmentFlagDescriptionDefault
TINYAUTH_APPURL--appurlThe base URL where the app is hosted.
EnvironmentFlagDescriptionDefault
TINYAUTH_DATABASE_PATH--database.pathThe path to the database, including file name../tinyauth.db
EnvironmentFlagDescriptionDefault
TINYAUTH_ANALYTICS_ENABLED--analytics.enabledEnable periodic version information collection.true
EnvironmentFlagDescriptionDefault
TINYAUTH_RESOURCES_ENABLED--resources.enabledEnable the resources server.true
TINYAUTH_RESOURCES_PATH--resources.pathThe directory where resources are stored../resources
EnvironmentFlagDescriptionDefault
TINYAUTH_SERVER_PORT--server.portThe port on which the server listens.3000
TINYAUTH_SERVER_ADDRESS--server.addressThe address on which the server listens.0.0.0.0
TINYAUTH_SERVER_SOCKETPATH--server.socketpathThe path to the Unix socket.
EnvironmentFlagDescriptionDefault
TINYAUTH_AUTH_IP_ALLOW--auth.ip.allowList of allowed IPs or CIDR ranges.
TINYAUTH_AUTH_IP_BLOCK--auth.ip.blockList of blocked IPs or CIDR ranges.
TINYAUTH_AUTH_USERS--auth.usersComma-separated list of users (username:hashed_password).
TINYAUTH_AUTH_USERSFILE--auth.usersfilePath to the users file.
TINYAUTH_AUTH_SECURECOOKIE--auth.securecookieEnable secure cookies.false
TINYAUTH_AUTH_SESSIONEXPIRY--auth.sessionexpirySession expiry time in seconds.86400
TINYAUTH_AUTH_SESSIONMAXLIFETIME--auth.sessionmaxlifetimeMaximum session lifetime in seconds.0
TINYAUTH_AUTH_LOGINTIMEOUT--auth.logintimeoutLogin timeout in seconds.300
TINYAUTH_AUTH_LOGINMAXRETRIES--auth.loginmaxretriesMaximum login retries.3
TINYAUTH_AUTH_TRUSTEDPROXIES--auth.trustedproxiesComma-separated list of trusted proxy addresses.
EnvironmentFlagDescriptionDefault
TINYAUTH_APPS_[NAME]_CONFIG_DOMAIN--apps.[name].config.domainThe domain of the app.
TINYAUTH_APPS_[NAME]_USERS_ALLOW--apps.[name].users.allowComma-separated list of allowed users.
TINYAUTH_APPS_[NAME]_USERS_BLOCK--apps.[name].users.blockComma-separated list of blocked users.
TINYAUTH_APPS_[NAME]_OAUTH_WHITELIST--apps.[name].oauth.whitelistComma-separated list of allowed OAuth groups.
TINYAUTH_APPS_[NAME]_OAUTH_GROUPS--apps.[name].oauth.groupsComma-separated list of required OAuth groups.
TINYAUTH_APPS_[NAME]_IP_ALLOW--apps.[name].ip.allowList of allowed IPs or CIDR ranges.
TINYAUTH_APPS_[NAME]_IP_BLOCK--apps.[name].ip.blockList of blocked IPs or CIDR ranges.
TINYAUTH_APPS_[NAME]_IP_BYPASS--apps.[name].ip.bypassList of IPs or CIDR ranges that bypass authentication.
TINYAUTH_APPS_[NAME]_RESPONSE_HEADERS--apps.[name].response.headersCustom headers to add to the response.
TINYAUTH_APPS_[NAME]_RESPONSE_BASICAUTH_USERNAME--apps.[name].response.basicauth.usernameBasic auth username.
TINYAUTH_APPS_[NAME]_RESPONSE_BASICAUTH_PASSWORD--apps.[name].response.basicauth.passwordBasic auth password.
TINYAUTH_APPS_[NAME]_RESPONSE_BASICAUTH_PASSWORDFILE--apps.[name].response.basicauth.passwordfilePath to the file containing the basic auth password.
TINYAUTH_APPS_[NAME]_PATH_ALLOW--apps.[name].path.allowComma-separated list of allowed paths.
TINYAUTH_APPS_[NAME]_PATH_BLOCK--apps.[name].path.blockComma-separated list of blocked paths.
TINYAUTH_APPS_[NAME]_LDAP_GROUPS--apps.[name].ldap.groupsComma-separated list of required LDAP groups.
EnvironmentFlagDescriptionDefault
TINYAUTH_OAUTH_WHITELIST--oauth.whitelistComma-separated list of allowed OAuth domains.
TINYAUTH_OAUTH_AUTOREDIRECT--oauth.autoredirectThe OAuth provider to use for automatic redirection.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_CLIENTID--oauth.providers.[name].clientidOAuth client ID.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_CLIENTSECRET--oauth.providers.[name].clientsecretOAuth client secret.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_CLIENTSECRETFILE--oauth.providers.[name].clientsecretfilePath to the file containing the OAuth client secret.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_SCOPES--oauth.providers.[name].scopesOAuth scopes.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_REDIRECTURL--oauth.providers.[name].redirecturlOAuth redirect URL.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_AUTHURL--oauth.providers.[name].authurlOAuth authorization URL.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_TOKENURL--oauth.providers.[name].tokenurlOAuth token URL.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_USERINFOURL--oauth.providers.[name].userinfourlOAuth userinfo URL.
TINYAUTH_OAUTH_PROVIDERS_[NAME]_INSECURE--oauth.providers.[name].insecureAllow insecure OAuth connections.false
TINYAUTH_OAUTH_PROVIDERS_[NAME]_NAME--oauth.providers.[name].nameProvider name in UI.
EnvironmentFlagDescriptionDefault
TINYAUTH_OIDC_PRIVATEKEYPATH--oidc.privatekeypathPath to the private key file, including file name../tinyauth_oidc_key
TINYAUTH_OIDC_PUBLICKEYPATH--oidc.publickeypathPath to the public key file, including file name../tinyauth_oidc_key.pub
TINYAUTH_OIDC_CLIENTS_[NAME]_CLIENTID--oidc.clients.[name].clientidOIDC client ID.
TINYAUTH_OIDC_CLIENTS_[NAME]_CLIENTSECRET--oidc.clients.[name].clientsecretOIDC client secret.
TINYAUTH_OIDC_CLIENTS_[NAME]_CLIENTSECRETFILE--oidc.clients.[name].clientsecretfilePath to the file containing the OIDC client secret.
TINYAUTH_OIDC_CLIENTS_[NAME]_TRUSTEDREDIRECTURIS--oidc.clients.[name].trustedredirecturisList of trusted redirect URIs.
TINYAUTH_OIDC_CLIENTS_[NAME]_NAME--oidc.clients.[name].nameClient name in UI.
EnvironmentFlagDescriptionDefault
TINYAUTH_UI_TITLE--ui.titleThe title of the UI.Tinyauth
TINYAUTH_UI_FORGOTPASSWORDMESSAGE--ui.forgotpasswordmessageMessage displayed on the forgot password page.You can change your password by changing the configuration.
TINYAUTH_UI_BACKGROUNDIMAGE--ui.backgroundimagePath to the background image./background.jpg
TINYAUTH_UI_WARNINGSENABLED--ui.warningsenabledEnable UI warnings.true
EnvironmentFlagDescriptionDefault
TINYAUTH_LDAP_ADDRESS--ldap.addressLDAP server address.
TINYAUTH_LDAP_BINDDN--ldap.binddnBind DN for LDAP authentication.
TINYAUTH_LDAP_BINDPASSWORD--ldap.bindpasswordBind password for LDAP authentication.
TINYAUTH_LDAP_BASEDN--ldap.basednBase DN for LDAP searches.
TINYAUTH_LDAP_INSECURE--ldap.insecureAllow insecure LDAP connections.false
TINYAUTH_LDAP_SEARCHFILTER--ldap.searchfilterLDAP search filter.(uid=%s)
TINYAUTH_LDAP_AUTHCERT--ldap.authcertCertificate for mTLS authentication.
TINYAUTH_LDAP_AUTHKEY--ldap.authkeyCertificate key for mTLS authentication.
TINYAUTH_LDAP_GROUPCACHETTL--ldap.groupcachettlCache duration for LDAP group membership in seconds.900
EnvironmentFlagDescriptionDefault
TINYAUTH_LOG_LEVEL--log.levelLog level (trace, debug, info, warn, error).info
TINYAUTH_LOG_JSON--log.jsonEnable JSON formatted logs.false
TINYAUTH_LOG_STREAMS_HTTP_ENABLED--log.streams.http.enabledEnable this log stream.true
TINYAUTH_LOG_STREAMS_HTTP_LEVEL--log.streams.http.levelLog level for this stream. Use global if empty.
TINYAUTH_LOG_STREAMS_APP_ENABLED--log.streams.app.enabledEnable this log stream.true
TINYAUTH_LOG_STREAMS_APP_LEVEL--log.streams.app.levelLog level for this stream. Use global if empty.
TINYAUTH_LOG_STREAMS_AUDIT_ENABLED--log.streams.audit.enabledEnable this log stream.false
TINYAUTH_LOG_STREAMS_AUDIT_LEVEL--log.streams.audit.levelLog level for this stream. Use global if empty.