Developer docs
Configuration reference
Settings are read from the environment and from api/.env. All are prefixed STRATL_ except where noted. api/.env.example in the backend repository is the same list with comments and no values.
| Variable | Default | Meaning |
|---|---|---|
ENV |
local |
local, test, staging or production. Staging and production turn on secure cookies, hide codes from the screen, and refuse the default secret key |
DATABASE_URL |
local Postgres stratl_dev |
The async SQLAlchemy URL. On Railway, ${{Postgres.DATABASE_URL}} |
LOG_LEVEL |
INFO |
Structured logs; never content |
WEB_ORIGIN |
http://localhost:5173 |
The browser origin allowed to call the API with cookies (local CORS only) |
PUBLIC_URL |
unset | Where verifiers reach the API; written into records as custody.key_id_url |
Custody
Section titled “Custody”| Variable | Default | Meaning |
|---|---|---|
CUSTODY_BACKEND |
local |
local (a key file and folders under CUSTODY_DIR) or s3-kms |
CUSTODY_DIR |
.stratl-custody |
Local backend folder |
DEFAULT_TENANT |
local |
The workspace used when authentication is off (tests) |
ARTIFACT_MAX_BYTES |
5 MiB | Largest original accepted |
MAX_BODY_BYTES |
1 MiB | Largest request body for records and every other write, refused before authentication (413 request_too_large) |
OTLP_MAX_BODY_BYTES |
8 MiB | Largest OTLP/JSON batch |
INGEST_RATE_LIMIT_ENABLED |
true |
Per-key and per-address token buckets on /v1/ingest/* and /v1/artifacts/* |
INGEST_KEY_PER_MINUTE, INGEST_KEY_BURST |
600, 120 | Sustained rate and burst per ingest key (or per signed-in person) |
INGEST_IP_PER_MINUTE, INGEST_IP_BURST |
1200, 240 | Sustained rate and burst per client address |
ALERT_EMAILS |
empty | Comma-separated addresses the watchdog emails through Resend when a health check fails, repeats, or recovers |
ALERT_WEBHOOK_URL |
unset | A URL that receives Slack-compatible JSON for the same events |
ALERT_AFTER_SECONDS |
90 | How long a check must fail before anyone is told |
ALERT_REPEAT_MINUTES |
60 | How often a standing problem is repeated |
TIMESTAMP_GRACE_MINUTES |
30 | A checkpoint without an RFC 3161 time for longer than this fails the timestamps check |
ERROR_RATE_WINDOW_SECONDS, ERROR_RATE_THRESHOLD |
300, 10 | Server errors in the window that fail the errors check |
SENTRY_DSN |
unset | Unhandled exceptions to Sentry, without bodies or personal data. Unset sends nothing |
TRUST_FORWARDED_FOR |
true |
Take the caller’s address from the first X-Forwarded-For entry (Railway, Vercel). Off when the API is reached directly |
CUSTODY_REGIONS |
empty | name=aws-region:bucket,… mapping sign-up regions to buckets; only listed regions are offered at sign-up |
AWS_REGION, S3_BUCKET, S3_PREFIX |
ap-south-1, unset, empty |
The single default placement when CUSTODY_REGIONS is empty |
KMS_ALIAS_PREFIX |
stratl |
KMS aliases are alias/<prefix>-<workspace> |
CHECKPOINT_INTERVAL_SECONDS |
3600 | Seal when the oldest pending record is this old |
CHECKPOINT_MAX_RECORDS |
1000 | Or when this many are pending |
TSA_URL |
freetsa.org, then DigiCert | Comma-separated RFC 3161 authorities, tried in order. Empty disables timestamping (tests only) |
CUSTODY_REPLICATE_BATCH |
200 | Records copied per tick after taking custody |
STRATL_AWS_ACCOUNT_ID, GCP_SERVICE_ACCOUNT, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET |
unset | The identities customers grant for bring-your-own custody, shown in the portal |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY (no prefix) |
unset | Read by the AWS SDK for managed custody |
Scheduler and connectors
Section titled “Scheduler and connectors”| Variable | Default | Meaning |
|---|---|---|
SYNC_ENABLED |
true |
The in-process scheduler: connector runs, checkpoints, key-ledger sealing, custody replication, clean-up |
SYNC_TICK_SECONDS |
30 | How often it wakes |
LANGFUSE_SECRET_KEY, ANTHROPIC_COMPLIANCE_ACCESS_KEY (no prefix) |
unset | Referenced by connectors as env:NAME; any variable name works |
Sign-in and people
Section titled “Sign-in and people”| Variable | Default | Meaning |
|---|---|---|
AUTH_MODE |
required |
off exists for the test suite only and makes every endpoint public |
SECRET_KEY |
a public default | Peppers the code hashes. Generate with openssl rand -base64 48. Changing it voids codes waiting to be used |
SESSION_DAYS |
30 | Session lifetime |
OTP_TTL_SECONDS, OTP_MAX_ATTEMPTS, OTP_RESEND_SECONDS, OTP_MAX_PER_WINDOW |
600, 5, 60, 5 | Code rules |
INVITE_TTL_DAYS, INVITE_MAX_PENDING, INVITE_MAX_PER_HOUR |
7, 25, 20 | Invitation rules |
SIGNUP_EMAIL_POLICY |
business |
Who may create a workspace or be invited. business refuses public mailbox providers (Gmail, Outlook, Yahoo, iCloud, Proton and the like, a short list in api/app/auth/email_policy.py) and the vendored list of disposable domains (api/app/auth/data/disposable_domains.txt, refreshed with make refresh-disposable); any takes every well-formed address. Signing in to an existing account is never policed |
SIGNUP_ALLOW_DOMAINS, SIGNUP_BLOCK_DOMAINS |
empty | Comma-separated domains; sub-domains count. An allowed domain skips every check (the test suite allows example.com; use it to admit one customer on a public mailbox). A blocked domain is refused under either policy |
WEBAUTHN_RP_ID, WEBAUTHN_RP_NAME |
host of WEB_ORIGIN, Stratl |
The passkey relying party. The id must be the portal’s host (or a registrable parent of it); set it only when the portal is served from somewhere other than WEB_ORIGIN |
MFA_MAX_ATTEMPTS |
5 | Wrong second-step attempts a pending session may make before it is revoked |
REVERIFY_MINUTES |
15 | Keys, custody, roles and removals need a session that proved itself this recently; otherwise 403 reverification_required, and POST /v1/auth/reverify/request then POST /v1/auth/reverify refresh it |
NEW_DEVICE_EMAIL |
true |
Email the account holder when a sign-in comes from a browser-and-OS pair the account has not used, with a signed link (valid a week) that revokes every session |
SIGNUP_LIMITS_ENABLED |
true |
The abuse controls below (api/app/auth/abuse.py). Off in the test suite. The honeypot field on the sign-up forms is always on |
OTP_IP_BURST, OTP_IP_PER_HOUR |
6, 10 | Code requests per client address, whatever the intent: a burst, then a slow refill, from the same token-bucket limiter as ingest. Refused with 429 rate_limited, scope ip |
SIGNUP_CODES_PER_DOMAIN_PER_DAY |
20 | Sign-up codes per email domain per day, counted in the database. Sign-in codes are not counted. Scope domain |
SIGNUP_CODES_PER_HOUR |
200 | Sign-up codes per hour across everyone; bounds the email bill under attack. Hitting it raises the watchdog alert (once per ALERT_REPEAT_MINUTES). Scope global |
WORKSPACES_PER_IP_PER_DAY, WORKSPACES_PER_DOMAIN_PER_DAY |
3, 5 | Workspaces opened per client address and per email domain per day |
WORKSPACES_PER_DAY |
100 | Workspaces opened per day across everyone; raises the watchdog alert when hit |
SIGNUP_MX_CHECK, SIGNUP_MX_TIMEOUT_SECONDS |
true, 2 |
One DNS lookup to confirm the domain publishes mail (MX) records, cached for an hour; catches typos and made-up domains. If DNS does not answer in time the address is admitted and the miss is logged |
OTP_PURGE_HOURS, INVITE_PURGE_DAYS |
24, 30 | Clean-up of used and expired rows |
Email and drafting
Section titled “Email and drafting”| Variable | Default | Meaning |
|---|---|---|
RESEND_API_KEY, RESEND_FROM_EMAIL, RESEND_FROM_NAME (also read without prefix) |
unset, onboarding@resend.dev, Stratl |
Codes, invitations and notices. Without a key, codes are logged and, locally, shown on screen; notices are logged and marked dev_log |
NOTICE_USE_LLM |
true |
Draft notices with Claude when ANTHROPIC_API_KEY (no prefix) is set, otherwise the template |
NOTICE_MODEL |
claude-opus-5 |
The model used |
The portal
Section titled “The portal”| Variable | Meaning |
|---|---|
VITE_PUBLIC_API_URL |
Only the address printed in Get started snippets. The browser itself always calls /api, which the dev server or vercel.json forwards |
VITE_DOCS_URL |
Where the Docs icon points; defaults to https://docs.stratl.ai |