Getting Started

Install & Setup Guide

MailFlow comes in two flavors: the Desktop Suite (five native apps for Windows, Mac and Linux β€” free for personal use) and a self-hosted web edition (multi-user server for your team). Both connect to the mail server you already have β€” nothing about your existing email setup changes.

πŸ–₯️ Desktop Suite β€” Windows, Mac & Linux
Windows 10/11, macOS 11+, or Linux. One download, five apps: mail, calendar, notes, contacts, chat. No server, no database to manage.
🌐 Web Edition β€” Self-Hosted Server
Linux/macOS + MariaDB + your IMAP server. One binary, unlimited mailboxes, full collaboration.

Desktop Suite β€” Windows, Mac & Linux

One download gives you five native apps β€” MailFlow (email), CalendarFlow, NoteFlow, ContactFlow, and ChatFlow β€” with per-app taskbar/Dock icons, unread badges, desktop notifications, and one sign-in shared across all of them.

Step 1 β€” Download

One file per platform installs the whole suite:

Step 2 β€” Install

Linux requirements: the apps use your system's WebKit (GTK3 + webkit2gtk-4.1), which Debian 12, Ubuntu 22.04/24.04, Fedora, and most current distros already include. If a first launch complains about a missing library, install the runtime package: sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0 (Debian/Ubuntu) or sudo dnf install webkit2gtk4.1 gtk3 (Fedora). Data lives in ~/.config/MailFlowSuite/ (shared sign-in) and ~/.config/MailFlow/ (per-app logs); delete both to reset. Updating = download the new tar.gz and re-run install.sh β€” data and sign-in are untouched.
macOS Gatekeeper (first launch): the apps aren't code-signed, so the first launch of each app is blocked with "…can't be opened because it is from an unidentified developer" (or "checked for malicious software"). Right-click the app β†’ Open β†’ Open in the dialog β€” or run xattr -dr com.apple.quarantine /Applications/MailFlow.app in Terminal for each app. One-time per app; it launches normally afterwards.

Step 3 β€” First run: pick a mode

The first time you open any suite app it asks how you'll use it:

FieldTypical valueNotes
IMAP servermail.example.comReceives mail. Usually your mail host or imap.your-domain
IMAP port993 + TLS993 = implicit TLS (recommended). Use 143 with TLS off only on trusted LANs.
SMTP servermail.example.comSends mail. Usually your mail host or smtp.your-domain
SMTP port587 + TLS587 = STARTTLS (most common). Port 465 also supported (implicit TLS).

MailFlow authenticates directly against your IMAP server β€” there is no separate MailFlow account to create and your password never leaves your machine (it's stored encrypted locally).

Gmail / Google Workspace: enable IMAP in Gmail settings and create an App Password (google.com β†’ Account β†’ Security β†’ 2-Step Verification β†’ App passwords), then use imap.gmail.com:993 and smtp.gmail.com:587 with the app password. The same app-password pattern applies to any provider that doesn't accept plain passwords over IMAP.

Your first sign-in starts the initial sync β€” existing folders and message history are pulled in, then kept current with IMAP IDLE push. New mail shows a desktop notification and the MailFlow taskbar badge counts unread.

Step 4 β€” The five apps

Where your data lives

PlatformData directory
WindowsC:\Users\you\AppData\Local\MailFlowSuite\ and C:\Users\you\AppData\Roaming\MailFlow\
macOS~/Library/Application Support/MailFlowSuite/ (suite config & shared sign-in) and ~/Library/Application Support/MailFlow/ (local database, attachments, per-app logs)
Linux~/.config/MailFlowSuite/ (suite config & shared sign-in) and ~/.config/MailFlow/ (local database, attachments, per-app logs)

The first holds the suite's apps and shared settings; the second holds your local database, attachments, and per-app logs. Updating on Windows = run the new installer β€” your data and sign-in are untouched (or just click Install when the in-app update banner appears). Updating on macOS = download the new DMG and drag over the old apps β€” data and sign-in are untouched. Updating on Linux = download the new tar.gz and re-run install.sh β€” data and sign-in are untouched. Uninstalling = Windows Settings β†’ Apps β†’ MailFlow Desktop Suite, on macOS drag the apps to the Trash, or on Linux remove ~/.local/share/mailflow-suite and the mailflow-suite-* menu entries (data folders remain until you delete them).

Web Edition β€” Self-Hosted Server

The full multi-user deployment: one Go binary and a web-based setup wizard. Point it at your MariaDB or use the built-in SQLite, connect your existing IMAP/SMTP server, paste your license key β€” done. Serves your team at https://mail.yourcompany.com.

Requirements

Step 1 β€” Run the binary

The server is a single static binary. Run it from its own directory:

/etc/systemd/system/mailflow.service
[Unit]
Description=MailFlow
After=network.target

[Service]
WorkingDirectory=/opt/mailflow
ExecStart=/opt/mailflow/mailflow-go
Restart=on-failure
User=mailflow

[Install]
WantedBy=multi-user.target
shell
sudo systemctl daemon-reload
sudo systemctl enable --now mailflow

Step 2 β€” The setup wizard

On first boot (no configuration present) MailFlow serves a setup wizard at http://your-server:5174/ instead of the app. It walks you through:

  1. Database β€” MariaDB/MySQL host, port, name, credentials (with a live Test connection button; the database is created for you if it doesn't exist and your user has privileges) or the built-in SQLite engine.
  2. Mail servers β€” IMAP and SMTP host/port/TLS, each testable live before you continue.
  3. License β€” paste the key CTI sent you and verify what it unlocks (customer name, tier, user count). Required β€” the wizard does not finish without a valid key.
  4. HTTPS & Install β€” optionally enable built-in Let's Encrypt HTTPS (see Step 3), review the summary, and install: MailFlow writes setup.json, runs the database migrations with a progress bar, and tells you when to restart the service.

After the restart the app is live: browse to it and sign in with your own email address and mail password β€” MailFlow validates credentials against your IMAP server. The first account to sign in automatically becomes the admin. Teammates simply sign in with their mailbox credentials; accounts are provisioned on first login (up to your tier's user limit).

All the wizard settings can still be provided (or overridden) the classic way via a .env file β€” see the environment reference below. The wizard's setup.json takes precedence over .env for the sections it defines.

Step 3 β€” HTTPS

Built-in (recommended): MailFlow embeds Caddy's TLS engine. Add one line to .env (or fill the HTTPS box in the wizard) and it obtains and renews Let's Encrypt certificates itself β€” no proxy, no certbot, no cron:

/opt/mailflow/.env
AUTO_TLS_DOMAINS=mail.example.com   # your DNS name, pointed at this server
# AUTO_TLS_EMAIL=you@example.com   # optional ACME contact
# DISABLE_HTTP=true                # optional: turn off the plain-HTTP port

MailFlow then serves https:// on port 443 directly (HTTP/2 included) and redirects port 80 to it. Your DNS record must point at the server and ports 80/443 must be reachable from the internet β€” validation happens over HTTP-01/TLS-ALPN-01, no DNS provider setup needed.

Own proxy instead? Fine β€” just don't set AUTO_TLS_DOMAINS. MailFlow stays plain HTTP on its port and you terminate TLS wherever you like:

Caddyfile
mail.example.com {
    reverse_proxy 127.0.0.1:5174
}

nginx works too (proxy_pass to 127.0.0.1:5174; leave buffering on). HTTPS isn't optional in practice β€” browsers only allow passkey registration on secure origins.

Step 4 β€” First login & users

  1. Browse to https://mail.example.com and sign in with your own email address and mail password β€” MailFlow validates credentials against your IMAP server.
  2. The first account to sign in automatically becomes the admin (server settings, user list, backups).
  3. There is no user-creation screen for everyone else: teammates simply sign in with their mailbox credentials and their account is provisioned on first login.
  4. Each user can register a passkey from Settings β†’ Passkeys and generate API keys from Settings β†’ API Keys.
Users live in your mail server, not in MailFlow. Disable a mailbox on the IMAP side and the matching MailFlow login stops working β€” one place to manage people.

Environment reference (.env)

Every wizard setting has an environment-variable equivalent in .env (next to the binary, same directory you run it from) and a command-line flag (mailflow-go --port=8080 β€” run --help for the list). setup.json β€” written by the wizard β€” takes precedence over .env for the sections it defines; command-line flags override everything.

VariableDefaultWhat it does
LICENSE_KEYβ€”Required. Your MF1.… license key. Verified at startup; invalid keys refuse to boot.
PORT5174Plain-HTTP listen port. Change it if 5174 is taken or you proxy to a different loopback port.
ORIGINhttp://localhost:5174Public HTTPS origin β€” must match exactly for passkey login.
DB_HOST DB_PORT DB_NAME DB_USER DB_PASSsee .env.exampleMariaDB/MySQL connection. DB_NAME=sqlite switches to the built-in SQLite backend (SQLITE_PATH picks the file).
IMAP_HOST IMAP_PORT IMAP_TLSlocalhost 993 trueYour IMAP server β€” users authenticate against it.
SMTP_HOST SMTP_PORT SMTP_TLSlocalhost 587 trueYour SMTP server for sending.
JWT_SECRETβ€”Session key; also derives the encryption key for stored IMAP passwords. Random 32-byte hex (openssl rand -hex 32). The wizard generates one.
ATTACHMENT_DIR./attachmentsAttachment storage (shared volume in cluster mode).
AUTO_TLS_DOMAINSunsetEnables built-in Let's Encrypt HTTPS on :443 (see Step 3). Unset = plain HTTP on PORT for your own proxy.
CLUSTER_ROLE CLUSTER_SHARD_INDEX CLUSTER_SHARD_COUNTall 0 1Cluster mode: run several nodes on one shared MariaDB. web = UI only, worker = mail sync for its shard of users, all = single server.

Updating & backups