Environment Variables
Sovrium reads configuration from environment variables at startup. Set them in a .env file or your server environment. All variables are optional unless noted otherwise.
# .env # Application APP_SCHEMA='app.yaml' # Server PORT=3000 BASE_URL=http://localhost:3000 # Database DATABASE_URL=postgresql://user:password@localhost:5432/dbname # Authentication AUTH_SECRET=your-secret-key-here # Default Admin AUTH_ADMIN_EMAIL=admin@example.com AUTH_ADMIN_PASSWORD=secure-admin-password # OAuth (Google example) GOOGLE_CLIENT_ID=your-client-id GOOGLE_CLIENT_SECRET=your-client-secret # Email (SMTP) SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your-email@gmail.com SMTP_PASS=your-app-password
Application
Core application configuration. APP_SCHEMA is the primary way to provide a schema without a file argument.
Server
Server networking options for the start command.
Database
PostgreSQL connection settings. Required when using tables or authentication.
Authentication
Variables for Better Auth integration. Required when the schema defines an auth section.
Default Admin User
Optional variables to create a default admin user on first startup. All three must be set for the admin user to be created.
OAuth Providers
Credentials for each OAuth provider configured in the auth schema. Replace {PROVIDER} with the uppercase provider name.
Supported providers
Sovrium supports Google, GitHub, Microsoft, Slack, GitLab, and Facebook. For example, set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET for Google OAuth.
Email (SMTP)
SMTP configuration for sending authentication emails (verification, password reset, magic link). In development, falls back to Mailpit on localhost:1025 if SMTP_HOST is not set.
Local development
When SMTP_HOST is not configured in development mode, Sovrium automatically falls back to Mailpit (localhost:1025). Install Mailpit to view sent emails in a local web UI.
Build
Options for the build command that generates a static site.
Debug
Diagnostic and testing variables. Not needed in normal operation.