Configuration
Modulo is configured through environment variables. All config lives in a .env file in the backend/ directory.
Required
| Variable | Description |
|---|---|
DATABASE_URL |
Async PostgreSQL connection string |
SECRET_KEY |
32-byte hex key for JWT (JSON Web Token) signing |
FERNET_KEY |
Fernet-compatible key for credential encryption |
Database
DATABASE_URL=postgresql+asyncpg://user:password@host:5432/modulo
By default, the Docker Compose setup uses port 5434 (not 5432) to avoid conflicts with local Postgres installations.
Authentication
# Static users for local development (comma-separated, user:pass format)
MODULO_USERS=admin:admin,dev:dev
# Enable demo mode (seeds demo:demo user)
MODULO_DEMO_MODE=true
Credential encryption
# Generate your own – do not use the example key in production
FERNET_KEY=replace-with-your-generated-key
Generate one:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
Connectors
# GitHub App credentials (for GitHub connector)
GITHUB_APP_ID=...
GITHUB_APP_PRIVATE_KEY=...
CORS
CORS_ORIGINS=http://localhost:5173,https://modulo.run
Logging
LOG_LEVEL=INFO
MODULO_LOG_FORMAT=json
If MODULO_LOG_FORMAT is unset, plain text logs are used. Set to json for structured logging in production.
OpenTelemetry
OTEL_SDK_DISABLED=false
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 # OTLP = OpenTelemetry Protocol
Redis
REDIS_URL=redis://localhost:6380/0
Redis is used for WebSocket event broker fan-out and run event ring buffer storage (a fixed-size circular buffer for recent event replay).