Skip to content

Configuration

Every setting is an environment variable. The shipped .env.example is the practical starting point; this page is the full reference.

VariableRequiredDefaultDescription
DATABASE_URLfile:/data/app.dbSQLite path. Defaults to the persistent volume, so there is no need to change it.
BETTER_AUTH_SECRET(generated)Secret used to sign sessions. The container generates one on first start and keeps it in the volume at /data/auth-secret. Set it to choose your own, and always set it for pnpm dev. It must be at least 32 characters; generate one with openssl rand -base64 32.
BETTER_AUTH_URL(inferred from the proxy headers)The public URL of the dashboard, e.g. https://dashboard.example.com. Leave it unset for plain HTTP at http://<host>:3000. Set it when you serve over HTTPS, so the session cookie is marked Secure. The flag is picked at startup, so without this it stays unmarked even behind an HTTPS proxy, and the dashboard warns when it notices. Also set it if logins fail with “Invalid origin”.
SIGN_IN_RATE_LIMIT_MAX5Password sign-in attempts allowed per client IP in each window. Further attempts get “Too many sign-in attempts” and a countdown.
SIGN_IN_RATE_LIMIT_WINDOW60Length of that window in seconds.
TRUSTED_PROXIESloopback and private rangesComma-separated IPs or CIDR ranges of your reverse proxies. Sign-in is rate limited per client IP, and the dashboard only believes X-Forwarded-For when the connection comes from one of these. The default covers a proxy on the same host or LAN. Narrow it, e.g. to your Docker network 172.18.0.0/16, if untrusted machines share those ranges.

See LAPI setup for where these values come from.

VariableRequiredDefaultDescription
LAPI_URLYesLAPI base URL including port, e.g. http://192.168.1.100:8080.
LAPI_MACHINE_IDYesMachine ID for watcher authentication.
LAPI_MACHINE_PASSWORDYesMachine password for watcher authentication.
LAPI_BOUNCER_API_TOKENYesAPI token for bouncer (read) access.
LAPI_POLL_INTERVAL60Seconds between LAPI decision syncs.
LAPI_DECISION_ORIGINScrowdsec,cscliComma-separated decision origins to mirror. The default keeps the decisions your own agents and cscli made. Set it to an empty value to pull every origin LAPI holds, which adds the CAPI and community blocklist decisions: tens of thousands of rows, most with no alert evidence.
LAPI_ALERT_LIMIT100Alerts requested per host when fetching evidence. Raise it if a busy host shows fewer alerts than cscli alerts list does.

Without the machine credentials there is no alert evidence and no ASN data, so the expanded row stays empty.

Both limits apply on every sync. Days are applied first, then the count.

VariableRequiredDefaultDescription
DECISION_RETENTION_COUNT20000Maximum decisions kept in the database. The oldest inactive ones are pruned first, together with hosts and alerts nothing references anymore. Set to 0 to keep everything.
DECISION_RETENTION_DAYS0Also drop inactive decisions older than this many days. 0 disables the age limit.
VariableRequiredDefaultDescription
LOG_LEVELinfoLowest level written: fatal, error, warn, info, debug or trace.
LOG_FORMAThumanhuman is one colored line per event. json writes one JSON object per line for a log collector.

At info the log records what changed: sign-ins and failed sign-ins, users created or deleted, decisions removed from the dashboard and by whom, every sync that changed something, and LAPI outages with their recovery. Stack traces appear only at debug, where quiet polls are logged too.

Set NO_COLOR=1 to drop the colors from human output.

VariableRequiredDefaultDescription
UPDATE_CHECKtrueAsk GitHub for the newest release a few times a day so the sidebar can point out an update. Set to false to never contact GitHub.

Optional. See SSO setup for the provider side.

VariableRequiredDefaultDescription
OIDC_CLIENT_IDClient ID from your OIDC provider. Required to enable SSO.
OIDC_CLIENT_SECRETClient secret from your OIDC provider. Required to enable SSO.
OIDC_ISSUER_URLIssuer URL, e.g. https://authentik.example.com/application/o/my-app/. Required to enable SSO.
OIDC_BUTTON_LABELSign in with SSOLabel shown on the SSO login button.
OIDC_AUTO_REDIRECTfalseSet to true to skip the login form and redirect straight to your SSO provider.