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.

Mox logo

Self-host Mox

v0.0.17

All-in-one mail server for running your own email domain

BetaOpen SourceMIT
Updated2 months ago
LanguageGo
Setup difficultyModerate
Stars
5 942
CPU
any CPU
RAM
512MB
Storage
size of the email messages (no compression currently), an additional 15% overhead for the meta data, plus headroom
Ports
25 (SMTP server accepting deliveries of incoming messages), 443 (HTTPS webserver for the built-in webserver (admin/account/webmail pages, static files)), 8010 (Internal listener serving the /health endpoint used by the docker-compose healthcheck)
Docker
r.xmox.nl/mox
Install with Docker
Webmail mailbox viewWebmail message compose screenSearch in the webmail clientAccount web interface overviewAdmin web interface overviewAdmin web interface domain page

What is Mox?

Mox is a modern, full-featured, open-source mail server written in Go that bundles SMTP, IMAP4, webmail, an admin web interface and junk filtering into one application, so you can run email for your own domain(s) without assembling half a dozen components. It handles the hard parts of modern email automatically: SPF/DKIM/DMARC, DANE and MTA-STS, TLS via ACME with Let's Encrypt, reputation-based and Bayesian spam filtering, account autodiscovery, DMARC/TLS aggregate reports, and an HTTP/JSON webapi plus webhooks for transactional email. A built-in webserver can also serve static files or reverse-proxy on port 443, and Prometheus metrics with structured logging help with operations. You install it by downloading a binary (or using the Docker image), running the quickstart command, and adding the DNS records it prints; upgrades are usually just replacing the binary and restarting. Mox needs no external database and runs happily on a small 512MB RAM machine. It is licensed under MIT, is versioned 0.0.x, and has explicit non-plans: no POP3, no unauthenticated SMTP relay, and no maildir/Maildir file-system access. Sieve filtering, JMAP, CalDAV and OAuth2 SSO are roadmap items, not current features.

Mox alternatives

Should you self-host Mox?

Mox scores 63/100 on selfhost.directory (how scoring works) and ranks #7 of 16 in Mail Server. It has 5 942 GitHub stars, +48 in the last 30 days.

It shipped 2 stable releases in the past year. The latest, v0.0.17, came out on 19 August 2026. New versions land roughly every 1 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Stalwart Mail Server (79/100, 15 907 stars). It scores higher overall, so compare the two before you pick. See Mox vs Stalwart Mail Server side by side.

Features

  • Account autodiscoveryClient support is limited.
  • Admin web interface
  • Automatic TLS via ACME
  • Bayesian spam filtering
  • Built-in webserver with reverse proxy
  • DANE and MTA-STS
  • HTTP/JSON API and webhooks
  • IMAP4 email access
  • Internationalized email
  • POP3Listed under "Not supported/planned".
  • Prometheus metrics and structured logging
  • Reputation-based junk filtering
  • SMTP server and client
  • SPF/DKIM/DMARC
  • Webmail

Mox README

Mox is a modern full-featured open source secure mail server for low-maintenance self-hosted email.

For more details, see the mox website, https://www.xmox.nl.

See Quickstart below to get started.

Features

How to install Mox

Install Mox with Docker

docker run
-p 127.0.0.1:25:1025
-p 127.0.0.1:465:1465
-p 127.0.0.1:587:1587
-p 127.0.0.1:993:1993
-p 127.0.0.1:143:1143
-p 127.0.0.1:443:1443
-p 127.0.0.1:80:1080
r.xmox.nl/mox:latest mox localserve -ip 0.0.0.0

Example from the docker-compose file comments for running the local test instance; production uses the compose service with network_mode host.

How to configure Mox

  • CheckUpdatesConfig option in mox.conf; mox checks for a new version via a DNS TXT request for _updates.xmox.nl once per 24h.

    values: true

  • MOX_DOCKEREnvironment variable in the docker-compose file; with value yes the quickstart won't try to write a systemd service file.

    values: yes

  • ACMETLS section of a Listener in mox.conf; e.g. letsencrypt for automatic certificates, can be replaced with KeyCerts.

    values: letsencrypt

  • TransportsSection in mox.conf defining outgoing transports (SMTP relay, authenticated submission, SOCKS proxy) used with Routes.
  • RoutesSection in domains.conf sending some or all messages through a configured Transport.

Mox releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Can mox deliver through a smarthost?

Yes, configure a Transport in mox.conf and Routes in domains.conf to send some or all messages via an SMTP relay, authenticated submission, or SOCKS proxy.

Won't the big email providers block my email?

Running your own server still works if done properly; rejections usually come from bad IP reputation, so choose a provider with good reputation — the quickstart checks your IPs against common blocklists.

What are the minimum requirements to run mox?

Very little: a machine with 512MB RAM and any CPU suffices; plan storage for message sizes plus about 15% metadata overhead and some headroom.

I'm now running an email server, but how does email work?

The FAQ points to an external in-depth explainer at explained-from-first-principles.com/email/ so operators understand how email works.

How secure is mox?

Security is a high priority, with automated security tests and fuzzing, but the project is young so bugs are expected; report issues by email to the maintainer.

How do I upgrade my mox installation?

Typically you replace the binary and restart; before upgrading, take a snapshot with "mox backup" and validate it with "mox verifydata", and check release notes for manual steps.

How do I stay up to date?

Set "CheckUpdates: true" in mox.conf so mox checks a DNS TXT record daily and delivers changelog notes to the postmaster; you can also watch GitHub releases.

How do I configure a second mox instance as a backup MX?

There is no backup-MX option yet because reputation data would not be shared; run a single SMTP server instead, since delivery is retried for hours during temporary failures.

How do I change my password?

Users change passwords on the account page or with "mox setaccountpassword"; the admin can change any account password on the admin page, or set their own with "mox setadminpassword".

Where can I discuss mox?

In the #mox channels on OFTC IRC, Matrix, or Gopher Slack; bug reports go to the GitHub issue tracker.

How can I help?

Mox mainly needs users testing it in real setups and filing issues; pull requests are welcome too, ideally after starting an issue for large changes.

How do I import/export email?

Use the import/export features on the accounts web page or the "mox import maildir"/"mox import mbox" (and export equivalents) subcommands, or copy messages with any IMAP client.

Is Mox affected by SMTP smuggling?

No, mox only treats "\r\n.\r\n" as end-of-message; since v0.0.9 it also rejects transactions containing bare carriage returns.

Where is the documentation?

Documentation is generated from and integrated with the code; the commands and config references on xmox.nl show every field, and "mox help" prints the same information.

Why a new mail server implementation?

Existing mail software often requires configuring many separate components, which discouraged people from running servers. Mox aims to make running your own mail server easy so email stays decentralized.

More in Mail Server

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…