EmailFlare is a Cloudflare-native email platform with two independent services that work together:
- emailflare-api — transactional email sending API with an admin dashboard (domains, templates, API keys, logs, suppressions, lists + one-click unsubscribe)
- emailflare-inbox — team inbox and lightweight CRM (receive, thread, reply, sequences, multi-user, lists + one-click unsubscribe)
Both services are built on Cloudflare — Email Sending, Email Routing, D1, KV, R2, Queues, and Durable Objects — and deploy as Cloudflare Workers (primary, zero-ops) or as a single Docker container with embedded SQLite (secondary, for self-hosting).
A Hono API for sending transactional email via the Cloudflare Email Sending API, with a React admin panel for managing domains, templates, API keys, and logs.
Cloudflare Worker deployment (primary — no Docker, edge-native)
just install
cp scripts/config.example.toml scripts/config.toml
# fill in your values
just emailflare-api-worker-setupRead the full guide: docs/CLOUDFLARE.md
Docker self-host (secondary)
gcr.io/0xdps/emailflare-api:latest
cp .env.api.example .env.local
# fill in SESSION_SECRET, ADMIN_TOKEN, CF_API_TOKEN, CF_ACCOUNT_ID
docker compose --env-file .env.local -f deploy/docker/compose.email-api.yaml up -dOpen http://localhost:8090. Read the full guide: docs/SELF_HOSTING.md
Railway
A Node.js inbox server with a React dashboard for receiving inbound email via Cloudflare Email Routing, threading conversations, replying, running sequences, and managing contacts across a team.
Cloudflare Worker deployment (primary — inbox-worker, D1 + R2 + KV + DO + Queues)
just install
cp scripts/config.example.toml scripts/config.toml
# fill in your values
just emailflare-inbox-deployRead the full guide: docs/CLOUDFLARE.md
Docker self-host (secondary)
ghcr.io/0xdps/emailflare-inbox:latest
cp .env.inbox.example .env.inbox.local
# fill in SESSION_SECRET, WEBHOOK_SECRET, CF_API_TOKEN, CF_ACCOUNT_ID, REDIS_URL
docker compose --env-file .env.inbox.local -f deploy/docker/compose.email-inbox.yaml up -dOpen http://localhost:8091. Read the full guide: docs/SELF_HOSTING.md
Email API
services/email-worker— Cloudflare Worker bundling API + admin UI (D1 + KV) — primary deployservices/email-server— Hono API (Node.js): domains, templates, keys, stats, send — for Dockerservices/email-ui— React admin panel (Vite + TanStack Router)services/email-bridge— CF Worker: receives bounce/complaint email and forwards to email-server webhookdeploy/docker/Dockerfile.email-api— production image for emailflare-apideploy/docker/compose.email-api.yaml— single-container production composedeploy/docker/compose.email-api.dev.yaml— local dev stack with hot reload
Inbox
services/inbox-worker— Cloudflare Worker variant of the inbox (D1 + R2 + KV + DO + Queues) — primary deployservices/inbox-server— Hono inbox API (Node.js): inboxes, people, threads, sequences, templates — for Dockerservices/inbox-ui— React inbox dashboard (Vite + TanStack Router)services/inbox-bridge— CF Worker: receives inbound email via CF Email Routing, forwards to inbox-serverdeploy/docker/Dockerfile.email-inbox— production image for emailflare-inboxdeploy/docker/compose.email-inbox.yaml— single-container production composedeploy/docker/compose.email-inbox.dev.yaml— local dev stack with hot reload
Shared
services/emails— shared email layouts and rendering used by both serversscripts/— setup tooling for CF Worker deployments (setup.mjs,config.example.toml)justfile— task runner for dev, prod, and Cloudflare Worker operations (docs/RECIPES.md)docs/CLOUDFLARE.md— Cloudflare Workers deployment guide (primary)docs/SELF_HOSTING.md— Docker self-hosting guide (secondary)
EmailFlare supports two deployment modes for each product:
| Mode | Products | Stack | When to use |
|---|---|---|---|
| Cloudflare Workers (primary) | emailflare-api, emailflare-inbox | D1 + KV (+ R2, Queues, DO for inbox) | Default — zero-ops, edge-native |
| Docker (secondary) | emailflare-api, emailflare-inbox | single container + embedded SQLite | Self-hosting on your own VPS/VM |
The Docker path uses SQLite via embedded mesahub-core (one image, one volume at /data).
Read the full guides: docs/CLOUDFLARE.md · docs/SELF_HOSTING.md
emailflare-api (.env.local):
| Variable | Description |
|---|---|
ADMIN_TOKEN |
Admin API token (32+ chars) |
SESSION_SECRET |
Session signing secret (32+ chars) |
MESAHUB_URL |
mh://local/emailflare for embedded SQLite |
CF_API_TOKEN |
Cloudflare token with Email Sending + Zone permissions |
CF_ACCOUNT_ID |
Cloudflare account ID |
PUBLIC_URL |
Public base URL, used for one-click unsubscribe links (optional) |
emailflare-inbox (.env.inbox.local):
| Variable | Description |
|---|---|
SESSION_SECRET |
Session signing secret (32+ chars) |
WEBHOOK_SECRET |
Shared secret for inbox-bridge webhook auth |
MESAHUB_URL |
mh://local/inbox-db for embedded SQLite |
REDIS_URL |
Redis connection string (rate limiting + BullMQ) |
CF_API_TOKEN |
Cloudflare token for sending replies |
CF_ACCOUNT_ID |
Cloudflare account ID |
PUBLIC_URL |
Public base URL, used for one-click unsubscribe links in sequences (optional) |
- License: MIT
- Contributing guide: CONTRIBUTING.md
- Security policy: SECURITY.md