Skip to content

Configuration

Configuration is one YAML file, read once at boot. CONFIG_PATH points at it; the default in the container is /app/config/auth.config.yaml.

version: 1
branding:
name: ownauth
accent: "#171717"
accentDark: null
database:
mode: dedicated # or: schema
schema: auth # required when mode is schema
auth:
emailPassword:
enabled: true
requireEmailVerification: false
session:
expiresIn: 604800 # 7 days
updateAge: 86400 # refresh once a day
plugins:
organization: { ... }
admin: { ... }
twoFactor: { ... }
passkey: true
apiKey: true
jwt: true
openAPI: true
email:
provider: console # console | smtp | resend
ui:
preview: true
Mode Auth tables Join with your tables
dedicated (default) their own database no
schema a schema in your database yes, one query

mode: schema requires schema:, and refuses public — dumping auth tables into an application’s public schema is a collision waiting to happen. The schema is created at boot.

requireEmailVerification: true with email.provider: console is rejected at load time: no mail is sent, so every account would be stranded.

auth.social takes provider credentials; the keys present determine which buttons the components render.

A closed whitelist. An unknown key fails boot with the list of supported ones, because a silently ignored security option is worse than a crash.

Option Effect
teams enable teams inside organizations
allowUserToCreateOrganization whether members can create organizations
membershipLimit members per organization; absent means unlimited
invitationExpiresIn invitation lifetime, in seconds
dynamicAccessControl owners can create and edit roles at runtime
accessControl the permission vocabulary runtime roles are expressed in
roles overrides for the derived owner/admin/member grants

adminRoles decides who may open the console (default ["admin"]); defaultRole is assigned at sign-up; impersonationSessionDuration caps impersonated sessions.

Provider Behaviour
console prints the link to the container log. Development only.
smtp requires host, port, from; credentials via SMTP_USER / SMTP_PASSWORD
resend requires from and RESEND_API_KEY in the environment

preview: true exposes /auth/* and /profile for development and demos. A real deployment turns it off and ships those screens inside the customer’s app.

The console’s Settings page writes this file, validated by the same parser that guards boot, with the previous version kept as auth.config.yaml.bak. It takes effect on restart.

The container runs as uid 1000, so the config directory must be writable by that user:

Terminal window
chown -R 1000:1000 config/

Without it the page says so and behaves as a viewer instead of pretending to save.

Variable Required Purpose
DATABASE_URL yes Postgres connection
BETTER_AUTH_SECRET yes signs sessions, encrypts JWKS keys
BASE_URL yes public origin; issuer and audience of tokens
TRUSTED_ORIGINS yes comma-separated browser origins allowed to call the API
CONFIG_PATH no defaults to /app/config/auth.config.yaml
BOOTSTRAP_ADMIN_EMAIL / _PASSWORD no create an administrator at boot
APP_VERSION no shown in health and the console
PORT no defaults to 3000