Zero (Mail-0): self-hosting an open source Gmail alternative
Experience email the way you want with Mail0 – the first open source email app that puts your privacy and safety first. Join the discord: https://mail0.link/discord
At a glance
- What is it?
- Zero is an MIT-licensed, TypeScript email app you run yourself, with Gmail and Outlook accounts in one inbox and AI agents on top. The setup is a multi-service job, not a one-command install.
- Who is it for?
- Adopt Zero if you are comfortable running PostgreSQL, Redis, a Node backend and Google OAuth credentials yourself and you want an MIT-licensed base to extend. Do not adopt it if you want a hosted mailbox you never administer, or if you expect the README to walk you through production deployment, backups and upgrades, because it does not.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 112 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem Zero targets: a mailbox you can actually own
Most people who want a better email interface face the same wall. The clients with good search, unified inboxes and AI features are closed source and run on someone else's servers. The self-hosted options tend to be either a mail server (which is a different problem entirely) or a thin IMAP client with no opinion about how you read mail. Zero sits in between: it is an application layer over accounts you already have. The README describes it as an open source AI email solution that lets users self-host their own email app while integrating external services like Gmail and other providers. The target reader is a developer or a small team that is willing to run infrastructure in exchange for control over the interface and the data path. It is not aimed at someone who wants to stop using Gmail. It is aimed at someone who wants to keep the Gmail account and put a different, self-hosted front end on it.
How Zero is put together: Next.js front end, Node backend, Postgres, Drizzle
The repository is a pnpm workspace with an apps/ and a packages/ directory, orchestrated by Turbo. The README lists the stack explicitly: Next.js, React, TypeScript, TailwindCSS and Shadcn UI on the front end; Node.js with Drizzle ORM on the backend; PostgreSQL for storage; Better Auth plus Google OAuth for authentication. The .env.example confirms the shape of the data flow. The front end reads VITE_PUBLIC_APP_URL on port 3000 and VITE_PUBLIC_BACKEND_URL on port 8787, so the browser talks to a separate API process rather than to Next.js route handlers alone. That backend holds the DATABASE_URL Postgres connection, a Redis instance at REDIS_URL for caching or queues, and provider keys for OpenAI and Perplexity. Mail data reaches the app through the Gmail API, which is why Google OAuth is a hard requirement rather than an optional login method. In other words, the architecture is a conventional web app with an external mail provider behind it, not a mail server. Zero never receives mail on your behalf; it reads and sends through the provider's API.
Installing Zero locally with pnpm and Docker
The README documents two setup paths, a standard one and a devcontainer one, and they share the same commands. Prerequisites are Node.js v18 or higher, pnpm v10 or higher, and Docker v20 or higher. Clone the repository, install dependencies, and start the Postgres container that ships as docker-compose.db.yaml.
git clone https://github.com/Mail-0/Zero.git
cd Zero
pnpm install
pnpm docker:db:upEnvironment setup is handled by a CLI that lives in packages/cli and is exposed as the nizzy script. Running it copies .env.example to .env and fills in variables for you, and the sync step propagates environment variables and types across the workspace.
pnpm nizzy env
pnpm nizzy sync
pnpm db:pushThe db:push script runs the Drizzle schema push against the database you just started, so after it completes the tables exist. Then start everything through Turbo and open the app in a browser at port 3000.
pnpm devFor Gmail integration the README requires a Google Cloud project with the People API and Gmail API enabled, OAuth 2.0 web credentials, and an authorized redirect URI of http://localhost:8787/api/auth/callback/google in development. The README warns that these URIs must match the .env configuration exactly, including protocol, domain and path. You also add yourself as a test user under Audience in the Google Cloud Console. Two more services appear in the environment file: Autumn, described as required for some encryption, and Twilio, required for SMS integration, with TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN and TWILIO_PHONE_NUMBER. Neither is explained beyond that, so budget time for reading their dashboards.
Where the documentation runs out
The README is a local development guide, and it stops there. There is no section on production deployment, no backup or restore procedure for the Postgres volume, and no migration path between versions, even though the repository contains a docker-compose.prod.yaml and deploy scripts for the front end and backend. The single release listed is v0.1 from 2025-07-18, so there is no upgrade history to learn from either. The last push to the default branch was on 2026-05-26, which makes the codebase roughly four months old at the time of writing; treat it as a project that moves, not one with a stability guarantee. Two dependencies deserve scrutiny before you commit. Autumn is described only as required for some encryption, which is a thin explanation for a third-party service in the path of your mail data. Twilio is required for SMS, a feature the README never describes in user terms. If you cannot run those services, the documented setup path is incomplete for you. Finally, the README itself notes that data passed through external providers falls under their privacy policies, which is an honest caveat and also a limit on how much privacy self-hosting buys you when the mail still lives in Gmail.
Zero compared with a plain IMAP client or a full mail server
The obvious alternative is a desktop client such as Thunderbird, which connects to the same Gmail account over IMAP and OAuth and stores messages locally. The difference in approach is where the logic lives. Thunderbird is a native application that speaks IMAP directly; Zero is a web application with its own backend, database and Redis instance, and it reaches mail through the Gmail API rather than IMAP. That gives Zero a place to run server-side agents and to unify providers in one web inbox, and it costs you a Postgres instance, a Redis instance and an API process to keep alive. A second comparison is a self-hosted groupware suite that bundles its own mail server. Those replace the provider; Zero deliberately does not, because the README frames it as integrating external services rather than hosting mailboxes. If your goal is to stop depending on Google entirely, Zero is the wrong layer. If your goal is a self-hosted interface with AI features over accounts you already have, it is the right one.
Maintenance, licensing and what an upgrade actually costs
Zero is MIT licensed, which permits commercial use, modification and redistribution provided the copyright notice and permission notice are preserved. The LICENSE file is at the repository root. That is permissive enough for a company to fork, but it also means there is no support contract and no warranty; the README makes no availability claim. Operationally, the recurring cost is not the code, it is the services around it: a Postgres database you must back up, a Redis instance, a Node process, Google Cloud OAuth credentials that can be revoked or expire, and accounts with Autumn, Twilio, OpenAI and Perplexity if you use the features that need them. The repository ships database scripts (db:generate, db:migrate, db:push, db:studio) and a Turbo build, so the mechanics of applying schema changes exist, but the README does not document a release upgrade procedure, and with only v0.1 published there is no changelog to follow. Plan on reading commits on the staging branch, which is the default branch, before pulling changes into anything you depend on. This is not legal advice; check the MIT text and the terms of each external service yourself.
Editorial conclusion
Adopt Zero if you are comfortable running PostgreSQL, Redis, a Node backend and Google OAuth credentials yourself and you want an MIT-licensed base to extend. Do not adopt it if you want a hosted mailbox you never administer, or if you expect the README to walk you through production deployment, backups and upgrades, because it does not. Verify first that you can complete the Google Cloud Console redirect URI registration at http://localhost:8787/api/auth/callback/google, that you accept the Autumn and Twilio dependencies, and that the last push on 2026-05-26 is recent enough for your risk tolerance.
Frequently asked questions
What is the Zero email app from Mail-0?
Zero is an open source email application that you self-host and that connects to external providers such as Gmail and Outlook. The README describes it as an open source AI email solution with AI agents and LLM integration on top of a unified inbox.
How do I install Zero locally?
The README's quick start is to clone the repository, run pnpm install, start the database with pnpm docker:db:up, run pnpm nizzy env and pnpm nizzy sync, initialize the database with pnpm db:push, then run pnpm dev and open http://localhost:3000. Node.js v18 or higher, pnpm v10 or higher and Docker v20 or higher are required.
Does Zero need Google OAuth to work?
Google OAuth is required for Gmail integration, and the README has you enable the People API and Gmail API, create OAuth 2.0 web credentials, and register the redirect URI http://localhost:8787/api/auth/callback/google for development. The README warns that the registered URI must match your .env exactly, including protocol, domain and path.
What services does Zero depend on besides PostgreSQL?
The .env.example lists a Redis instance at REDIS_URL, an Autumn secret key described as required for some encryption, Twilio credentials for SMS integration, and API keys for Resend, OpenAI and Perplexity. The README explains the Autumn and Twilio setup steps only briefly.
Is Zero a mail server or a client?
It is an application layer over accounts you already have. The README says it lets users self-host their own email app while integrating external services like Gmail, so mail continues to live with the provider and is reached through that provider's API.
Community notes