server-settings.md

May 23, 2025 ยท View on GitHub

Server Settings & Configuration

The following table lists all configurable options for a12nserver. These can be changed in the server_settings table in your database.

The value for each field is stored as a JSON string. This means that in order to store 'null', you need the literal string 'null'.
To store a string, it needs to be surrounded by double-quotes. For example, a legal value for the smpt.emailFrom field might be "info@example.org".

Some of the following server settings are also enabled as environment variables for ease of local development.

NameTypeDefault valueDescriptionEnvironment Variable
cors.allowOriginStringnullList of allowed origins that may directly talk to the server. This should only ever be 1st party, trusted domains. By default CORS is not enabled.
jwt.privateKeyStringnullThe RSA private key to sign JWT access tokens. Usually this value has the contents of a .pem file. If not set, JWT will be disabledJWT_PRIVATE_KEY
login.defaultRedirectString/The url that the user will be redirected to after the log in to a12nserver, and no other redirect_uri is provided by the application. It's a good idea to set this to your application URL.
logo_urlStringnullThe application logo to display on the a12nserver pages. If no logo url is provided, the application will show the Curveball logo by default.
oauth2.code.expiryInteger600The expiry time (in seconds) for the 'code' from the oauth2 authorization code grant typeOAUTH2_CODE_EXPIRY
oauth2.accessToken.expiryInteger600The expiry time (in seconds) for OAuth2 access token.OAUTH2_ACCESSTOKEN_EXPIRY
oauth2.refreshToken.expiryInteger3600 * 6The expiry time (in seconds) for OAuth2 refresh tokens.OAUTH2_REFRESHTOKEN_EXPIRY
registration.enabledBooleantrueAllow users to register new accounts. By default new accounts will be disabled and have no permissions.REGISTRATION_ENABLED
registration.mf.enabledBooleantrueAllow users to register new accounts. By default new accounts will be disabled and have no permissions.
smtp.urlStringnullThe url to the SMTP server. See the node-mailer documentation for possible valuesSMTP_URL
smtp.emailFromStringnullThe "from" address that should be used for all outgoing emailsSMTP_EMAIL_FROM
totpStringenabledWhether TOTP is enabled. TOTP uses authenticator apps like Google Authenticator and Authy. This can be set to "enabled", "disabled", and "required"
totp.serviceNameStringa12n-server APIThe name of the application that should show up in authenticator apps
webauthnStringenabledWhether webauthn is "enabled", "disabled" or "required".'
webauthn.serviceNameStringa12n-serverThe service name that should appear in Webauthn dialogs.
webauthn.expectedOriginStringnullThe "origin" of this server. This must be set for webauthn to work
webauthn.relyingPartyIdStringnullThe origin of the application performing the login.