02Deployment
Deployment overview
The Cloudflare resources InsightFlare uses and the ways to deploy it.
Deploy the latest official InsightFlare build to your own Cloudflare account. No GitHub fork, Wrangler installation or manual resource configuration is needed.
Bindings
The default wrangler.toml declares these resources:
| Binding | Type | Purpose | Required |
|---|---|---|---|
DB | D1 database | Primary store for sites, teams, users, visits, events, and rollups. | Yes |
SITE_SETTINGS_KV | KV namespace | Per-site tracking and blocking settings. | Yes |
INGEST_DO | Durable Object (IngestDurableObject) | Buffers incoming events and flushes them to D1. | Yes |
REQUEST_ANALYTICS | Analytics Engine dataset (insightflare_request_events) | Request observation and abnormal traffic. | Optional |
TRAFFIC_ANALYTICS | Analytics Engine dataset (insightflare_traffic_events) | Sampled traffic facts. | Optional |
EVENT_ANALYTICS | Analytics Engine dataset (insightflare_event_facts) | Sampled custom event facts. | Optional |
ARCHIVE_BUCKET | R2 bucket | Optional cold archive. See R2 archive. | Optional |
The Worker also has a cron trigger that runs every 30 minutes to run scheduled tasks.
Secrets
| Name | Purpose |
|---|---|
MAIN_SECRET | Root secret from which session keys, API key hash keys, visitor salts, the collect token signing key, and encryption keys are derived. |
BOOTSTRAP_ADMIN_PASSWORD | Password for the initial admin account. |
DAILY_SALT_SECRET | Legacy fallback for MAIN_SECRET, used only if MAIN_SECRET is not set. |
Choose a method
- One-click deploy. Fastest. See the quick start.
- Manual deployment. Create the resources yourself and import the repository. See manual deployment.
- Local development. Run the app on your machine. See local development.
After deploying, you can override Wrangler settings with environment variables, enable Analytics Engine, and keep your deployment updated.