temetro is in beta and under active development. Expect things to change.
temetro

Configuration

Every environment variable temetro reads, in one table.

temetro is configured through environment variables. In Docker setups a .env is optional — the backend generates any missing secrets on first start (see below). Create backend/.env (from backend/.env.example) only to override defaults.

Environment variables

Backend

VariableRequiredDescription
BETTER_AUTH_SECRETAutoSecret key for signing sessions. Auto-generated and persisted if unset (Docker). Set your own to control it; changing it signs everyone out.
AI_CREDENTIALS_KEYAutoKey used to encrypt stored AI provider API keys at rest. Auto-generated and persisted if unset (Docker). Changing it invalidates saved provider keys (they must be re-entered).
DATABASE_URLYesPostgreSQL connection string. The Docker default (postgres://temetro:temetro@db:5432/temetro) points at the bundled database.
BETTER_AUTH_URLYesPublic URL of the backend (default http://localhost:4000). An https:// URL switches session cookies to secure mode.
FRONTEND_URLYesPublic URL of the app (default http://localhost:3000). Used for CORS and for links in emails.
PORTNoPort the API listens on (default 4000).
POSTGRES_PORTNoHost port for the bundled Postgres (default 5432). Change it if 5432 is taken.
NODE_ENVNodevelopment or production.

In Docker, auto-generated secrets are stored in the temetro_secrets volume and reused on every restart. They're only regenerated if you remove that volume (e.g. docker compose down -v).

Patient wallet relay (Temetro Network)

Required to import records from, or push updates to, patient wallet apps. Both point at your Temetro Network deployment.

VariableRequiredDescription
RELAY_URLFor walletPublic URL of your Temetro Network relay (default http://localhost:8080). Also baked into the QR a patient scans, so it must be reachable from phones.
RELAY_TOKENOptionalLegacy/optional. Clinics authenticate to the relay with their own Ed25519 signing key, so no shared secret is needed. Set it (same value on the relay) only to additionally gate a private relay behind a shared token.

Email (SMTP)

All optional. If SMTP_HOST is unset, outgoing emails (password resets, verifications, invitations) are printed to the backend logs instead of being sent.

VariableDescription
SMTP_HOSTSMTP server hostname.
SMTP_PORTSMTP port (typically 587 or 465).
SMTP_USERSMTP username.
SMTP_PASSSMTP password.
SMTP_FROMThe From header, e.g. temetro <no-reply@yourclinic.example>.

Frontend

VariableDescription
NEXT_PUBLIC_API_URLURL where the app reaches the API (default http://localhost:4000). In Docker this is set for you.

Built-in rate limits

To slow down password-guessing, the API limits authentication attempts per 60-second window:

ActionLimit
Sign in5 attempts
Sign up3 attempts
Password reset3 attempts

Sessions last one week before requiring sign-in again.

On this page