Configuration
Fluvius reads defaults from each module's _meta/defaults.py. Environment variables use the FLUVIUS_ prefix; FLUVIUS_CONFIG_FILE can point to pipe-separated INI files (the default search is base.ini|config.ini).
Essential environment variables
FLUVIUS_DB_URL=postgresql+asyncpg://user:password@localhost/app
FLUVIUS_BUS_URL=redis://localhost:6379/0
FLUVIUS_APPLICATION_SECRET_KEY=replace-me
FLUVIUS_API_BASE=/api
FLUVIUS_LOG_LEVEL=info
FLUVIUS_DB_URL falls back to DB_URL. FLUVIUS_BUS_URL falls back to BUS_URL, then legacy NATS_URL. The bus URL is shared by work queues and service transport where applicable.
Development and diagnostics
FLUVIUS_DEBUG=1
FLUVIUS_DIAGNOSTICS=1
FLUVIUS_DEBUG relaxes production security gates and must not be enabled in production. Prefer FLUVIUS_DIAGNOSTICS=1 when you only need additional diagnostics.
FastAPI and authentication
| Variable | Purpose |
|---|---|
FLUVIUS_API_BASE | Base path for framework routes; default /api |
FLUVIUS_API_ZONE | Enabled API zones |
FLUVIUS_APPLICATION_SECRET_KEY | Session/application signing secret |
FLUVIUS_SESSION_COOKIE | Session cookie name |
FLUVIUS_COOKIE_HTTPS_ONLY | Require HTTPS cookies; default true |
FLUVIUS_VALIDATE_CSRF_TOKEN | Enable CSRF validation; default true |
FLUVIUS_AUTH_REALMS_CONFIG | Authentication realm definitions |
Work queues and transport
Set FLUVIUS_WORKQ_URL to override the shared bus for Taskiq. Supported queue backends depend on installed extras and include PostgreSQL, Redis, and NATS. The framework deliberately has no in-memory work-queue fallback.
For realtime transport, configure FLUVIUS_NATS_URL or the shared bus URL. MQTT settings use FLUVIUS_MQTT_* keys.
MCP
FLUVIUS_MCP_SECRET_KEY=replace-with-a-strong-random-secret
FLUVIUS_MCP_TOKEN_AUDIENCE=mcp
FLUVIUS_MCP_TOKEN_TTL_SECONDS=900
FLUVIUS_MCP_STATELESS_HTTP=true
Authenticated MCP is the default. See the configuration reference for module-by-module settings.