Email client with custom domain based on Cloudflare
Email client with custom domain based on Cloudflare
Mailflare is a self-hosted email inbox for custom domains, built on Cloudflare.
Thanks to mailflare sponsors. Want to support the project? Drop @hieuSSR a message
Mailflare runs in your Cloudflare account. Email Routing delivers incoming messages to the app, while Cloudflare's email service handles outgoing messages. Your mail data stays in your own D1 database and attachments are stored in your own R2 bucket.
You can setup Mailflare and receive email for free
A Paid Worker plan ($5/month) is required to send email (and it's recommend to have a smooth experience)
Getting started takes three steps:
mailflare. The app will not work correctly under another Worker name./setup to check the installation and create your admin account.⚠️ IMPORTANT: CF_TOKEN is required during deployment. Create a scoped Cloudflare API token with the following permissions for the domains you want to connect.
See the deployment guide for required permissions, manual deployment, backups, and updates.
Mailflare also runs as one container on any server, with SQLite and local files in place of D1 and R2, a built-in SMTP listener for inbound mail (or a small Cloudflare relay Worker if you want to keep MX on Cloudflare), and any SMTP relay or Cloudflare Email Sending for outbound.
cp .env.docker.example .env.docker
docker compose up -d --buildSee docs/self-hosting.md.
cp .dev.vars.example .dev.vars
npm install
npm run db:migrate:local
npm run devAdd your Cloudflare credentials to .dev.vars, then open http://localhost:3000. For sample local data, run npm run db:seed while the development server is running.
See LICENSE.
No open issues yet, or sync has not completed.