selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

OmniMail logo

Self-host OmniMail

v1.3.0

Multi-domain webmail on Cloudflare Workers

BetaOpen SourceMIT
Updatedlast week
LanguageTypescript
Setup difficultyAdvanced
ThemeDark mode
Stars
268
Requires
Cloudflare D1, Cloudflare Email Routing, Cloudflare Queues, Cloudflare R2, Cloudflare Workers

What is OmniMail?

OmniMail is a self-hosted webmail that runs entirely on Cloudflare's serverless platform. It uses Cloudflare Email Routing to receive mail for your domains, stores messages in D1 (SQLite) and R2 (object storage), and processes emails asynchronously via Queues. A single instance manages multiple domains, users, and mailboxes with a full permission model (super admin, admin, user, temporary). Optional sending is provided via Resend or SendFlare. It also aggregates external accounts: iCloud+ Hide My Email aliases, Gmail/Workspace via IMAP, Microsoft (Outlook/Hotmail/365) via OAuth2+IMAP, QQ Mail via authorization codes, NAVER and Yandex via app passwords. The UI is a React SPA with light/dark/system themes, responsive for desktop and mobile. A Chrome extension (OmniMail Float) and a native Android app connect to the same API. Deployment is Git-driven via Cloudflare Workers Builds — either a one-click deploy or a Fork for long-term updates. The project is MIT-licensed and currently at v1.3.0 (Web/API) with Android in preview (0.3.0).

Should you self-host OmniMail?

OmniMail scores 47/100 on selfhost.directory (how scoring works) and ranks #72 of 106 in Email. It has 268 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v1.3.0, came out on 16 October 2026. New versions land roughly every 4 days.

Setup is advanced: plan for several services and some ongoing maintenance. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Listmonk (80/100, 24 017 stars). It scores higher overall, so compare the two before you pick. See OmniMail vs Listmonk side by side.

Features

  • Catch-all email routing
  • Chrome extension (OmniMail Float)Manifest V3; Chrome Web Store or dev build
  • Gmail aggregationRequires Google app passwords
  • iCloud Hide My Email integrationRequires iCloud+ subscription
  • Linux DO Mail integrationRequires Linux DO Mail account
  • Microsoft/Outlook integrationRead-only; requires OAuth2
  • Multi-domain webmail
  • NAVER Mail integrationRead-only; personal @naver.com only
  • QQ Mail integrationPersonal @qq.com only; requires IMAP/SMTP enabled
  • Responsive Web UI
  • Role-based Access Control
  • TOTP two-factor authentication
  • Yandex Mail integrationRead-only; personal @yandex.com only

OmniMail README

How to configure OmniMail

  • APP_NAMEOmniMailCustom site name, default 'OmniMail'

    Custom site name, default 'OmniMail'

  • APP_ORIGINSAdditional allowed cross-origin frontends, dev builds, or extension IDs (comma-separated exact origins)

    Additional allowed cross-origin frontends, dev builds, or extension IDs (comma-separated exact origins)

  • CLOUDFLARE_ACCOUNT_IDCloudflare Account ID needed for backups

    Cloudflare Account ID needed for backups

  • COOKIE_SECUREtrueKeep true in production; only false for local HTTP development

    Keep true in production; only false for local HTTP development

    values: true,false

  • D1_DATABASE_IDProduction D1 Database ID needed for backups

    Production D1 Database ID needed for backups

  • D1_REST_API_TOKENCloudflare API Token with D1 Edit permission for backups

    Cloudflare API Token with D1 Edit permission for backups

  • GMAIL_CREDENTIALS_KEYAt least 32 bytes for encrypting Gmail app passwords

    At least 32 bytes for encrypting Gmail app passwords

  • GMAIL_IMAP_ENABLEDtrueEmergency feature flag; set 'false' to hide/disable Gmail integration, default enabled

    Emergency feature flag; set 'false' to hide/disable Gmail integration, default enabled

    values: true,false

  • ICLOUD_CREDENTIALS_KEYAt least 32 bytes for encrypting iCloud Cookie and app-specific password

    At least 32 bytes for encrypting iCloud Cookie and app-specific password

  • LINUX_DO_CLIENT_IDLinux DO Connect Client ID

    Linux DO Connect Client ID

  • LINUX_DO_CLIENT_SECRETLinux DO Connect Client Secret

    Linux DO Connect Client Secret

  • LINUX_DO_MAIL_CREDENTIALS_KEYAt least 32 bytes for encrypting Linux DO Mail password or auth token

    At least 32 bytes for encrypting Linux DO Mail password or auth token

  • MAIL_CREDENTIALS_KEYRecommended unified key (>=32 random UTF-8 bytes) for encrypting all external mailbox credentials

    Recommended unified key (>=32 random UTF-8 bytes) for encrypting all external mailbox credentials

  • MICROSOFT_CREDENTIALS_KEYAt least 32 bytes for encrypting Microsoft OAuth tokens and optional combination password

    At least 32 bytes for encrypting Microsoft OAuth tokens and optional combination password

  • MICROSOFT_MAIL_ENABLEDtrueEmergency feature flag; set 'false' to hide/disable Microsoft integration, default enabled

    Emergency feature flag; set 'false' to hide/disable Microsoft integration, default enabled

    values: true,false

  • NAVER_MAIL_CREDENTIALS_KEYAt least 32 bytes for encrypting NAVER app passwords

    At least 32 bytes for encrypting NAVER app passwords

  • QQ_MAIL_CREDENTIALS_KEYAt least 32 bytes for encrypting QQ Mail authorization codes

    At least 32 bytes for encrypting QQ Mail authorization codes

  • QQ_MAIL_IMAP_ENABLEDtrueEmergency feature flag; set 'false' to hide/disable QQ Mail integration, default enabled

    Emergency feature flag; set 'false' to hide/disable QQ Mail integration, default enabled

    values: true,false

  • RESEND_DOMAIN_CONFIGSJSON Secret mapping sending domains to Resend API Keys and optional from addresses

    JSON Secret mapping sending domains to Resend API Keys and optional from addresses

  • RESEND_WEBHOOK_SECRETSingle Resend Webhook Signing Secret (legacy)

    Single Resend Webhook Signing Secret (legacy)

  • RESEND_WEBHOOK_SECRETSJSON array of multiple Resend Webhook Signing Secrets

    JSON array of multiple Resend Webhook Signing Secrets

  • SENDFLARE_API_KEYSendFlare global API Key for sending/replying

    SendFlare global API Key for sending/replying

  • SENDFLARE_DOMAIN_CONFIGSJSON Secret mapping sending domains to SendFlare API Keys and optional from addresses

    JSON Secret mapping sending domains to SendFlare API Keys and optional from addresses

  • SENDFLARE_FROMOptional fixed from email address for SendFlare

    Optional fixed from email address for SendFlare

  • SETUP_TOKENOne-time token for initial super admin creation (min 32 random UTF-8 bytes)

    One-time token for initial super admin creation (min 32 random UTF-8 bytes)

  • SUPER_ADMIN_EMAILSuper admin login email address

    Super admin login email address

  • TOTP_ENCRYPTION_KEYAt least 32 random characters for encrypting admin TOTP secrets

    At least 32 random characters for encrypting admin TOTP secrets

  • TURNSTILE_SECRET_KEYTurnstile private Secret Key

    Turnstile private Secret Key

  • TURNSTILE_SITE_KEYTurnstile public Site Key for registration/invite verification

    Turnstile public Site Key for registration/invite verification

  • UPDATE_REPOSITORYmibgb65-cloud/OmniMailRelease source repository, default 'mibgb65-cloud/OmniMail'

    Release source repository, default 'mibgb65-cloud/OmniMail'

  • VITE_API_ORIGINhttp://localhost:8787Local development only; production uses same-origin /api requests

    Local development only; production uses same-origin /api requests

OmniMail releases & version history

More in Self-hosting

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…