An Open-Source Gmail Alternative for the Future of Email
Mail0.io is an open-source email solution that gives users the power to self-host their own email servers while also integrating external services like Gmail and other email providers. Our goal is to put control, privacy, and customization back into the hands of users—whether they choose to host their email independently or manage multiple inboxes from a single, customizable platform.
Most email services today are either closed-source, data-hungry, or too complex to self-host. Mail0.io is different:
✅ Fully Open-Source – No hidden agendas, no walled gardens. 100% transparency.
🔒 Data Privacy First – Your emails, your data. No tracking, no selling, no middlemen.
⚙️ Self-Hosting Freedom – Run your own email server with ease.
📬 Unified Inbox – Connect multiple email providers like Gmail, Outlook, and more.
🎨 Customizable UI & Features – Tailor your email experience the way you want it.
🚀 Developer-Friendly – Built with extensibility and integrations in mind.
We believe email should be:
- Yours – You control where your data is stored.
- Flexible – Use it however you want—self-hosted or connected to third-party providers.
- Open – Transparent development, open collaboration, and community-driven innovation.
- User-Friendly – No need for technical expertise to get started.
We're in the early stages of development, and we’re shaping the future of Mail0.io together with the community. Some key areas we will focus on:
- Core Email Server – A lightweight, reliable self-hosted email server.
- Email Client – A sleek, customizable web app for managing emails.
- Gmail & External Email Integration – Support for linking third-party email services.
- Privacy-Focused Features – Encryption, tracking protection, and secure authentication.
- Developer API – Extensible tools for building integrations and automations.
Mail0.io is not just another email app—it's a vision for a better, more open, and user-controlled email ecosystem. If you believe in privacy, open-source software, and giving users control, we’d love for you to join us!
📢 Follow our progress – Stay updated on GitHub as we build Mail0.io.
💡 Contribute – Share your ideas, suggest features, and help shape the project.
🤝 Community-driven – Our goal is to create an email solution for the people, by the people.
We’re just getting started. If you’re excited about a future where email belongs to users, not corporations, let’s make it happen together.
🤍 Mail0.io – Email, Reimagined.
Before running the application, you'll need to set up several services and environment variables:
-
Setup Local Services with Docker
- Make sure you have Docker, NodeJS, and pnpm installed.
- Install all dependencies with
pnpm install
- Copy the example env,
cp .env.example .env
- Run
pnpm docker:up
to start the database and other services. - Run
pnpm db:push
to sync your schema with the database - Use
pnpm db:studio
to view and manage your data
-
Better Auth Setup
-
Open
.env
and change the BETTER_AUTH_SECRET to a random string. (Useopenssl rand -hex 32
to generate a 32 character string)BETTER_AUTH_SECRET=your_secret_key
-
-
Google OAuth Setup (Optional)
-
Go to Google Cloud Console
-
Create a new project
-
Enable the Google OAuth2 API
-
Create OAuth 2.0 credentials (Web application type)
-
Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
(development)https://your-production-url/api/auth/callback/google
(production)
-
Add to
.env
:GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret
-
Run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
- You can fork the repository and make your changes on your forked repository. Once you have made your changes, you can create a pull request to the main branch.
- To add code to the main branch, make a pull request. Your code should always be reviewed by a partner, not yourself!
If you spot a problem with the docs, search if an issue already exists. If a related issue doesn't exist, you can open a new issue using a relevant issue form.
Scan through our existing issues to find one that interests you. You can narrow down the search using labels
as filters. See "Label reference" for more information. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix.
When you're finished with the changes, create a pull request, also known as a PR.
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
- Don't forget to link PR to issue if you are solving one.
- Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, a reviewer will review your proposal. We may ask questions or request additional information.
- We may ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
- As you update your PR and apply changes, mark each conversation as resolved.
- If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.