1.8 KiB
1.8 KiB
Environment Requirements
Environment Loading
- Environment values are loaded from process environment.
.envis supported throughpython-dotenvat app startup.- Configuration is cached in memory after first load.
Source implementation: app/config.py
Variables
| Variable | Default | Purpose |
|---|---|---|
APP_USERNAME |
admin |
Login username accepted by the dashboard. |
APP_PASSWORD |
changeme |
Plaintext password used when hash is not provided. |
APP_PASSWORD_HASH |
unset | Bcrypt hash used instead of plaintext password when present. |
SESSION_SECRET |
change-this-secret |
Session signing secret for cookie middleware. |
SESSION_COOKIE_SECURE |
false |
When true, session cookie is sent only over HTTPS. |
RPC_TIMEOUT_SECONDS |
15 |
Timeout for Bitcoin RPC HTTP requests. |
METRICS_SAMPLER_INTERVAL_SECONDS |
60 |
Background metrics sampling interval in seconds. |
DATA_DIR |
./data |
Data directory root. Created if missing. |
DB_PATH |
./data/dashboard.db |
SQLite file path. Overrides default path under DATA_DIR. |
Validation and Normalization Rules
METRICS_SAMPLER_INTERVAL_SECONDSminimum is clamped to15.SESSION_COOKIE_SECUREaccepts truthy values:1trueyeson
DB_PATHparent directory is created automatically when needed.
Security Guidance
Production baseline:
- Do not use default
APP_USERNAME. - Use
APP_PASSWORD_HASHinstead of plaintext password where possible. - Use a long random
SESSION_SECRET. - Set
SESSION_COOKIE_SECURE=truewhen served over HTTPS. - Scope dashboard network access to trusted hosts only.
Example .env
Reference example is provided in .env.example.
See doc/build-and-deploy.md for environment injection in Docker Compose.