Login and Sessions
[auth] in config.toml
Section titled “[auth] in config.toml”[auth]jwt_secret = "<random secret generated on first startup>"share_cookie_secret = "<random secret generated on first startup>"direct_link_secret = "<random secret generated on first startup>"mfa_secret_key = "<random secret generated on first startup>"storage_credential_secret_key = "<random secret generated on first startup>"webdav_auth_cache_secret = "<random secret generated on first startup>"password_hash_max_concurrency = 2bootstrap_insecure_cookies = falsejwt_secret
Section titled “jwt_secret”When the configuration is generated for the first time, the service writes a random secret. You can think of it as the “site-wide login signing secret”.
share_cookie_secret
Section titled “share_cookie_secret”This is the HMAC secret for public-share password verification cookies. Changing it invalidates already verified share-password cookies, so users must enter the share password again.
direct_link_secret
Section titled “direct_link_secret”This is the HMAC secret for public direct links, preview links, and share streaming sessions. Changing it invalidates existing direct links and short-lived preview / streaming session tokens, so links must be regenerated.
mfa_secret_key
Section titled “mfa_secret_key”This is the server-side encryption key for MFA/TOTP secrets. When the configuration is generated for the first time, the service automatically writes a random value.
storage_credential_secret_key
Section titled “storage_credential_secret_key”This is the server-side encryption master key for the Microsoft Graph credentials (Client Secret, access token, refresh token) used by OneDrive storage policies. When the configuration is generated for the first time, the service automatically writes a random value; a key derived from it encrypts the credentials at rest with AES-256-GCM, and API responses and audit logs expose only boolean state such as client_secret_configured.
webdav_auth_cache_secret
Section titled “webdav_auth_cache_secret”This is the dedicated HMAC secret for WebDAV authentication cache keys. It prevents a leaked Redis key list from exposing a directly testable SHA-256 target for valid passwords. Every Primary sharing the same Redis cache must use the same value.
Changing it makes all existing WebDAV authentication cache entries miss and repopulate after successful authentication; old keys remain only for their existing 60-second TTL. It is independent from the JWT, share-cookie, direct-link, MFA, and storage-credential secrets.
password_hash_max_concurrency
Section titled “password_hash_max_concurrency”This is the maximum number of Argon2 password hashing or verification tasks that each AsterDrive process runs at the same time. The default is 2. Argon2 runs on the blocking thread pool instead of an Actix async worker; authentication work above the limit waits asynchronously.
The current default password policy uses about 64 MiB of working memory per task, so the default limit permits about 128 MiB of concurrent Argon2 working memory per process. In a multi-Primary deployment, each process enforces its own limit. Small-memory instances can reduce it to 1; before increasing it, account for instance memory, concurrent logins, and WebDAV/MFA authentication traffic. The value must be greater than 0, and changing it requires a restart.
The service continues to verify password hashes created with the previous lower work factor. After a successful user login, WebDAV credential check, or share-password verification, it progressively upgrades the stored hash without changing the plaintext password.
bootstrap_insecure_cookies
Section titled “bootstrap_insecure_cookies”- First plain-HTTP trial run - temporarily set it to
true - Production HTTPS deployment - keep it
false
It only affects the default value written when auth_cookie_secure is initialized for the first time. If this runtime system setting already exists in the database, changing this value will not rewrite the old value. For the overall first-run flow, see First Start and the First Admin.
Common Examples
Section titled “Common Examples”Local or Intranet HTTP Trial Run
Section titled “Local or Intranet HTTP Trial Run”[auth]bootstrap_insecure_cookies = trueProduction HTTPS Deployment
Section titled “Production HTTPS Deployment”[auth]jwt_secret = "replace-with-your-own-secret"share_cookie_secret = "replace-with-share-cookie-secret"direct_link_secret = "replace-with-direct-link-secret"mfa_secret_key = "replace-with-another-stable-secret"storage_credential_secret_key = "replace-with-storage-credential-secret"webdav_auth_cache_secret = "replace-with-webdav-auth-cache-secret"bootstrap_insecure_cookies = falseEnvironment variable overrides:
ASTER__AUTH__JWT_SECRET="replace-with-your-own-secret"ASTER__AUTH__SHARE_COOKIE_SECRET="replace-with-share-cookie-secret"ASTER__AUTH__DIRECT_LINK_SECRET="replace-with-direct-link-secret"ASTER__AUTH__MFA_SECRET_KEY="replace-with-another-stable-secret"ASTER__AUTH__STORAGE_CREDENTIAL_SECRET_KEY="replace-with-storage-credential-secret"ASTER__AUTH__WEBDAV_AUTH_CACHE_SECRET="replace-with-webdav-auth-cache-secret"ASTER__AUTH__BOOTSTRAP_INSECURE_COOKIES=falseThe Settings You Actually Change Day to Day Are in the Admin Console
Section titled “The Settings You Actually Change Day to Day Are in the Admin Console”The following settings are not in config.toml; they are all maintained in the admin console:
auth_cookie_secure- Whether cookies are sent only over HTTPSauth_access_token_ttl_secs- Access token TTLauth_refresh_token_ttl_secs- Refresh token TTLauth_register_activation_ttl_secs- Registration activation link TTLauth_contact_change_ttl_secs- Email address change link TTLauth_password_reset_ttl_secs- Password reset link TTLauth_contact_verification_resend_cooldown_secs- Verification email resend cooldownauth_password_reset_request_cooldown_secs- Password reset request cooldownauth_email_code_login_enabled- Whether email-code MFA is enabledauth_email_code_login_allow_totp_fallback- Whether users with TOTP enabled may use email codes as a fallbackauth_email_code_login_ttl_secs- Email login code TTLauth_email_code_login_resend_cooldown_secs- Email login code resend cooldownauth_passkey_login_enabled- Whether users may sign in with registered Passkeysauth_allow_user_registration- Public registration switchauth_register_activation_enabled- Whether newly registered users must complete email activation firstauth_local_email_allowlist- Email addresses or exact domains allowed for local registration and local email changesauth_local_email_blocklist- Email addresses or exact domains blocked for local registration and local email changes- External authentication email verification, login email code, and related mail templates - maintained in the
Mail Deliverygroup
See runtime system settings for field details, and Registration, Login and SSO for the scenarios these switches are used in.