Skip to main content

Configuration

All settings are in the file .env next to the docker-compose.yml. A commented template is in the repository as .env.example. After a change: docker compose up -d (the affected containers are recreated).

Addresses​

VariableMeaning
DOMAINPublic address without https://, e.g. study.example.org
SITE_URLWith scheme, e.g. https://study.example.org; no / at the end
API_EXTERNAL_URLWhere browsers and Claude reach the sign-in: SITE_URL + /auth/v1. Also the issuer (iss) of the tokens
ADMIN_EMAILAddress of the first admin

Secrets​

Created by the script setup.mjs. Never share them between installations or put them in a repository.

VariableMeaning
POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_PORTDatabase
JWT_SECRET, JWT_KEYS, JWT_EXPIRYSignature of the sign-in tokens (JWT_EXPIRY in seconds)
ANON_KEY, SERVICE_ROLE_KEYAccess keys for the sign-in, derived from JWT_SECRET
APP_SECRETEncrypts what the app stores for users (e.g. API keys)
BACKUP_PASSPHRASEEncrypts the nightly backups. Without it there are no backups; without a copy of it they cannot be read

Behaviour​

VariableDefaultMeaning
TZEurope/BerlinTime zone for tasks, calendar and the backup time
LOG_LEVELwarndebug, info, warn or error
RATE_LIMIT_SCALE–Loosens the request limits (only needed for tests)

Reachability​

VariableDefaultMeaning
BIND_ADDRESS127.0.0.1The address on which the host opens the port. If your proxy runs on another machine, set 0.0.0.0 and protect the port with a firewall
HTTP_PORT8080The port of the web container on the host
TRUSTED_PROXIESprivate_rangesAddresses or ranges of your proxy, which the app believes about who the visitor is (X-Forwarded-For). The default trusts proxies from private networks

Storage​

Without a setting, Docker keeps documents/backups (study-data) and the database (study-db) in named volumes. If you want to use folders on the host:

VariableMeaning
DATA_DIRFolder for uploads, backups and the search model. Must belong to the user with the ID 1000: chown -R 1000:1000 /path
DB_DIRFolder for the database (PostgreSQL sets the permissions itself)

Mail (optional)​

Without mail, the app shows the admin invitation and recovery links to pass on. With mail, it sends them itself:

VariableMeaning
SMTP_HOST, SMTP_PORTYour mail server (default port 587)
SMTP_USER, SMTP_PASSCredentials

The mails go out in the recipient's language (English or German). The texts come from the app; their subjects are set in docker-compose.yml (GOTRUE_MAILER_SUBJECTS_*) and pick the language themselves. Leave these lines as they are; if you changed them, keep the {{ if … }} conditions.

The sender is noreply@<DOMAIN>; your mail provider must allow the domain for that (set up SPF/DKIM).

Images​

VariableDefaultMeaning
STUDY_VERSIONlatestWhich version runs, e.g. 0.2.1. Recommended: a fixed version, updated deliberately
STUDY_IMAGE_PREFIXdocker.io/erik1gWhich registry the images come from (for your own builds or mirrors)