Skip to content

Configuration ​

Statora is configured with environment variables, all prefixed with STATORA_. When you run it outside a container, it also reads a .env file from the working directory.

Settings ​

VariableDefaultDescription
STATORA_DATABASE_URLpostgresql+asyncpg://statora:statora@localhost:5432/statoraPostgreSQL connection. Keep the +asyncpg driver part.
STATORA_REDIS_URLredis://localhost:6379/0Redis connection.
STATORA_SECRET_KEY—Required. Signs sessions and encrypts identity-provider secrets. Use a long random value and keep it stable.
STATORA_BASE_URLhttp://localhost:8000Public URL, used to build OIDC and SAML callback URLs.
STATORA_SECURE_COOKIESfalseMark the session cookie Secure. Turn on behind HTTPS.
STATORA_ROLEallall, web (UI + API only) or worker (checks only). The same image does all three.
STATORA_HOST / STATORA_PORT0.0.0.0 / 8000Listen address.
STATORA_HEARTBEAT_RETENTION_DAYS30How long raw check results are kept. Minute and hour uptime bars need at least 5 days. Daily rollups (the daily bars) are kept indefinitely.
STATORA_PAGE_CACHE_TTL30Seconds a status page summary stays cached. Changes clear it immediately.
STATORA_SESSION_MAX_AGE43200Admin session lifetime in seconds (12 h).
STATORA_DISABLE_LOCAL_LOGINfalseHide password login for everyone except local admins, for SSO-only setups.
STATORA_LOGIN_RATE_LIMIT10Login attempts allowed per IP address and per username…
STATORA_LOGIN_RATE_WINDOW300…within this many seconds.
FORWARDED_ALLOW_IPS* in the imageProxies whose X-Forwarded-* headers are trusted.

Compose-only variables, read by docker-compose.yml and not by the app:

VariableDefault
POSTGRES_PASSWORD—Password for the bundled PostgreSQL.
STATORA_VERSIONlatestImage tag to run.
STATORA_HTTP_PORT8000Published port, for example 127.0.0.1:8000.

Command line ​

The statora command is available inside the container:

Command
statora serve [--no-migrate]Start the server; this is the container's default command.
statora migrateApply database migrations.
statora create-adminCreate a local admin, or reset its password.
statora seedAdd demo monitors, groups and a status page at /s/demo.
statora init [--seed]Migrate, create an admin and optionally add demo data, in one step.
statora devDevelopment server with auto-reload.

Health endpoint ​

GET /healthz returns 200 with {"status":"ok","database":"ok","redis":"ok","scheduler":"leader|standby|off"}, or 503 if PostgreSQL or Redis can't be reached.