07Reference
Configuration
Variables, secrets, and bindings that configure an InsightFlare deployment.
Variables
Set in the [vars] table of wrangler.toml, or override at build time (see configuration overrides).
| Name | Default | Meaning |
|---|---|---|
SESSION_WINDOW_MINUTES | 30 | Session window in minutes. Values are limited to the range 1 to 1440; a missing, invalid, or non-positive value falls back to 30. |
SCRIPT_CACHE_TTL_SECONDS | 600 | Cache lifetime of the generated /script.js response. The effective value is capped at 12 hours. |
PARQUET_WASM_URL | A jsDelivr URL for parquet-wasm 0.7.1 | Reserved for the upcoming data archiving feature. Not used by the current version; you normally do not need to change it. |
DEMO_MODE | unset | Set to 1 to run in Demo Mode. |
DISABLE_CRON_TASKS | unset | Set to 1 to disable scheduled tasks. Always disabled in Demo Mode. |
INSIGHTFLARE_ANALYTICS_ENGINE_DISABLED | unset | Set to 1 automatically when the deployment had to drop the Analytics Engine bindings. See Analytics Engine. |
External services
Some dashboard features rely on external services. They are all open source, so you can host them yourself and point the variables below at your own deployment. Values must start with https://; invalid values fall back to the default.
| Name | Default | Used for |
|---|---|---|
MAP_RELAY_BASE_URL | https://maprelay.ravelloh.com | Map basemaps and localized place labels, relayed by the server. Source: map-relay. |
CANIUSE_API_BASE_URL | https://caniuse.ravelloh.com | Feature compatibility analysis on the Browsers page (Can I Use data). Source: can-i-use-api. |
GEO_LOCALE_API_BASE_URL | https://locale.ravelloh.com | Localized state, province, and city names. Source: iso-3166-2-locale. |
SITE_META_API_BASE_URL | https://meta.ravelloh.com | Titles and icons of referring sites. Source: Gist. |
Secrets
| Name | Meaning |
|---|---|
MAIN_SECRET | Root secret from which session keys, API key hash keys, visitor salts, collect token signing keys, and encryption keys for stored credentials are derived. Required. Use a random string; at least 32 characters is recommended. |
BOOTSTRAP_ADMIN_PASSWORD | Password of the initial admin account. If unset, the default insightflare is used. |
DAILY_SALT_SECRET | Legacy fallback for MAIN_SECRET. Used only when MAIN_SECRET is not set. |
Do not rotate MAIN_SECRET casually. Sessions, API keys, and the encrypted credentials stored in System Settings depend on it.
Bindings
| Binding | Type | Required | Notes |
|---|---|---|---|
DB | D1 | Yes | Primary database. Migrations are in migrations/. |
SITE_SETTINGS_KV | KV | Yes | Per-site tracking settings. |
INGEST_DO | Durable Object | Yes | IngestDurableObject. |
REQUEST_ANALYTICS | Analytics Engine | No | Dataset insightflare_request_events. |
TRAFFIC_ANALYTICS | Analytics Engine | No | Dataset insightflare_traffic_events. |
EVENT_ANALYTICS | Analytics Engine | No | Dataset insightflare_event_facts. |
ARCHIVE_BUCKET | R2 | No | See R2 archive. |
Cookies and browser storage
| Name | Where | Purpose |
|---|---|---|
if_session | Dashboard cookie | Sign-in session. |
if_locale | Dashboard cookie | Interface language preference. |
__insightflare_visitor_<siteId>__ | Visitor's localStorage | Anonymous visitor identifier. See how visitors are identified. |
Per-site settings
Tracking strength, URL handling, outbound links, performance sampling, request protection, and blocking rules are configured per site in the dashboard. See tracking settings.