Configuration
YearRoll reads configuration from the environment. With Docker Compose, put values in .env next to docker-compose.yml. Sample values in .env.example are for a local trial. Replace them before a school relies on the instance.
Core variables
Section titled “Core variables”| Variable | Required | Purpose |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string for this school. |
POSTGRES_PASSWORD |
Yes, for Compose | Password for the Compose Postgres service. Compose builds the web service DATABASE_URL from it. |
AUTH_SECRET |
Yes | Signs Auth.js cookies. Also encrypts staff authenticator secrets. Use 32 characters or more. |
SETUP_SECRET |
For /setup |
Secret entered on first-run setup. At least 16 characters. Not used once an admin exists. |
SEED_PASSWORD |
For the demo seed | Password for demo accounts. At least 12 characters. Do not set this on a production school unless you intend to run the seed. |
APP_URL |
Public URL | The URL staff and parents use. Local Compose defaults to http://127.0.0.1:3456. |
NEXTAUTH_URL |
Public URL | Auth.js canonical URL. Set it to the same value as APP_URL. |
Inside Compose, the web service uses host db in DATABASE_URL. From a process on the host, the published database is 127.0.0.1:5432, as in .env.example.
Compose also sets AUTH_TRUST_HOST=true so Auth.js accepts the host forwarded to the container.
Changing AUTH_SECRET changes cookie signing and the key that wraps authenticator secrets. Plan a staff re-enrollment if you rotate it.
Outbound email
Section titled “Outbound email”Parent invites need mail the school controls. A school admin sets the outbound provider on the Email page in the app.
Passwords and API keys saved on that page are encrypted with SETTINGS_ENCRYPTION_KEY (32 characters or more). Generate a key with openssl rand -base64 32 and store it with the other production secrets. Do not commit a real key.
If the Email page has no saved provider, YearRoll can fall back to these variables:
| Variable | Purpose |
|---|---|
MAIL_FROM |
From address, for example YearRoll <noreply@your-school.example>. |
SMTP_HOST |
SMTP server hostname. |
SMTP_PORT |
SMTP port, commonly 587. |
SMTP_USER |
SMTP username, when the server requires one. |
SMTP_PASSWORD |
SMTP password. |
SMTP_SECURE |
true or false, depending on the server. |
Without a saved provider and without these variables, production will not fall back to a copy-paste invite link. Configure mail before you invite parents.
Next: API.