Quick Answer

Stalwart Mail Server is a Rust-based, all-in-one email server supporting SMTP, IMAP, JMAP, and ManageSieve. Install via Docker or native binary, configure DNS (MX, SPF, DKIM, DMARC, PTR), and access the web admin panel. It's lighter than Mailcow (runs on 512MB RAM), faster due to Rust, and supports modern protocols like JMAP that Mailcow doesn't.

Stalwart Mail Server Setup Guide: The Rust Alternative

By Braedon·Mailflow Authority·Self-Hosted SMTP

Why Stalwart

Stalwart Mail Server is the newer option in the self-hosted email space. Written in Rust, it's a single binary that handles everything: SMTP, IMAP, JMAP, spam filtering, and administration.

See our full comparison for a deeper breakdown. Where it stands compared to alternatives:

FeatureStalwartMailcowPostal
LanguageRustPostfix/Dovecot (C) + DockerRuby + Docker
RAM minimum512MB2GB2GB
JMAP supportYesNoNo
Built-in webmailNoYes (SOGo)No
Spam filteringBuilt-inRspamdSpamAssassin
Web adminYesYesYes
MaturityNewerEstablishedEstablished

Stalwart's advantage: resource efficiency and modern protocol support. Its disadvantage: smaller community and less battle-tested in production.

Requirements

  • VPS: 1GB RAM minimum (2GB recommended)
  • OS: Ubuntu 22.04, Debian 12, or any Linux
  • Port 25 open at your VPS provider
  • Domain with full DNS control
  • Clean IP (check blacklists before deploying)

Stalwart runs on half the resources of Mailcow. A $3-5/month VPS handles it comfortably.

Installation

Option 1: Docker (Recommended)

mkdir -p /opt/stalwart
docker run -d \
  --name stalwart \
  -p 25:25 -p 143:143 -p 443:443 -p 587:587 -p 993:993 -p 4190:4190 -p 8080:8080 \
  -v /opt/stalwart/data:/opt/stalwart-mail \
  stalwartlabs/mail-server:latest

Option 2: Native Binary

curl -sSL https://get.stalw.art | sh

The installer downloads the appropriate binary and creates a systemd service.

Initial Configuration

Access the admin panel at https://YOUR_SERVER_IP:443 or http://YOUR_SERVER_IP:8080.

Default admin credentials are generated during first startup. Check the logs:

docker logs stalwart 2>&1 | grep "admin"

In the admin panel:

  1. Add your domain — Configuration → Domains → Add
  2. Create mailboxes — Accounts → Add account
  3. Configure TLS — add Let's Encrypt or your own certificate
  4. Generate DKIM key — the admin panel provides the DNS record to add

DNS Configuration

Same records as any mail server. See the complete DNS guide for details specific to each record.

# A Record
mail.yourdomain.com    A    YOUR_SERVER_IP

# MX Record
yourdomain.com    MX    10    mail.yourdomain.com

# SPF
yourdomain.com    TXT    "v=spf1 ip4:YOUR_SERVER_IP -all"

# DKIM (from Stalwart admin panel)
default._domainkey.yourdomain.com    TXT    "v=DKIM1; k=rsa; p=..."

# DMARC
_dmarc.yourdomain.com    TXT    "v=DMARC1; p=none; rua=mailto:[email protected]"

Set the PTR record at your VPS provider to mail.yourdomain.com.

Stalwart-Specific Features

JMAP Support

JMAP (JSON Meta Application Protocol) is the modern replacement for IMAP. It's faster, supports push notifications, and handles email, contacts, and calendars in one protocol.

Most email clients don't support JMAP yet, but it's future-proof. Stalwart supports both IMAP and JMAP simultaneously.

Built-In Spam Filtering

Stalwart includes spam filtering without external dependencies:

  • DNS blacklist (DNSBL) checking
  • SPF, DKIM, DMARC verification
  • Bayesian filtering (learns from your mail)
  • Custom rules via the admin panel

It's simpler than Rspamd but sufficient for most deployments.

Single Binary Architecture

Unlike Mailcow (10+ Docker containers) or Postal (Ruby + MariaDB + RabbitMQ), Stalwart runs as a single process. This means:

  • Less memory overhead
  • Simpler debugging (one log stream)
  • Faster startup
  • Fewer potential failure points

Practitioner note: I've deployed Stalwart for clients who need an email server on tight-resource VPSes. A 1GB RAM instance runs Stalwart comfortably where Mailcow would be swapping to disk. For pure efficiency, Stalwart wins. For feature completeness, Mailcow still has the edge.

Connecting to External Services

SMTP Relay (GoHighLevel, n8n, etc.)

Use the same approach as Mailcow:

  • Host: mail.yourdomain.com
  • Port: 587
  • Encryption: STARTTLS
  • Username/password: a Stalwart account

API Integration

Stalwart provides a REST API for account management, domain configuration, and server monitoring. Use it for automation and integration with your existing tools.

When to Choose Stalwart

Choose Stalwart if:

  • Your VPS has limited RAM (1-2GB)
  • You want a lightweight, efficient mail server
  • You're interested in JMAP protocol support
  • You prefer a single-binary architecture
  • You don't need built-in webmail

Choose Mailcow if:

  • You want built-in webmail (SOGo/Roundcube)
  • You need Rspamd's advanced spam filtering
  • Community size and documentation matter to you
  • You're managing multiple domains with a web UI

Practitioner note: Stalwart is the most impressive new entrant in the self-hosted email space. It's technically superior to Mailcow in several ways. But Mailcow's ecosystem — documentation, community, tutorials, integrations — is years ahead. I recommend Stalwart for technically confident users and Mailcow for everyone else.

Practitioner note: Watch Stalwart's development closely. The Rust email server space is maturing fast. Within 1-2 years, Stalwart may overtake Mailcow as the default self-hosted recommendation. The performance advantages are significant.

If you're evaluating self-hosted email options and want guidance on which platform fits your use case, schedule a consultation — I'll help you choose and deploy the right solution.

Sources


v1.0 · April 2026

Frequently Asked Questions

What is Stalwart Mail Server?

Stalwart is an open-source email server written in Rust. It provides SMTP (sending/receiving), IMAP (mailbox access), JMAP (modern API protocol), and a web admin panel in a single binary. It's designed to be lightweight, fast, and easy to deploy.

Is Stalwart better than Mailcow?

Stalwart uses less resources (512MB RAM vs 2GB for Mailcow), is faster due to Rust, and supports JMAP. Mailcow has a more mature ecosystem, better documentation, built-in webmail (SOGo/Roundcube), and larger community. Choose Stalwart for efficiency, Mailcow for features.

Can Stalwart handle high email volume?

Yes. Rust's performance means Stalwart handles high throughput with minimal resources. It's suitable for 100K+ emails/month on modest hardware. For extreme volume (1M+/month), KumoMTA is purpose-built for high-volume sending.

Does Stalwart include spam filtering?

Stalwart includes built-in spam filtering with configurable rules, DNS-based blacklist checking, and Bayesian filtering. It's not as feature-rich as Rspamd (used by Mailcow), but handles standard spam filtering without external dependencies.

How do I migrate from Mailcow to Stalwart?

Export mailboxes from Mailcow via IMAP sync, set up Stalwart with the same DNS records, import mail via IMAP, update MX records to point to Stalwart, and decommission Mailcow. Plan for 1-2 days of migration with parallel running.

Want this handled for you?

Free 30-minute strategy call. Walk away with a plan either way.