Skip to content
Live demo

Environment variables

The repository’s .env.example file is the canonical configuration reference.

VariableRequiredDescription
DATABASE_URLOutside demo modePostgreSQL connection string.
BETTER_AUTH_SECRETOutside demo modeRandom secret used by Better Auth. Generate at least 32 bytes.
APP_URLYes for email linksPublic application origin, including http:// or https://.
BETTER_AUTH_URLDeployed authOrigin Better Auth uses for verification links.
VariableDefaultDescription
ALLOW_REGISTRATIONfalseAllows public signup after the first account when set to true. A valid invitation still works when false.
WORKSPACE_CREATION_POLICYowner-onlyUse all-users to let every registered account create workspaces.

The first account can register even when ALLOW_REGISTRATION=false. That account becomes the instance owner.

Set at least one provider key to enable Spark AI:

VariableProvider
OPENAI_API_KEYOpenAI
AI_GATEWAY_API_KEYVercel AI Gateway
OPENROUTER_API_KEYOpenRouter

AI_DEFAULT_MODEL can select a model ID from src/config/ai-models.json. DISABLE_AI=true disables Spark AI for the whole instance.

Use Resend or SMTP. Set EMAIL_FROM for either route.

VariableDescription
RESEND_API_KEYResend credential.
SMTP_HOST, SMTP_PORTSMTP server.
SMTP_USER, SMTP_PASSSMTP credentials.
SMTP_SECURE, SMTP_IGNORE_TLSSMTP transport controls.

Without an email provider, verification, invitation, and password-reset messages cannot reach users.

Set VITE_DEMO_MODE before building and keep the same value at runtime:

VITE_DEMO_MODE=true

Demo mode ignores DATABASE_URL, uses rss-demo.db, bypasses auth, seeds sample content, and blocks mutations.