# Configuration ## Data volume The container runs as a non-root user (UID 1654) and keeps everything under `/data`: the SQLite database, the Data Protection keys for logins and the GeoIP databases. A named volume gets the right owner automatically; for a bind mount, `chown 1654:1654` the host folder first (or start the container as root once, as the [Unraid template](unraid.md) does). ## Environment variables All optional. Read at startup; list entries need an index (`__0`, `__1`, ...). | Variable | Purpose | Default | |---|---|---| | `Flypaper__Admin__Password` | Fixes the dashboard password and disables the first-visit setup and the password change | set on first visit | | `Flypaper__Http__TrustedProxies__0` | IP or CIDR of the reverse proxy allowed to set `X-Real-IP` / `X-Forwarded-For`; replaces the default | private networks | | `Flypaper__Http__KnownHosts__0` | Hosts that are caught only on trap paths (`*.example.com` allowed), see [reverse proxy](reverse-proxy.md#what-to-send-to-flypaper) | none | | `Flypaper__Ports__Trap` / `Flypaper__Ports__Dashboard` | Container ports | `8080` / `8081` | | `ConnectionStrings__Flypaper` | SQLite database | `Data Source=/data/flypaper.db` | | `Flypaper__DataProtection__KeysPath` | Keys for login cookies and forms | `/data/keys` | | `Flypaper__GeoIp__Directory` | Folder for the DB-IP databases; empty disables GeoIP | `/data/geoip` | | `Flypaper__Drip__MinDelay` / `MaxDelay` | Pause between chunks | `00:00:00.05` / `00:00:01` | | `Flypaper__Drip__MinChunkSize` / `MaxChunkSize` | Bytes per chunk | `1` / `64` | | `TZ` | Time zone for the dashboard | UTC | The defaults of the runtime settings below can also be set this way, e.g. `Flypaper__MaxConnections`. Values saved on the settings page override them. ## Runtime settings Changed on the dashboard's settings page, stored in the database, effective immediately. The reset button removes all saved values. | Setting | Default | |---|---| | Trap paths (exact, or prefix with a trailing `*`) | `/.env`, `/.env.*`, `/.git/*`, `/.aws/*`, `/.DS_Store`, `/wp-login.php`, `/wp-admin/*`, `/xmlrpc.php`, `/phpmyadmin/*`, `/vendor/phpunit/*`, `/server-status`, `/actuator/*`, `/cgi-bin/*`, `/boaform/*` | | Extra known hosts (merged with `KnownHosts`) | none | | Maximum hold time per catch | `01:00:00` | | Maximum connections overall | `1000` | | Maximum connections per IP | `10` | | Keep catches (days, `0` = forever) | `90` | | Don't store catches from private networks | on | ## Security and privacy - **Keep the dashboard internal.** Publish port `8081` only to your LAN or to localhost and never forward it from your public proxy. - **Finish the setup before the dashboard is reachable by anyone else.** Until a password is set, whoever opens the dashboard first can set it. The setup page disappears once a password exists. - **Use a strong admin password** (at least 12 characters). Only a salted hash is stored. The login runs over plain HTTP unless you put the dashboard behind TLS yourself. - **The limits protect you, not the bots.** Every catch holds a socket in Flypaper and in your proxy for up to the maximum hold time. Keep `MaxConnections` well below what your proxy can handle (nginx: `worker_connections`), and keep the per-IP limit low so a single scanner can't fill all slots. - **An HTTPS catch-all is rarely worth it**, see [reverse proxy](reverse-proxy.md#what-to-send-to-flypaper). - **Privacy.** Flypaper stores IP addresses, requested URLs and user agents. Keep retention short if that matters in your jurisdiction.