Skip to content

Configuration

Users and Apps

User, OIDC App, and ProxyAuth Domain management is performed in the web interface. You can view the documentation on user management on the User Management page.

To start setting up protected applications, there are multiple authentication options available. If the application supports OIDC integration you can follow the instructions in the OIDC Setup guide. For alternate authentication methods, you should follow the ProxyAuth or LDAP Server guides.

Environment Variables

VoidAuth is configurable primarily by environment variable. For sensitive values, you may alternatively use FILE__* environment variables pointing to files. For example, FILE__STORAGE_KEY=/run/secrets/storage_key reads the STORAGE_KEY value from that file. Each FILE__* variable is mutually exclusive with its regular counterpart; you cannot have both FILE__STORAGE_KEY and STORAGE_KEY defined. The available environment variables and their defaults are listed below:

App Settings

NameDefaultDescriptionRequiredRecommended
APP_URLURL of the web interface. ex. https://auth.example.com or https://example.com/auth🔴
STORAGE_KEYStorage encryption key for secret values such as keys and OIDC App Client Secrets. Must be at least 32 characters long and should be randomly generated. If you do not enter one VoidAuth will recommend one to you.🔴
STORAGE_KEY_SECONDARYSecondary storage encryption key, used when rotating the primary storage encryption key.
SESSION_DOMAIN${APP_URL} Base DomainDomain of the VoidAuth Session Cookie. This is automatically set to the Base Domain of ${APP_URL} but may be overridden here. Must be equal to or a higher level domain than ${APP_URL}
DEFAULT_REDIRECT${APP_URL}The home/landing/app url for your domain. This is where users will be redirected upon accepting an invitation, logout, or clicking the header logo when already on the auth home page.
SIGNUPfalseWhether the app allows new users to self-register themselves without invitation.
SIGNUP_REQUIRES_APPROVALtrueWhether new users who register themselves require approval by an admin. Setting this to false while SIGNUP is true enables open self-registration; use with caution! ⚠️
EMAIL_VERIFICATIONtrue if SMTP_HOST is set, otherwise falseIf true, users must have an email address and will get a verification email when changing their email address before it can be used. If you are using an email provider, this should probably be true.
MFA_REQUIREDfalseIf true, users must use a second security factor while logging in such as an Authenticator Token or Passkey
API_RATELIMIT60Rate Limit for mutating (state-changing) requests per minute per IP address. Default is 60, one per second.
ENABLE_DEBUGfalseEnables debug logging. ⚠️WARNING!⚠️ This will cause the activity of users to be printed in the logs.

App Customization

NameDefaultDescriptionRequiredRecommended
APP_TITLEVoidAuthTitle that will show on the web interface, use your own brand/app/title.
APP_PORT3000The port that app will listen on. Can also be set to a unix-socket, ex. /tmp/sock
APP_COLOR#906bc7Theme color, rgb format; ex. #xxyyzz
APP_FONTmonospaceFont used in the web interface and sent emails. Safe fonts should be used, if a font is missing it will fallback to default. Multiple font families may be chosen in fallback-font format. ex. APP_FONT: "Tahoma, Verdana, sans-serif"
CONTACT_EMAILThe email address used for 'Contact' links, which are shown on most end-user pages if this is set.

Database Settings

When using the sqlite database adapter type, no additional database connection variables are required. You will need a mounted volume to hold the generated db.sqlite file, as shown in the SQLite docker compose example above.

NameDefaultDescriptionRequiredRecommended
DB_ADAPTERpostgresAllowed values are postgres and sqlite.
DB_HOSTHost address of the database. May also be a postgres Unix Domain Socket, see node-postgres Unix Domain Socket documentation here.🔴 (unless using SQLite database)
DB_PASSWORDPassword of the database. Not used if using SQLite database.
DB_PORT5432Port of the database. Not used if using SQLite database.
DB_USERpostgresUsername used to sign into the database by the app. Not used if using SQLite database.
DB_NAMEpostgresDatabase name used to connect to the database by the app. Not used if using SQLite database.
DB_SSLfalseEnables SSL connection to the database.
DB_SSL_VERIFICATIONtrueIf DB_SSL is enabled, whether to verify the SSL certificate.

Database Migration Settings

Use the following environment variables to configure a database migration. These variables exactly mirror the DB_* environment variables and describe the connection to be made to the new database. See details on how to migrate an existing database to a new one on the Database Migration page.

NameDefaultDescriptionRequiredRecommended
MIGRATE_TO_DB_ADAPTERpostgresAllowed values are postgres and sqlite.
MIGRATE_TO_DB_HOSTHost address of the database.
MIGRATE_TO_DB_PASSWORDPassword of the database. Not used if migrating to SQLite database.
MIGRATE_TO_DB_PORT5432Port of the database. Not used if migrating to SQLite database.
MIGRATE_TO_DB_USERpostgresUsername used to sign into the database by the app. Not used if migrating to SQLite database.
MIGRATE_TO_DB_NAMEpostgresDatabase name used to connect to the database by the app. Not used if migrating to SQLite database.
MIGRATE_TO_DB_SSLfalseEnables SSL connection to the database.
MIGRATE_TO_DB_SSL_VERIFICATIONtrueIf MIGRATE_TO_DB_SSL is enabled, whether to verify the SSL certificate.

SMTP Settings

All of these settings are ✅ recommended to be set to the correct values for your email provider.

NameDefaultDescription
SMTP_HOSTSMTP Host; ex. mail.example.com
SMTP_FROMSMTP From address, should be a plain email address (ex. app@example.com). The SMTP From name will be populated with the APP_TITLE value.
SMTP_PORT587SMTP port to use.
SMTP_SECUREfalseSMTP has TLS/SSL enabled.
SMTP_USERSMTP username used to sign into email provider; ex user@example.com
SMTP_PASSSMTP password used to sign into email provider
SMTP_NOAUTHfalseDisable SMTP authentication. Useful for SMTP servers that do not require authentication, such as servers using IP whitelisting. When set to true, SMTP_USER and SMTP_PASS are not required.
SMTP_IGNORE_CERTfalseSMTP Connection will ignore invalid and self-signed certificates from SMTP providers
SMTP_TLS_CIPHERSTLS cipher to use, only set if required by your SMTP provider
SMTP_TLS_MIN_VERSIONMinimum TLS version, only set if required by your SMTP provider. Possible values are TLSv1.3, TLSv1.2, TLSv1.1, TLSv1

LDAP Settings

LDAP is disabled by default. See the LDAP Server guide for setup details and client examples.

WARNING

LDAP Server functionality is experimental.

NameDefaultDescriptionRequiredRecommended
LDAP_ENABLEDfalseEnables the read-only LDAP server.
LDAP_PORT3890Port the LDAP server listens on.
LDAP_BASE_DNdc=voidauthBase distinguished name for LDAP directory entries.
LDAP_BIND_DNcn=ldap_bind,dc=voidauthService account DN LDAP clients can bind as before searching.
LDAP_BIND_PASSWORDPassword for the LDAP service account bind DN.🔴 if LDAP_ENABLED is set.
LDAP_TLS_CERT_FILEPath to a PEM certificate file. If set, LDAP_TLS_KEY_FILE must also be set and VoidAuth listens with LDAPS.
LDAP_TLS_KEY_FILEPath to the PEM private key file for LDAP_TLS_CERT_FILE.

Misc.

NameDefaultDescriptionRequiredRecommended
PASSWORD_STRENGTH3The minimum strength of users passwords, at least 3 is recommended. Must be between 0 - 4 inclusive.
ADMIN_EMAILShourlyThe minimum duration between admin notification emails. Can be set to values like: '4 hours', '30 minutes', 'weekly', 'daily', etc. or a number in seconds. If set to 'false', admin notification emails are disabled.
DEFAULT_USER_EXPIRES_INThe default duration before a new users access will expire as shown on the Invitation page. Can be set to values like: '4 hours', '30 minutes', '1 week', '2 days', etc. or a number in seconds.

IMPORTANT

Some configuration options only work when used together. EMAIL_VERIFICATION should only be set if the SMTP_ options are also set. Likewise, SIGNUP_REQUIRES_APPROVAL does nothing unless SIGNUP is set.

Config Directory

Your own branding can be applied to the app by mounting the /app/config directory and adding files or modifying the existing files.

The logo images of the web interface can be customized by placing your own images in the mounted /app/config/branding directory. The files you can add are listed below:

NameExtension
logosvg, png
faviconsvg, png
apple-touch-iconpng

WARNING

If any custom branding images are found in the mounted /app/config/branding directory, the default VoidAuth images will not be available. You may want to make sure that custom logo, favicon, and apple-touch-icon are all added together.

For information on how to change the email templates used for invitations, password resets, email verification, etc. see the documentation page for Email Templates.

You may also add/modify the custom.css file located in the /app/config/branding directory to add your own styling to the web interface.

Customization

IMPORTANT

There are enough branding options between environment variables like APP_TITLE, APP_COLOR, and config directory customization to remove any end-user reference to VoidAuth branding. You can make it your own! Below is an example of some theming changes and light mode enabled:

Experimental

WARNING

The following configurations are not well supported or tested, but may cover additional use-cases.

Multi-Domain Protection

You can secure multiple domains you own by running multiple instances of VoidAuth using the same database. They should have the same STORAGE_KEY and DB_* variables, but may otherwise have completely different configurations. The APP_URL variables of each would cover a different domain. If the domains you were trying to secure were example.com and your-domain.net you might set the APP_URL variables like https://auth.example.com and https://id.your-domain.net. These two instances would share everything in the shared DB, including users, OIDC Apps, ProxyAuth Domains, etc.

A fork of VoidAuth by Derek Paschal — with LDAP Directory Sync.