opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Self-hosted email, calendar, booking, and Drive on Cloudflare or Docker
GitHub RepoViews8

Project Description

View on GitHub

Self-Hosted Email, Calendar, and Drive Without the Google Workspace Bill

You've got a domain. Maybe you've even got a few mailboxes on it. But if you want calendar invites, file sharing, and a public booking link to go along with your email, you're probably looking at a monthly bill that keeps creeping up. Mailflare is a self-hosted take on that whole stack—email, calendar, booking, and Drive—built to run on Cloudflare, Docker, or Vercel.

What It Does

Mailflare is a self-hosted alternative to Google Workspace. It gives you custom domain email with personal or shared mailboxes, a calendar with recurring events and time zone support, a public booking link so people can grab free time on your calendar, a Drive for storing and sharing files, and built-in AI agents that can search mail, draft replies, and manage events.

The architecture is deliberately flexible. For email, you can send and receive through Cloudflare Email, Resend, or Amazon SES. Incoming mail can be routed with rules—store it, forward it, reject it, or sort it (there's a dedicated rule for newsletters and promotions). For storage, you can pick Cloudflare D1 as the default database, or point DATABASE_URL at PostgreSQL, MySQL, Turso/libSQL, or a plain SQLite file. File storage works with Cloudflare R2, Backblaze B2, or AWS S3. Hosting is equally open: Cloudflare Workers, a single Docker container, or Vercel.

Why It's Cool

The cost story is genuinely different. Receiving mail through Cloudflare Email Routing is free. Sending through Resend gets you 3,000 emails a month on the free tier, and Amazon SES has its own free tier. Cloudflare Email Sending is the one paid option, requiring the $5/month Workers plan. That's a very different shape of bill than a per-seat workspace subscription.

It doesn't lock you into one provider. Most self-hosted email projects assume you're all-in on a single stack. Mailflare lets you mix and match—Cloudflare for receiving, Resend for sending, Postgres on Neon or Supabase for data, S3 for files. The DATABASE_URL switch is a small detail that says a lot about how the project is designed.

The AI agents speak MCP. Rather than a closed assistant bolted onto the inbox, Mailflare connects to other AI tools over the Model Context Protocol. That means the agents aren't a walled garden—they're a standard interface you can wire into whatever else you're running.

Migration isn't an afterthought. You can import mail from IMAP, Gmail Takeout, .eml, and .mbox files, plus calendar events, contacts, and Drive files from Google Takeout. If you're leaving Google, that's the path out.

Admin features are actually there. Users, API keys, webhooks, audit logs, and backups. Those are the things that separate a weekend project from something you'd put your team's mail on.

It's translated into 34 languages, including right-to-left support for Arabic, Urdu, and Persian. That's a lot of localization work for a project this young, and it suggests a broader audience than the usual English-only self-hosted crowd.

How to Try It

The fastest route is the deploy buttons in the repo—one for Cloudflare Workers, one for Vercel. For Cloudflare, you'll need an account with your domain on it. The Vercel path requires a CRON_SECRET environment variable, and there's a deployment doc in docs/deploy-vercel.md covering the details.

If you'd rather run it yourself:

  1. Head to the repository: github.com/hieunc229/mailflare
  2. Pick your hosting target—Cloudflare Workers, Docker, or Vercel
  3. Configure your email sending provider (Resend, SES, or Cloudflare Email Sending)
  4. Set DATABASE_URL if you're not using the default Cloudflare D1
  5. Point your file storage at R2, B2, or S3
  6. Import existing mail and calendars if you're migrating

There's also a hosted option—Mailflare Cloud—if you want the software without managing the deployment, and it's positioned around high-deliverability email. The README is upfront that this exists, which is a reasonable way to fund an open-source project.

Final Thoughts

Mailflare is aiming at a real gap: people who want their own domain email but also want the calendar, booking, and file storage that usually come bundled with a workspace account. The provider flexibility and the import tooling are the strongest parts—they lower the cost of trying it and the cost of leaving if it doesn't work out.

Worth noting: email deliverability is the hard part of any self-hosted mail setup, and the README's cost table is a good reminder that "free" depends on which providers you pick and what their limits are at the time you read it. If you're comfortable running infrastructure and want control over your mail stack, this is worth a look. If you're not, the hosted option is there for a reason.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: mailflareLast updated: November 30, 2026 at 06:32 AM