100% Self-HostedFree to Install, Free to Get HostedYour School, Your DataOpen Source ForeverNo Per-Student Fees, Ever100% Self-HostedFree to Install, Free to Get HostedYour School, Your DataOpen Source ForeverNo Per-Student Fees, Ever
OpenRegistro
All docs

Configuration

OpenRegistro is configured through environment variables. See apps/web/.env.example for the authoritative, always-up-to-date list - this page explains what each one does.

VariableRequiredDescription
STORAGE_DRIVERyesjson or postgres. Chosen once during the setup wizard; the installer records which driver was used.
DATA_DIRonly for jsonDirectory for JSON data files. Defaults to ./data if unset.
DATABASE_URLonly for postgresPostgres connection string. Run pnpm --filter @openregistro/db db:migrate with this set before first use.
AUTH_SECRETyesSession encryption secret for Auth.js. Generate with openssl rand -base64 32. Rotating it invalidates all existing sessions.
AUTH_URLrecommended behind a proxyPublic base URL of the deployment. Auth.js can often infer it from request headers, but setting it explicitly avoids surprises behind reverse proxies/load balancers.
NODE_ENVnodevelopment, production, or test. Set automatically by the relevant pnpm/Docker commands.
SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASSWORD / SMTP_FROMnoReference only. The live SMTP configuration is entered through the setup wizard's SMTP step (or a future settings screen) and stored via the active storage driver, not read from these env vars at runtime - see apps/web/lib/mailer.ts. Leaving SMTP unset disables outgoing email; the app still works, the wizard step can be skipped.

Storage driver selection

STORAGE_DRIVER is fixed for the lifetime of a deployment through normal use - there is no in-app toggle to switch drivers live, because the two drivers' data directories/databases are entirely separate. To move from json to postgres, use the migration script described in Backups, then change STORAGE_DRIVER (and add DATABASE_URL) and restart the app.

Secrets

Never commit real values for AUTH_SECRET, DATABASE_URL, or SMTP_PASSWORD to version control. .env files are gitignored; use your deployment platform's secret management (Docker Compose .env file, a secrets manager, etc.) in production.

Found an issue with this page? Edit it on GitHub.