# Database DATABASE_URL=postgres://tracearr:tracearr@localhost:5432/tracearr # Optional: update the TimescaleDB extension at boot when the database image # ships a newer version. Swapping the image alone never updates the extension. # Off by default: the update is one-way (rolling the image back afterwards # breaks the database) and needs ALTER EXTENSION privilege. When off, Tracearr # logs a warning if the versions drift. # TIMESCALEDB_AUTO_UPDATE=true # Optional: fixed connection-pool size for this instance. When unset, the pool # sizes itself automatically: the app reads max_connections from postgres, # counts live Tracearr instances through the shared Redis, and gives each # instance a fair share (capped at 50). Set only to opt out of the auto budget; # the sum across instances must stay below postgres max_connections. # DATABASE_POOL_MAX= # Redis REDIS_URL=redis://localhost:6379 # Optional: prefix for all Redis keys (useful when sharing a Redis instance) # REDIS_PREFIX= # Server PORT=3000 HOST=0.0.0.0 NODE_ENV=development LOG_LEVEL=debug # Auth - CHANGE THESE IN PRODUCTION! JWT_SECRET=your-secret-key-change-in-production COOKIE_SECRET=your-cookie-secret-change-in-production # Better Auth signing/encryption key (optional). Generate: openssl rand -hex 32 # When unset, it's derived deterministically from JWT_SECRET so upgrading # installs don't need a new env var. Setting it explicitly is recommended, # and every instance sharing a deployment must use the same value (or the # same JWT_SECRET, if relying on derivation). It becomes required once # JWT_SECRET is retired in a later cleanup release. # BETTER_AUTH_SECRET=your-better-auth-secret-change-in-production # CORS: other origins (comma-separated) that may use a signed-in session. The # Vite dev server needs its own origin here. Behind an HTTPS reverse proxy, # logins work as long as the proxy preserves the Host header, forwards # x-forwarded-host with TRUST_PROXY set, or this is set to the public URL. # Forward x-forwarded-proto so session cookies carry the Secure attribute over # HTTPS. * lets any page make requests without a session (API keys); it never # grants a session. CORS_ORIGIN=http://localhost:5173 # Reverse proxy support. true trusts one hop: the client IP is the address the # proxy appended to X-Forwarded-For, and x-forwarded-host is honored. A number # is a hop count for a proxy chain (0 trusts nothing); anything else is a # comma-separated list of proxy IPs or CIDR ranges, checked at startup. # TRUST_PROXY=true # Gzip compression - enable if not behind a reverse proxy that handles compression # GZIP_ENABLED=true # DNS caching - cache DNS lookups for outbound requests (value in seconds, disabled when unset) # DNS_CACHE_MAX_TTL=120 # Poster cache: keep at least this much of the volume free, in percent. The cache stops growing; it never evicts current posters. # IMAGE_CACHE_MIN_FREE_PERCENT=10 # Optional hard ceiling on the poster cache, in MB. Unset means the free-disk floor alone bounds it. # IMAGE_CACHE_MAX_MB= # Mobile beta testing mode - enables reusable tokens, no expiry, unlimited devices # MOBILE_BETA_MODE=true # Optional OIDC sign-in (Tracearr as OIDC client). All three must be set to enable. # OIDC_ISSUER_URL=https://auth.example.com # OIDC_CLIENT_ID= # OIDC_CLIENT_SECRET= # OIDC_PROVIDER_NAME=Authentik # Library sync page size - items fetched per media-server request during # library scans (default 200, clamped 50-1000). Lower it if a low-powered # media server struggles building large responses; raise it to speed up full # scans of huge libraries on capable hardware. # LIBRARY_SYNC_PAGE_SIZE=200 # Stream map basemap. The image ships a worldwide zoom 8 extract at # data/basemap.pmtiles (pnpm basemap builds it for a source checkout); replace # that file, or point this at another archive, for street-level detail. # MAP_BASEMAP_PATH=./data/basemap.pmtiles # Key for notification destination secrets at rest, 64 hex characters. # Optional: when unset the key derives from JWT_SECRET, so existing installs # need nothing. Set it to rotate destination secrets apart from JWT_SECRET. # ENCRYPTION_KEY= # Email needs no variable: destinations hold their own SMTP settings. For local # testing docker/docker-compose.dev.yml runs Mailpit; use host 127.0.0.1, port # 1025, security none, and read what arrives at http://localhost:8025.