selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

emailflare logo

Self-host emailflare

s0.0.5

Cloudflare-native email API and team inbox

BetaOpen SourceMIT
Updated9 hours ago
LanguageTypescript
Setup difficultyModerate
Stars
260
Requires
Cloudflare D1, Cloudflare Email Routing, Cloudflare Email Sending, Cloudflare KV, Redis
Docker
gcr.io/0xdps/emailflare-api
Install with Docker Compose

What is emailflare?

EmailFlare bundles two separate email products. The emailflare-api is a REST API for sending transactional mail through Cloudflare Email Sending, with scoped keys, 50 React Email layouts across five themes, domain management, send logs, suppression lists, and a React admin panel. The emailflare-inbox is a team inbox and lightweight CRM that receives inbound mail via Cloudflare Email Routing, offering conversation threading, replies, automated sequences, and contact management. Both products deploy primarily as Cloudflare Workers (zero-ops, edge-native) using Cloudflare's database, cache, storage, queue, and durable object services. Docker self-hosting is a secondary option with single-container images using embedded SQLite (mesahub-core) and optional Redis for the inbox. The Docker path needs a Cloudflare account for production sending, while test API keys capture mail into an in-house Test Mailbox without external credentials. Licensed MIT.

Should you self-host emailflare?

emailflare scores 47/100 on selfhost.directory (how scoring works) and ranks #72 of 106 in Email. It has 260 GitHub stars.

It shipped 4 stable releases in the past year. The latest, v2.1.0, came out on 29 June 2026. New versions land roughly every 2 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Listmonk (80/100, 24 017 stars). It scores higher overall, so compare the two before you pick. See emailflare vs Listmonk side by side.

Features

  • Admin Dashboard
  • Auto-reply sequences
  • Cloudflare Workers deploymentPrimary deployment path
  • Contact Management
  • Conversation threading
  • Docker self-hostingSecondary deployment path; primary is Cloudflare Workers
  • Domain Management
  • One-click Unsubscribe (RFC 8058)
  • React Email templates
  • Scoped API keys
  • Send logs with delivery tracking
  • Suppression lists
  • Team inbox
  • Test mailbox
  • Transactional email API

emailflare README

How to install emailflare

Install emailflare with Docker Compose

Docker with Compose support; Cloudflare account with Email Sending enabled (for production)
Environment variables
PORT, SESSION_SECRET, ADMIN_TOKEN, CF_API_TOKEN, CF_ACCOUNT_ID, PUBLIC_URL, MESAHUB_URL, ENABLE_TEST_MODE

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 -d

Single container with embedded SQLite, port 8090

How to configure emailflare

  • ADMIN_TOKENAdmin API token (32+ chars)

    Admin API token (32+ chars)

  • CF_ACCOUNT_IDCloudflare account ID

    Cloudflare account ID

  • CF_API_TOKENCloudflare token with Email Sending + Zone permissions

    Cloudflare token with Email Sending + Zone permissions

  • ENABLE_TEST_MODEfalseWhen true, test API keys capture email into in-house Test Mailbox

    When true, test API keys capture email into in-house Test Mailbox

    values: true,false

  • INBOX_SERVER_PORT3002Internal port for inbox server

    Internal port for inbox server

  • MESAHUB_URLmh://local/emailflareDatabase connection string (embedded SQLite: mh://local/emailflare)

    Database connection string (embedded SQLite: mh://local/emailflare)

  • MIGRATIONS_DIR../inbox/migrationsPath to SQL migration files relative to services/inbox-server/

    Path to SQL migration files relative to services/inbox-server/

  • PORT8090Port the Caddy reverse proxy binds to on the host

    Port the Caddy reverse proxy binds to on the host

  • PUBLIC_URLPublic base URL used to build one-click unsubscribe links

    Public base URL used to build one-click unsubscribe links

  • R2_ACCESS_KEY_IDCloudflare R2 access key ID

    Cloudflare R2 access key ID

  • R2_ACCOUNT_IDCloudflare R2 account ID for attachment storage

    Cloudflare R2 account ID for attachment storage

  • R2_BUCKET_NAMEemailflare-inbox-attachmentsCloudflare R2 bucket name for attachments

    Cloudflare R2 bucket name for attachments

  • R2_SECRET_ACCESS_KEYCloudflare R2 secret access key

    Cloudflare R2 secret access key

  • REDIS_URLredis://localhost:6379Redis connection string (rate limiting + BullMQ)

    Redis connection string (rate limiting + BullMQ)

  • SESSION_SECRETSession signing secret (32+ chars)

    Session signing secret (32+ chars)

  • WEBHOOK_SECRETShared HMAC secret between inbox-bridge CF Worker and inbox-server

    Shared HMAC secret between inbox-bridge CF Worker and inbox-server

emailflare releases & version history

More in Email

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…