hieunc229/mailflare
Productivity & UtilitiesSelf-hosted email, calendar, booking and drive suite for teams that want custom domains on Cloudflare or Docker.
What it is
Mailflare is a self-hosted workspace suite centered on custom-domain email, with calendar, booking and file storage alongside it. It is aimed at professionals and small teams who want to own their mailboxes and infrastructure instead of renting Google Workspace. The app runs either as a Cloudflare Worker or as a single Docker container; mail is sent and received through Cloudflare Email, Resend or Amazon SES, files go to R2, Backblaze B2 or S3, and the database can be Cloudflare D1, PostgreSQL, MySQL, Turso/libSQL or a local SQLite file (project overview, technical notes).
The feature set covers mailboxes and routing rules (store, forward, reject or sort), repeating calendar events with email invitations, public booking links, a Drive for file storage and sharing, an admin area for users, API keys, webhooks, audit logs and backups, and IMAP / Gmail Takeout / .eml / .mbox import. Built-in AI agents can search mail, draft replies and manage events, and can be reached from other AI tools over MCP. The interface is translated into 34 languages, including right-to-left ones (features).
Quick start
The README's primary path is the Cloudflare one-click deploy:
- Click Deploy to Cloudflare and keep the app name
mailflare— the README warns that renaming breaks the deployment (deploy button). - Create a scoped Cloudflare API token and set it as the Worker secret
CF_TOKEN. Required permissions include, at account level, Email Sending:Edit, DNS Settings:Edit and Email Routing Addresses:Edit; at zone level, DNS Settings:Edit, Email Routing Rules:Edit, Zone Settings:Edit and DNS:Edit (token setup discussion). - Open the app at
/setupand create the admin account. - Connect a domain from the same Cloudflare account and create the first mailbox.
If you prefer a server, the Docker route is cp .env.docker.example .env.docker followed by docker compose up -d --build, giving one container with SQLite and local file storage (Docker instructions). For local development, copy .dev.vars.example to .dev.vars, run npm install, npm run db:migrate:local, then npm run dev, and open localhost:3000; npm run db:seed loads sample data (local setup). More detail is in the deployment guide and self-hosting guide.
Constraints
- Cloudflare deployments need a Cloudflare account with a domain managed in it, plus the scoped
CF_TOKENdescribed above. - Receiving through Cloudflare Email Routing is free. Sending through Resend's free tier covers 3,000 emails a month; Cloudflare's own sending requires the $5/month paid Worker plan; new Amazon SES accounts start in the sandbox and need production access (cost notes). Pricing may change.
- The database is selected with
DATABASE_URL. A schema change requires a separate migration per database type (migrations). - The Docker image is the lightweight path: one container, SQLite and local files, rather than the full set of Cloudflare-managed services.
- Licensed under AGPL-3.0 (license).
HotRepo's take
On 2026-11-02 the repository appeared in the TypeScript daily ranking at position 12 with 185 new stars that day, against a total of 5,465 stars and 800 forks. It was surfaced earlier through two Show HN posts in late May 2026, one titled "self-hosted email, custom domain with Cloudflare", which drew a small discussion. In that thread the maintainer replied to a question about sending mail from forums by saying an API for sending email is possible and asking how such a flow would work (thread, reply) — a reminder that outbound-sending API access is framed as a future possibility rather than a documented feature. The offering is broad (mail, calendar, booking, drive, AI agents), so the practical question for adopters is which pieces work end to end on their chosen backend rather than how many features are listed.
Alternatives and scope
The suite is explicitly positioned as an alternative to Google Workspace, so the natural comparison is with other self-hosted mail suites and with managed Workspace plans. It is not a mail client for existing accounts: it is the server, mailbox store and web app together, and you bring your own sending and receiving providers. The AI agents are a convenience layer on top of the mail data, not a separate product.
Written by AI from the project's README, updated . The project's own docs are the source of truth.