Configuration
The config file lives in the platform's default path. A complete annotated example is available in the repository: backend/config.example.toml.
Options
| Option | Description |
|---|---|
database_url | sqlite://nodeflare.db or a PostgreSQL connection string such as postgres://user:password@127.0.0.1:5432/nodeflare?sslmode=disable |
bind_addr | Listen address, default 127.0.0.1:2206 |
admin_username | Admin username |
admin_password | Admin password (8–128 characters); only needed for the initial database setup and cleared automatically afterwards |
trusted_proxies | Trusted reverse-proxy IPs / CIDRs; only X-Forwarded-For from these ranges is trusted — see Reverse Proxy |
turnstile_site_key / turnstile_secret_key | Cloudflare Turnstile keys; leave empty to disable. Can protect the admin login and the public dashboard independently |
session_ttl_hours | Session lifetime (1–2160 hours), default 168 |
frontend_dir / admin_frontend_dir | Frontend static asset directories; relative paths resolve against the config file's directory |
theme_dir | Directory where theme ZIPs are extracted, themes inside the config directory by default — see Theme Development |
TIP
Docker deployments use /etc/nodeflare/config.toml on the host, mounted at the same path inside the container. The file must be readable and writable by container user 10001:10001, and bind_addr must stay 0.0.0.0:2206 — see Docker Deployment.
Command-line Overrides
Command-line flags temporarily override the config file:
bash
nodeflare --config <path> --bind <address> --database <url>WARNING
Online migration is disabled when the server is started with --database.
Full Example
The complete config.example.toml (production installs live at /etc/nodeflare/config.toml; per-platform paths are under default paths; Docker deployments use docker/config.example.toml):
toml
# Database connection URL
# SQLite: sqlite:///path/to/database.db or sqlite://nodeflare.db
# PostgreSQL: postgres://user:password@127.0.0.1:5432/nodeflare?sslmode=disable
database_url = "sqlite://nodeflare.db"
# Server listen address
bind_addr = "127.0.0.1:2206"
# Only X-Forwarded-For from these reverse-proxy ranges is trusted
trusted_proxies = ["127.0.0.1/32", "::1/128"]
# Admin username
admin_username = "admin"
# Admin password (8-128 characters; only needed for the initial
# database setup and cleared automatically afterwards)
admin_password = "CHANGE_ME_WITH_A_STRONG_PASSWORD"
# Cloudflare Turnstile site key (public), leave empty to disable
turnstile_site_key = ""
# Cloudflare Turnstile secret key
turnstile_secret_key = ""
# Paths resolve against the config file's directory
frontend_dir = "../frontend/dist"
admin_frontend_dir = "../frontend/admin-dist"
# Directory where downloaded or uploaded theme ZIPs are extracted
theme_dir = "themes"
# Admin session lifetime (hours, 1-2160)
session_ttl_hours = 168