
Zero
Experience email the way you want with 0 – the first open source email app that puts your privacy and safety first (coming soon). Join the discord: https://discord.gg/0email
Stars: 4794

Zero is an open-source AI email solution that allows users to self-host their email app while integrating external services like Gmail. It aims to modernize and enhance emails through AI agents, offering features like open-source transparency, AI-driven enhancements, data privacy, self-hosting freedom, unified inbox, customizable UI, and developer-friendly extensibility. Built with modern technologies, Zero provides a reliable tech stack including Next.js, React, TypeScript, TailwindCSS, Node.js, Drizzle ORM, and PostgreSQL. Users can set up Zero using standard setup or Dev Container setup for VS Code users, with detailed environment setup instructions for Better Auth, Google OAuth, and optional GitHub OAuth. Database setup involves starting a local PostgreSQL instance, setting up database connection, and executing database commands for dependencies, tables, migrations, and content viewing.
README:
An Open-Source Gmail Alternative for the Future of Email
Zero is an open-source AI email solution that gives users the power to self-host their own email app while also integrating external services like Gmail and other email providers. Our goal is to modernize and improve emails through AI agents to truly modernize emails.
Most email services today are either closed-source, data-hungry, or too complex to self-host. 0.email is different:
- ✅ Open-Source – No hidden agendas, fully transparent.
- 🦾 AI Driven - Enhance your emails with Agents & LLMs.
- 🔒 Data Privacy First – Your emails, your data. No tracking, no selling, no middlemen.
- ⚙️ Self-Hosting Freedom – Run your own email app 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.
Zero is built with modern and reliable technologies:
- Frontend: Next.js, React, TypeScript, TailwindCSS, Shadcn UI
- Backend: Node.js, Drizzle ORM
- Database: PostgreSQL
- Authentication: Better Auth, Google OAuth
Required Versions:
Before running the application, you'll need to set up services and configure environment variables. For more details on environment variables, see the Environment Variables section.
You can set up Zero in two ways:
Option 1: Standard Setup (Recommended)
-
Clone and Install
# Clone the repository git clone https://github.com/Mail-0/Zero.git cd Zero # Install dependencies bun install # Install database dependencies bun db:dependencies # Start database locally bun docker:up
-
Set Up Environment
- Copy
.env.example
to.env
in bothapps/mail
andpackages/db
folderscp apps/mail/.env.example apps/mail/.env && cp packages/db/.env.example packages/db/.env
- Configure your environment variables (see below)
- Install database dependencies:
bun db:dependencies
- Initialize the database:
bun db:push
- Copy
-
Start the App
bun dev
-
Open in Browser
Visit http://localhost:3000
Option 2: Dev Container Setup (For VS Code Users)
This option uses VS Code's Dev Containers feature to provide a fully configured development environment with all dependencies pre-installed. It's great for ensuring everyone on the team has the same setup.
-
Prerequisites
- Docker
- VS Code or compatible editor
- Dev Containers extension
-
Open in Dev Container
- Clone the repository:
git clone https://github.com/Mail-0/Zero.git
- Open the folder in VS Code
- When prompted, click "Reopen in Container" or run the "Dev Containers: Open Folder in Container" command
- VS Code will build and start the dev container (this may take a few minutes the first time)
- Clone the repository:
-
Access the App
- The app will be available at http://localhost:3000
-
Troubleshooting
- If you encounter issues with the container, try rebuilding it using the "Dev Containers: Rebuild Container" command
- For dependency issues inside the container:
bash rm -rf node_modules rm bun.lockb bun install
-
Better Auth Setup
-
Open the
.env
file 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 (Required for Gmail integration)
-
Go to Google Cloud Console
-
Create a new project
-
Add the following APIs in your Google Cloud Project: People API, Gmail API
- Use the links above and click 'Enable' or
- Go to 'APIs and Services' > 'Enable APIs and Services' > Search for 'Google People API' and click 'Enable'
- Go to 'APIs and Services' > 'Enable APIs and Services' > Search for 'Gmail API' and click 'Enable'
-
Enable the Google OAuth2 API
-
Create OAuth 2.0 credentials (Web application type)
-
Add authorized redirect URIs:
- Development:
http://localhost:3000/api/auth/callback/google
http://localhost:3000/api/v1/mail/auth/google/callback
- Production:
https://your-production-url/api/auth/callback/google
https://your-production-url/api/v1/mail/auth/google/callback
- Development:
-
Add to
.env
:GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret GOOGLE_REDIRECT_URI=http://localhost:3000/api/v1/mail/auth/google/callback
-
Add yourself as a test user:
- Go to
Audience
- Under 'Test users' click 'Add Users'
- Add your email and click 'Save'
- Go to
-
[!WARNING] The
GOOGLE_REDIRECT_URI
must match exactly what you configure in the Google Cloud Console, including the protocol (http/https), domain, and path - these are provided above.
-
GitHub OAuth Setup (Optional)
Click to expand GitHub OAuth setup instructions
-
Go to GitHub Developer Setting
-
Create a new OAuth App
-
Add authorized redirect URIs:
- Development:
http://localhost:3000/api/auth/callback/github
- Production:
https://your-production-url/api/auth/callback/github
- Development:
-
Add to
.env
:GITHUB_CLIENT_ID=your_client_id GITHUB_CLIENT_SECRET=your_client_secret
-
Copy .env.example
located in the apps/mail
folder to .env
in the same folder and configure the following variables:
# Auth
BETTER_AUTH_SECRET= # Required: Secret key for authentication
# Google OAuth (Required for Gmail integration)
GOOGLE_CLIENT_ID= # Required for Gmail integration
GOOGLE_CLIENT_SECRET= # Required for Gmail integration
GOOGLE_REDIRECT_URI= # Required for Gmail integration
# GitHub OAuth (Optional)
GITHUB_CLIENT_ID= # Optional: For GitHub authentication
GITHUB_CLIENT_SECRET= # Optional: For GitHub authentication
# Database
DATABASE_URL= # Required: PostgreSQL connection string for backend connection
# Redis
REDIS_URL= # Redis URL for caching (http://localhost:8079 for local dev)
REDIS_TOKEN= # Redis token (upstash-local-token for local dev)
To be able to run bun db:push
and push the schemas to the database you also have to add a .env
file to the packages/db
folder (so packages/db/.env
) with the following content:
DATABASE_URL= # Required: PostgreSQL connection string for migrations
For local development a connection string example is provided in the .env.example
file located in the same folder as the database.
Note: The DATABASE_URL
connection string in the apps/mail/.env
has to be the same as the one in packages/db/.env
Zero uses PostgreSQL for storing data. Here's how to set it up:
-
Start the Database
Run this command to start a local PostgreSQL instance:
bun docker:up
This creates a database with:
- Name:
zerodotemail
- Username:
postgres
- Password:
postgres
- Port:
5432
- Name:
-
Set Up Database Connection
Make sure your database connection string is in:
apps/mail/.env
packages/db/.env
For local development use:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/zerodotemail"
-
Database Commands
-
Install database dependencies:
bun db:dependencies
-
Set up database tables:
bun db:push
-
Create migration files (after schema changes):
bun db:generate
-
Apply migrations:
bun db:migrate
-
View database content:
bun db:studio
-
Please refer to the contributing guide.
If you'd like to help with translating Zero to other languages, check out our translation guide.
Curious who makes Zero? Here are our contributors and maintainers
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for Zero
Similar Open Source Tools

Zero
Zero is an open-source AI email solution that allows users to self-host their email app while integrating external services like Gmail. It aims to modernize and enhance emails through AI agents, offering features like open-source transparency, AI-driven enhancements, data privacy, self-hosting freedom, unified inbox, customizable UI, and developer-friendly extensibility. Built with modern technologies, Zero provides a reliable tech stack including Next.js, React, TypeScript, TailwindCSS, Node.js, Drizzle ORM, and PostgreSQL. Users can set up Zero using standard setup or Dev Container setup for VS Code users, with detailed environment setup instructions for Better Auth, Google OAuth, and optional GitHub OAuth. Database setup involves starting a local PostgreSQL instance, setting up database connection, and executing database commands for dependencies, tables, migrations, and content viewing.

Visionatrix
Visionatrix is a project aimed at providing easy use of ComfyUI workflows. It offers simplified setup and update processes, a minimalistic UI for daily workflow use, stable workflows with versioning and update support, scalability for multiple instances and task workers, multiple user support with integration of different user backends, LLM power for integration with Ollama/Gemini, and seamless integration as a service with backend endpoints and webhook support. The project is approaching version 1.0 release and welcomes new ideas for further implementation.

pentagi
PentAGI is an innovative tool for automated security testing that leverages cutting-edge artificial intelligence technologies. It is designed for information security professionals, researchers, and enthusiasts who need a powerful and flexible solution for conducting penetration tests. The tool provides secure and isolated operations in a sandboxed Docker environment, fully autonomous AI-powered agent for penetration testing steps, a suite of 20+ professional security tools, smart memory system for storing research results, web intelligence for gathering information, integration with external search systems, team delegation system, comprehensive monitoring and reporting, modern interface, API integration, persistent storage, scalable architecture, self-hosted solution, flexible authentication, and quick deployment through Docker Compose.

text-extract-api
The text-extract-api is a powerful tool that allows users to convert images, PDFs, or Office documents to Markdown text or JSON structured documents with high accuracy. It is built using FastAPI and utilizes Celery for asynchronous task processing, with Redis for caching OCR results. The tool provides features such as PDF/Office to Markdown and JSON conversion, improving OCR results with LLama, removing Personally Identifiable Information from documents, distributed queue processing, caching using Redis, switchable storage strategies, and a CLI tool for task management. Users can run the tool locally or on cloud services, with support for GPU processing. The tool also offers an online demo for testing purposes.

recommendarr
Recommendarr is a tool that generates personalized TV show and movie recommendations based on your Sonarr, Radarr, Plex, and Jellyfin libraries using AI. It offers AI-powered recommendations, media server integration, flexible AI support, watch history analysis, customization options, and dark/light mode toggle. Users can connect their media libraries and watch history services, configure AI service settings, and get personalized recommendations based on genre, language, and mood/vibe preferences. The tool works with any OpenAI-compatible API and offers various recommended models for different cost options and performance levels. It provides personalized suggestions, detailed information, filter options, watch history analysis, and one-click adding of recommended content to Sonarr/Radarr.

farfalle
Farfalle is an open-source AI-powered search engine that allows users to run their own local LLM or utilize the cloud. It provides a tech stack including Next.js for frontend, FastAPI for backend, Tavily for search API, Logfire for logging, and Redis for rate limiting. Users can get started by setting up prerequisites like Docker and Ollama, and obtaining API keys for Tavily, OpenAI, and Groq. The tool supports models like llama3, mistral, and gemma. Users can clone the repository, set environment variables, run containers using Docker Compose, and deploy the backend and frontend using services like Render and Vercel.

search_with_ai
Build your own conversation-based search with AI, a simple implementation with Node.js & Vue3. Live Demo Features: * Built-in support for LLM: OpenAI, Google, Lepton, Ollama(Free) * Built-in support for search engine: Bing, Sogou, Google, SearXNG(Free) * Customizable pretty UI interface * Support dark mode * Support mobile display * Support local LLM with Ollama * Support i18n * Support Continue Q&A with contexts.

CrewAI-Studio
CrewAI Studio is an application with a user-friendly interface for interacting with CrewAI, offering support for multiple platforms and various backend providers. It allows users to run crews in the background, export single-page apps, and use custom tools for APIs and file writing. The roadmap includes features like better import/export, human input, chat functionality, automatic crew creation, and multiuser environment support.

ebook2audiobook
ebook2audiobook is a CPU/GPU converter tool that converts eBooks to audiobooks with chapters and metadata using tools like Calibre, ffmpeg, XTTSv2, and Fairseq. It supports voice cloning and a wide range of languages. The tool is designed to run on 4GB RAM and provides a new v2.0 Web GUI interface for user-friendly interaction. Users can convert eBooks to text format, split eBooks into chapters, and utilize high-quality text-to-speech functionalities. Supported languages include Arabic, Chinese, English, French, German, Hindi, and many more. The tool can be used for legal, non-DRM eBooks only and should be used responsibly in compliance with applicable laws.

CrewAI-GUI
CrewAI-GUI is a Node-Based Frontend tool designed to revolutionize AI workflow creation. It empowers users to design complex AI agent interactions through an intuitive drag-and-drop interface, export designs to JSON for modularity and reusability, and supports both GPT-4 API and Ollama for flexible AI backend. The tool ensures cross-platform compatibility, allowing users to create AI workflows on Windows, Linux, or macOS efficiently.

probe
Probe is an AI-friendly, fully local, semantic code search tool designed to power the next generation of AI coding assistants. It combines the speed of ripgrep with the code-aware parsing of tree-sitter to deliver precise results with complete code blocks, making it perfect for large codebases and AI-driven development workflows. Probe is fully local, keeping code on the user's machine without relying on external APIs. It supports multiple languages, offers various search options, and can be used in CLI mode, MCP server mode, AI chat mode, and web interface. The tool is designed to be flexible, fast, and accurate, providing developers and AI models with full context and relevant code blocks for efficient code exploration and understanding.

ps-fuzz
The Prompt Fuzzer is an open-source tool that helps you assess the security of your GenAI application's system prompt against various dynamic LLM-based attacks. It provides a security evaluation based on the outcome of these attack simulations, enabling you to strengthen your system prompt as needed. The Prompt Fuzzer dynamically tailors its tests to your application's unique configuration and domain. The Fuzzer also includes a Playground chat interface, giving you the chance to iteratively improve your system prompt, hardening it against a wide spectrum of generative AI attacks.

openai-edge-tts
This project provides a local, OpenAI-compatible text-to-speech (TTS) API using `edge-tts`. It emulates the OpenAI TTS endpoint (`/v1/audio/speech`), enabling users to generate speech from text with various voice options and playback speeds, just like the OpenAI API. `edge-tts` uses Microsoft Edge's online text-to-speech service, making it completely free. The project supports multiple audio formats, adjustable playback speed, and voice selection options, providing a flexible and customizable TTS solution for users.

comfyui-web-viewer
The ComfyUI Web Viewer by vrch.ai is a real-time AI-generated interactive art framework that integrates realtime streaming into ComfyUI workflows. It supports keyboard control nodes, OSC control nodes, sound input nodes, and more, accessible from any device with a web browser. It enables real-time interaction with AI-generated content, ideal for interactive visual projects and enhancing ComfyUI workflows with efficient content management and display.

WebAI-to-API
This project implements a web API that offers a unified interface to Google Gemini and Claude 3. It provides a self-hosted, lightweight, and scalable solution for accessing these AI models through a streaming API. The API supports both Claude and Gemini models, allowing users to interact with them in real-time. The project includes a user-friendly web UI for configuration and documentation, making it easy to get started and explore the capabilities of the API.
For similar tasks

Zero
Zero is an open-source AI email solution that allows users to self-host their email app while integrating external services like Gmail. It aims to modernize and enhance emails through AI agents, offering features like open-source transparency, AI-driven enhancements, data privacy, self-hosting freedom, unified inbox, customizable UI, and developer-friendly extensibility. Built with modern technologies, Zero provides a reliable tech stack including Next.js, React, TypeScript, TailwindCSS, Node.js, Drizzle ORM, and PostgreSQL. Users can set up Zero using standard setup or Dev Container setup for VS Code users, with detailed environment setup instructions for Better Auth, Google OAuth, and optional GitHub OAuth. Database setup involves starting a local PostgreSQL instance, setting up database connection, and executing database commands for dependencies, tables, migrations, and content viewing.
For similar jobs

sweep
Sweep is an AI junior developer that turns bugs and feature requests into code changes. It automatically handles developer experience improvements like adding type hints and improving test coverage.

teams-ai
The Teams AI Library is a software development kit (SDK) that helps developers create bots that can interact with Teams and Microsoft 365 applications. It is built on top of the Bot Framework SDK and simplifies the process of developing bots that interact with Teams' artificial intelligence capabilities. The SDK is available for JavaScript/TypeScript, .NET, and Python.

ai-guide
This guide is dedicated to Large Language Models (LLMs) that you can run on your home computer. It assumes your PC is a lower-end, non-gaming setup.

classifai
Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence. Tap into leading cloud-based services like OpenAI, Microsoft Azure AI, Google Gemini and IBM Watson to augment your WordPress-powered websites. Publish content faster while improving SEO performance and increasing audience engagement. ClassifAI integrates Artificial Intelligence and Machine Learning technologies to lighten your workload and eliminate tedious tasks, giving you more time to create original content that matters.

chatbot-ui
Chatbot UI is an open-source AI chat app that allows users to create and deploy their own AI chatbots. It is easy to use and can be customized to fit any need. Chatbot UI is perfect for businesses, developers, and anyone who wants to create a chatbot.

BricksLLM
BricksLLM is a cloud native AI gateway written in Go. Currently, it provides native support for OpenAI, Anthropic, Azure OpenAI and vLLM. BricksLLM aims to provide enterprise level infrastructure that can power any LLM production use cases. Here are some use cases for BricksLLM: * Set LLM usage limits for users on different pricing tiers * Track LLM usage on a per user and per organization basis * Block or redact requests containing PIIs * Improve LLM reliability with failovers, retries and caching * Distribute API keys with rate limits and cost limits for internal development/production use cases * Distribute API keys with rate limits and cost limits for students

uAgents
uAgents is a Python library developed by Fetch.ai that allows for the creation of autonomous AI agents. These agents can perform various tasks on a schedule or take action on various events. uAgents are easy to create and manage, and they are connected to a fast-growing network of other uAgents. They are also secure, with cryptographically secured messages and wallets.

griptape
Griptape is a modular Python framework for building AI-powered applications that securely connect to your enterprise data and APIs. It offers developers the ability to maintain control and flexibility at every step. Griptape's core components include Structures (Agents, Pipelines, and Workflows), Tasks, Tools, Memory (Conversation Memory, Task Memory, and Meta Memory), Drivers (Prompt and Embedding Drivers, Vector Store Drivers, Image Generation Drivers, Image Query Drivers, SQL Drivers, Web Scraper Drivers, and Conversation Memory Drivers), Engines (Query Engines, Extraction Engines, Summary Engines, Image Generation Engines, and Image Query Engines), and additional components (Rulesets, Loaders, Artifacts, Chunkers, and Tokenizers). Griptape enables developers to create AI-powered applications with ease and efficiency.