FlaresendDocs

Overview

What you deploy to run Flaresend, which Cloudflare products it uses, and what you need before you start.

Flaresend is not a hosted service. You deploy it to your own Cloudflare account, and every email your apps send goes out through your account's Cloudflare Email Service.

What you deploy

WorkerRequiredWhat it does
flaresend (apps/mailer)YesThe mailer. Serves the HTTP API, the MailerRpc and AdminRpc service-binding entrypoints, the four queue consumers and the cron job. It is the only thing in the account that sends email.
flaresend-dashboard (apps/dashboard)NoThe admin dashboard, a Next.js app behind Cloudflare Access. It talks to the mailer over the MAILER_ADMIN service binding and holds no API key.

The CLI (packages/cli) is a third way to manage the mailer. It runs on your machine and calls the admin HTTP API.

Cloudflare products it uses

ProductName in the accountUsed for
Email Service (Email Sending)binding EMAILSending the email, and publishing delivery events
D1database flaresend, binding DBProjects, keys, emails, recipients, events, webhooks, templates, contacts, analytics
R2bucket flaresend-payloads, binding PAYLOADSEmail bodies and attachments, deleted after 30 days by a lifecycle rule
Queuesflaresend-send, flaresend-events, flaresend-webhooks, flaresend-dlqSending with retries, delivery events, webhook deliveries, and the dead letter queue
Rate Limitingbinding RATE_LIMITERA per-project cap of 300 sends per 60 seconds
Cron Triggers*/5 * * * *Scheduled sends more than 12 hours out, broadcasts, the daily analytics rollup
Access(dashboard only)The dashboard's login

What you need

  • A Cloudflare account with Email Service available.
  • Your sending domains on Cloudflare DNS, in the same account. Cloudflare Email Service requires Cloudflare DNS, so a domain whose DNS is on Route 53, Namecheap or anywhere else cannot send. The domain can stay registered there: point its nameservers at Cloudflare. See Domains.
  • Node.js 22 (the repo's .nvmrc says 22) and pnpm 10.
  • macOS, Linux or WSL. On plain Windows the mailer deploys, but the dashboard does not build.
  • A clone of the repository and pnpm install --frozen-lockfile at its root.
  • The Workers Paid plan. Cloudflare Email Service needs it to send to any address. On the free plan it only sends to addresses verified in your account.

With those in place, npx wrangler login and then pnpm bootstrap set up everything. See Deploy.

Transactional email only

Cloudflare Email Service is for transactional email. Marketing and bulk campaigns are not permitted. Broadcasts are off per project by default and each one is capped at BROADCAST_MAX_RECIPIENTS (500 unless you change it).

Next steps

On this page