Stalwart: an all-in-one mail server on a VPS
What Stalwart's single Rust binary replaces in a Postfix and Dovecot stack, what it cannot fix, and when a mailcow install is still the better call.
What Stalwart collapses into one binary
Stalwart is a mail server you run on one VPS as a single Rust binary. It answers SMTP, IMAP, POP3, JMAP, CalDAV, CardDAV and WebDAV from the same process, and it carries its own spam filter, its own message store and its own ACME client. A conventional stack does that same work with Postfix, Dovecot, Rspamd, a database for accounts and a separate certificate tool. Stalwart replaces all of it with one service unit and one config file at /etc/stalwart/config.json.
Every figure, setting name and command below is quoted from Stalwart's own documentation, release pages and install script. We first read them on 28 August 2026 against release v0.16.19 (published 24 August 2026) and re-checked them on 12 October 2026, when the newest release was v0.16.26. We checked them again on 27 October 2026, the day after Stalwart v1.0.0 was published (26 October 2026). We re-checked the sources on 29 October 2026, when the newest release was v1.0.1, published 28 October 2026. These are commands for you to run on your own server. Each one is followed by the check that tells you whether it worked.
Stalwart is dual licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) and the Stalwart Enterprise License v2. Some features are enterprise only. The documented HTTP endpoint list marks /scim/v2/* that way. Read the licence terms before you plan a deployment around a feature you have not run yourself.
One binary is a real cut in moving parts. It is not a cut in the two things that decide whether your mail arrives.
Port 25 and DNS reputation do not care which software you run
Outbound TCP port 25 is the first gate. Many VPS providers block it by default on new accounts, and a blocked port 25 means your server cannot hand mail directly to anyone else's mail server. Test it before you install anything.
sudo apt update && sudo apt install -y netcat-openbsd
nc -vz -w 5 alt1.aspmx.l.google.com 25A healthy result prints Connection to alt1.aspmx.l.google.com ... 25 port [tcp/smtp] succeeded! in about a second. A block shows up in one of two ways. If the packets are dropped upstream, nothing sends a reset back to you, so nc hangs for the full five seconds and then prints nc: connect to alt1.aspmx.l.google.com port 25 (tcp) failed: Connection timed out. If the firewall rejects them instead, it sends an ICMP error back (netfilter's reject sends port unreachable unless it is told to send something else, such as administratively prohibited), so the failure comes back at once, typically as Connection refused or No route to host. Either way, open a ticket with your provider.
If the provider will not open it, the one way around is a relay. Stalwart can hand all outbound mail to a smarthost through a Relay route, whose port defaults to 25 but accepts any value from 1 to 65535, with an implicitTls switch and authUsername and authSecret fields for an authenticated relay on 465 or 587. Your mail then leaves under the relay's reputation, not your own.
The second gate is what receiving networks think of your IP address and your domain. That means reverse DNS on the IP, SPF, DKIM, DMARC, and the sending history of the address block you landed in. Stalwart's DNS setup page, as we read it on 28 August 2026, was blunt about where that work happens: reverse DNS records "are typically configured by the hosting provider, not by Stalwart itself". Stalwart can publish and maintain the other DNS records through a supported DNS provider's API, but reverse DNS and IP reputation still depend on your provider.
So this page does not re-teach those records. We have one that does: SPF, DKIM and DMARC set up once for everything that sends mail. If you have not yet decided whether to run your own mail at all, start with our honest look at whether self-hosted email is still worth it. Choosing Stalwart changes none of that arithmetic.
What a small VPS needs to run a Stalwart mail server
Stalwart's system requirements page, read on 27 October 2026, no longer gives a figure per user. It says an idle server "stays well below" its memory limits, and that CPU use depends on mail volume and sign-ins, not on the number of accounts. Password hashing is deliberately slow, so a server with many sign-ins needs more cores. The page's only sizing example is a host with 2 GiB of RAM, where the default limits add up to about 2.4 GiB. That total includes two 512 MiB reservations for very large accounts, which stay empty if you have none. The FAQ adds that no measured figure of users per node is published.
Connections are capped per listener, not per server. maxConnections defaults to 8,192 on each listener that has no setting of its own, so the process file descriptor limit has to cover several times that. The install script raises it to 65536. A service started another way often gets 1024, which the page calls too low for production.
That page states no minimum disk size. Its benchmark measured about 0.95 GB of disk per GB of mail on RocksDB, and noted that attachments which are already compressed, such as images and PDFs, may need more. Size the disk for the mail you expect to keep, plus headroom for the store to compact.
Three outbound paths must work, or the server looks broken in ways that have nothing to do with mail. It downloads the web interface bundle at startup from https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip. It reaches https://acme-v02.api.letsencrypt.org/directory for Let's Encrypt certificates. It needs DNS on UDP and TCP port 53 for MX and authentication record lookups, unless the resolver is set to DNS over HTTPS or TLS. The spam filter rules and the IP-to-ASN and country lists also come from GitHub. A locked-down egress firewall that blocks the first one gives you a running mail server whose /admin and /account pages return 404.
Install a pinned release, not "latest"
The official installer is a shell script. Read it before you run it.
curl --proto '=https' --tlsv1.2 -sSf https://get.stalw.art/install.sh -o install.sh
less install.sh
sudo sh install.shReading that script on 27 October 2026 shows exactly what it does. It creates a stalwart service account and the directories it needs. It then downloads from https://github.com/stalwartlabs/stalwart/releases/latest/download. The binary lands at /usr/local/bin/stalwart with mode 0755. Config goes to /etc/stalwart/config.json, data to /var/lib/stalwart, logs to /var/log/stalwart, all three directories mode 0750 owned by stalwart. An environment file is written to /etc/stalwart/stalwart.env with mode 0640 owned by root:stalwart. The script takes one optional install prefix and a --fdb flag for the FoundationDB build. It takes no version argument.
That last point matters. The script always pulls the newest release. Two servers built a week apart run the same release if none is published between installations. On 26 October 2026 the newest release became v1.0.0, and that one changed the database layout. Its release notes say existing v0.16.x deployments "cannot be upgraded in place", and the v1.0 announcement says a v1.0 server will not open a store created by an earlier version. Within the 1.x line, Stalwart's upgrading page says that rerunning the install script "replaces the binary, keeps config.json and the environment file, and restarts the service", and the FAQ says to back up the data stores and config.json before every minor or major upgrade. The 0.16 line alone shipped seven patch releases between 24 August and 11 October 2026, several of them with security fixes, so pin the newest release and move the pin on purpose.
STALWART_TAG=v1.0.1
curl -fsSLO "https://github.com/stalwartlabs/stalwart/releases/download/${STALWART_TAG}/stalwart-x86_64-unknown-linux-gnu.tar.gz"
tar zxf stalwart-x86_64-unknown-linux-gnu.tar.gz
sudo systemctl stop stalwart
sudo install -m 0755 -o root -g root stalwart /usr/local/bin/stalwart
sudo systemctl start stalwart
systemctl is-active stalwartsystemctl is-active stalwart should print active. Anything else, read journalctl -u stalwart -n 50. The Linux release asset ships with a matching .sigstore.json bundle, so the download's signature is verifiable before you install it.
If the server already runs a 0.16 release, do not drop a 1.x binary over it. Update to v0.16.27 first, then follow the migration route in the section on moving existing mail in, below.
The unit the script writes runs as User=stalwart, sets AmbientCapabilities=CAP_NET_BIND_SERVICE and sets LimitNOFILE=65536. That capability is the reason an unprivileged account can bind ports 25, 443, 465 and 993. If you write your own unit later and leave that line out, listeners on privileged ports fail to bind; Stalwart skips those listeners, starts the others and logs a registry.build-error event for each failed listener. Copy the file limit too, for the reason given in the requirements section.
Where the first admin password is printed
Stalwart starts in bootstrap mode and writes a temporary account named admin, with a random 16-character password, to the service log. It prints a new password at every start in bootstrap mode, so only the most recent block is valid.
sudo journalctl -u stalwart -n 200 | grep -A8 'bootstrap mode'The setup wizard listens on plain HTTP on port 8080, and Stalwart's Docker page notes it has no protection against password guessing, so do not expose that port. Tunnel it from your laptop over SSH instead:
ssh -N -L 8080:127.0.0.1:8080 you@your-vpsThen open http://127.0.0.1:8080/admin and sign in as admin with the password from the log. The wizard asks for the server hostname, the default mail domain, TLS, storage, the account directory, logging and DNS handling. With the internal directory, its last screen shows your new administrator, admin@<domain>, and a random password that the server neither shows again nor logs, so save it there. Restart the service when it finishes, then use https://<your-host>/admin from that point on.
If the password has scrolled out of the log, set a fixed one instead. /etc/stalwart/stalwart.env ships commented entries for exactly this, including STALWART_RECOVERY_ADMIN=admin:changeme, STALWART_RECOVERY_MODE=true and STALWART_RECOVERY_MODE_PORT (default 8080). Uncomment, restart, sign in, then comment it out again. Stalwart's page on securing the server warns that a forgotten variable is "a permanent full-access credential", so remove it once a permanent administrator account has signed in. The same page says to use administrator accounts only for administration, not as mailboxes in IMAP, JMAP or DAV clients.
In bootstrap mode, Stalwart starts no mail services and opens only one plain HTTP listener, on port 8080 by default. After setup and a restart, the normal listeners start on 25, 465, 993, 995, 4190, 443 and 8080. Port 25 must stay open to receive mail, and 443 is needed by most clients and by the default ACME challenge. It says to remove 995 when no client uses POP3, 4190 when no one manages Sieve filters from a ManageSieve client, and 8080 once setup is finished and HTTPS on port 443 works. Ports 587, 143 and 110 have no listener unless you create one.
Running it under Docker with a pinned tag
The documented image is stalwartlabs/stalwart, also published as ghcr.io/stalwartlabs/stalwart. On 29 October 2026 Docker Hub carried v1.0.1, v1.0 and v1, each with an -alpine variant. Stalwart's Docker page recommends the major version tag v1, which follows the newest 1.x release, and advises against latest, because a future major release may need a different upgrade procedure. Pin the patch version instead, for the same reason as the binary above.
services:
stalwart:
image: stalwartlabs/stalwart:v1.0.1
container_name: stalwart
init: true
restart: unless-stopped
ports:
- "25:25"
- "465:465"
- "993:993"
- "443:443"
- "127.0.0.1:8080:8080"
volumes:
- stalwart-etc:/etc/stalwart
- stalwart-data:/var/lib/stalwart
volumes:
stalwart-etc:
stalwart-data:That file is the documented docker run command written as Compose, with the POP3S and ManageSieve ports left out and the setup port bound to localhost, as the documented command also binds it. Bring it up and read the same bootstrap line:
docker compose up -d
docker compose logs stalwart 2>&1 | grep -A8 'bootstrap mode'The Docker page also documents STALWART_RECOVERY_ADMIN=admin:<password> as the way to set a known password at startup, which is the Compose environment: key if you prefer that to reading logs. It notes that environment variables are fixed when a container is created, so a plain restart does not pick up a change. docker compose up -d recreates the container when the environment changes. Remove the variable after setup.
The full documented port list, and why this file is shorter
Stalwart's Docker page publishes 25, 465, 993, 995, 4190 and 443 on all interfaces, and 8080 on loopback only (127.0.0.1:8080:8080). It does not publish 587, 143 or 110, which have no listener unless an administrator creates one. Its page on securing the server says to remove the POP3S listener on 995 when no client uses POP3, the ManageSieve listener on 4190 when no one manages Sieve filters from a client, and the 8080 listener once setup is done and HTTPS on 443 works. Add back only what your clients actually ask for. If a phone insists on STARTTLS submission, create a listener on 587 and then publish it. If your users write Sieve rules from a desktop client, publish 4190.
If Compose is new to you, our Docker Compose walkthrough for a VPS covers the file layout and the named-volume model this uses. One warning that bites mail servers in particular: Docker publishes ports by writing its own firewall rules, and those rules are matched before ufw's, so ufw deny 8080 does not close a port Compose published. Binding to 127.0.0.1 in the port mapping is what actually closes it, which is why the file above does that and the SSH tunnel still applies.
TLS with no certbot, and what that costs you
Stalwart implements ACME (automatic certificate management environment) directly, so there is no certbot and no renewal hook. The documentation lists four validation methods. HTTP-01 answers a challenge request on port 80. TLS-ALPN-01, the default, presents a purpose-built certificate on port 443 using the ACME-specific ALPN protocol. DNS-01 publishes temporary TXT records and is one of the two methods that can issue wildcards. DNS-PERSIST-01 uses long-lived authorization TXT records instead of writing a new one at every renewal.
The cost is that Stalwart wants to own the TLS handshake. TLS-ALPN-01 works by completing the handshake itself, so it cannot succeed behind a reverse proxy that terminates TLS for you. If nginx or Caddy already holds 443 on that box, you have three ways out. Stalwart's own nginx guide runs nginx as a TCP passthrough, with listen 443; proxy_pass 127.0.0.1:10443; proxy_protocol on;, so the TLS connection reaches Stalwart untouched. That hands every connection on 443 to Stalwart, so it suits a box where nginx serves nothing else on that port. Otherwise, move Stalwart to DNS-01 or HTTP-01, or give it its own IP address.
DANE and MTA-STS, and the defaults you should know
Both are configured per TLS strategy on the MtaTlsStrategy object, under Settings, MTA, Outbound, TLS Strategies in the web interface. The dane field defaults to optional, which attempts DANE validation when the recipient publishes TLSA records and falls back to ordinary STARTTLS when they do not. Set to require and delivery only proceeds against a verifiable TLSA record. The mtaSts field behaves the same way, defaulting to optional. Related timeouts are tlsTimeout (default 3 minutes) and mtaStsTimeout (default 5 minutes).
On the inbound side Stalwart can publish your own MTA-STS policy at https://mta-sts.<domain>/.well-known/mta-sts.txt, which needs port 443 open. The MtaSts singleton has mode (default testing), maxAge (default 7 days) and mxHosts, which overrides the allowed MX hosts and, when empty, takes them from the system settings. You supply two DNS records: a mta-sts CNAME pointing at the mail host, and a _mta-sts TXT record carrying the policy identifier.
dig +short TXT _mta-sts.example.org
curl -s https://mta-sts.example.org/.well-known/mta-sts.txtThe TXT lookup should return a v=STSv1; id=... string and the curl should return the policy body. If curl returns nothing, port 443 is closed or the certificate for mta-sts.example.org was never issued.
Leave mode at testing until both of those checks pass. A policy in enforce mode with a broken certificate stops other servers from delivering to you, and you will hear about it from your users rather than from a log. DANE has a matching trap: it requires DNSSEC-signed zones for both the mail domain and its MX hosts, and manually published TLSA records must stay in step with the certificate or key they pin. Stalwart updates TLSA records after renewal when automatic DNS management is enabled and tlsa is included in the domain's publishRecords; it is excluded by default. For records published by hand, reuseKey avoids changing a public-key pin at every renewal, or you can pin the issuing CA instead.
Encryption at rest is not end to end encryption
This is the feature most often misread, so here is exactly what the documentation says. Encryption at rest is switched on per account. A user exports their public key from their mail client, pastes the ASCII-armored OpenPGP key or PEM-encoded S/MIME certificate into the account manager at /account under Account, Public Keys, then selects it in the account's encryption setting. From then on the server encrypts each incoming message with that key before storing it, as an OpenPGP/MIME or S/MIME message. The server-wide encryptAtRest switch is enabled by default, and when it is off nothing is encrypted whatever the account settings say. encryptOnAppend is disabled by default. It extends encryption to messages appended over JMAP and IMAP, and while it is off those messages are never encrypted. In v1.0.1, JMAP messages carrying $draft and the Sent copies created by JMAP submission stay unencrypted even when append encryption is enabled. The cipher choices are AES-128 and AES-256 in CBC mode for either key type, plus Aes256Gcm and ChaCha20Poly1305 for S/MIME certificates only.
So it protects a stolen disk image, a stolen backup, and an operator reading the store after delivery. The private key never reaches the server, so without it the stored bodies are unreadable and the administrator cannot decrypt them either.
It does not protect the message in transit. A message crosses the internet under whatever TLS the two servers agreed on, arrives in plain text, and Stalwart encrypts it at that moment. The sender, the sender's provider and any hop that stripped TLS have already seen the plain text.
Four more limits are worth stating plainly, and as of 27 October 2026 the documentation states all of them. Your Sent and Drafts folders are written by your client, which is an append, and encryptOnAppend is off by default; enabling it also requires the account's append setting, and v1.0.1 still excludes JMAP drafts and Sent copies created by JMAP submission. The encryption covers the body and attachments only: headers such as From, To, Subject and Date stay in plain text, and the envelope and delivery logs are unaffected. Encryption "is not retroactive in either direction", so mail stored before you register a key stays readable, and turning encryption off does not decrypt what was stored while it was on. And a search in the body or attachments of an encrypted message finds nothing, over JMAP or IMAP, while searches by sender, recipient or subject still work.
And if a user loses their private key, their mail is gone. There is no recovery path, by design.
WKD is a web server job, not a mail server job
WKD (Web Key Directory) is the other half of the OpenPGP story, and it solves a different problem. It publishes your public key at a fixed HTTPS URL under your domain so that a sender's mail client can find it and encrypt the message before it ever leaves their machine. That is end to end encryption. Stalwart's at-rest encryption is about the copy sitting on your disk. Setting up one does not give you the other.
Stalwart does not serve WKD. Its documented HTTP endpoints, read on 27 October 2026, list well-known paths for jmap, caldav, carddav, oauth-authorization-server, openid-configuration, oauth-protected-resource, user-agent-configuration.json, autoconfig, mail-v1.xml, mta-sts.txt and acme-challenge. There is no openpgpkey path. Serve it from an ordinary static web server.
The specification defines two layouts. The advanced method uses https://openpgpkey.example.org/.well-known/openpgpkey/example.org/hu/iy9q119eutrkn8s1mk4r39qejnbu3n5q?l=Joe.Doe. The direct method uses https://example.org/.well-known/openpgpkey/hu/iy9q119eutrkn8s1mk4r39qejnbu3n5q?l=Joe.Doe. That 32-character string is the SHA-1 of the lowercased local part encoded in z-base-32, which is why you never build these filenames by hand. GnuPG builds them for you.
gpg --export --armor you@example.org > you.asc
gpg-wks-client --print-wkd-url you@example.org
gpg-wks-client --install-key you.asc you@example.org--print-wkd-url prints the URL a client will fetch, using the sub-domain form. --install-key writes the key into a local directory tree that mirrors the WKD layout, under a top-level directory named openpgpkey by default and changed with -C dir. Copy that tree into your web root, add the required policy file next to the hu directory (an empty file is valid), and fetch your own URL with curl to confirm it returns key bytes and not a 404.
Storage on a single VPS
Stalwart splits storage into four roles: a data store for structured records such as accounts, mailbox structure and settings, a blob store for raw message bytes and attachments, a search store for the full-text index, and an in-memory store for short-lived data such as rate-limit counters, greylisting entries, locks and tokens. Each can point at a different backend. The supported list includes RocksDB, FoundationDB, PostgreSQL, MySQL and MariaDB, SQLite, the filesystem, S3-compatible object storage, Azure Blob Storage, Redis, ElasticSearch and Meilisearch.
On one VPS the answer is short. The documentation calls RocksDB "the default and recommended data store for single-node installations", and its store guide says that RocksDB with every other store left at its default is the simplest configuration for a single server. Redis "cannot serve as the data store, the blob store or the search store". It serves as the in-memory store, a cluster coordinator or a cache tier, so no separate Redis container is required to get started. Move the blob store to S3 later if mailboxes outgrow the disk.
Backups follow the backend. The FAQ, read on 27 October 2026, says the server takes no backups itself, that copying the files of a running data store is not a backup, and that the built-in export is an offline dump of a stopped server meant for moving data between backends. Back up each store with its backend's own tools. With RocksDB on a single server, the store guide notes that all data lives in one directory, which is /var/lib/stalwart on a script install. Copy it with the service stopped, or from a filesystem or volume snapshot, and keep a copy of config.json and the environment file with it. A file-level copy of a running key-value store can catch it mid-write, and you will not find out until you try to restore it.
The spam filter that replaces Rspamd
Filtering runs inside the same process, so there is no second daemon to keep alive. The classifier is configured on the SpamClassifier singleton under Settings, Spam Filter, Classifier. It uses the FTRL-Proximal algorithm with feature hashing. FtrlFh is the default model. FtrlCcfh swaps in cuckoo feature hashing and is meant for servers where hash collisions limit the classifier's accuracy, at the cost of more memory and processing per message. It learns from the messages users mark as spam or as legitimate mail, and a new classifier needs at least 100 spam and 100 ham samples before its first training. The separate AI spam classifier, which runs on AI models, is an Enterprise feature.
Around the classifier sit DNS blocklists, greylisting, phishing detection, spam traps and Pyzor, plus the option to call SpamAssassin over milter if you have rules you refuse to give up.
When mailcow is still the right answer
Stalwart has no webmail. That is the single biggest gap and it is not close. The mailcow documentation, read on 12 October 2026, lists sixteen components including SOGo, which gives your users a browser inbox and a CalDAV and CardDAV interface out of the box. Stalwart's roadmap post of 20 June 2025 says a dedicated webmail is in its plans but "not currently our immediate priority", to be built in Rust with Dioxus once version 1.0 is reached, "most likely sometime in 2026". Version 1.0 shipped on 26 October 2026, and neither its release notes nor its announcement mention webmail. As of 27 October 2026 the project blog carries no post announcing one. So with Stalwart you are either deploying Roundcube yourself or telling every user to configure a mail client.
Stalwart does have a web admin interface, so that is not the gap people expect. The second gap is how new the stable line is. Stalwart spent its life at 0.x until v1.0.0 was published on 26 October 2026. The FAQ now says "Version 1.0 is a stable release", and the announcement says the schema is now stable and future releases will upgrade in place. That promise is five days old as of this check, and every 0.16 server has to be migrated rather than upgraded to reach it.
The third gap is the one nobody puts in a feature list. Postfix, Dovecot and Rspamd have a decade of written answers behind them. At two in the morning, with mail queued and users waiting, a search that returns a matching error string is worth more than an elegant architecture. If that is your situation, our mailcow install guide walks the whole stack end to end and it will be a shorter night.
Pick Stalwart when you want one binary, one config file and JMAP, and you are comfortable being early. Pick mailcow when you want webmail today and a large body of existing answers.
Moving existing mail in
The generic path is IMAP to IMAP with imapsync, which does not care what either end runs. Do a dry run first.
imapsync --dry \
--host1 old.example.org --user1 you@example.org --passfile1 /root/.old.pw \
--host2 mail.example.org --user2 you@example.org --passfile2 /root/.new.pw--dry makes imapsync "do nothing for real; it just prints what would be done", so read that output before you drop the flag. Each password file holds the password on its first line, so chmod 600 both and delete them afterwards.
Stalwart also ships newer tooling that most third-party guides have not caught up with. Its blog documents Vandelay, a JMAP importer and exporter (29 May 2026), and a migration proxy for zero-downtime upgrades (10 June 2026). Read both before you plan a large move, because they are more recent than almost anything you will find written elsewhere.
If the old server is Stalwart 0.16 itself, the documentation now gives two routes to 1.0. The stalwart-migrate tool works only from v0.16.27 and copies the whole deployment into a new 1.0 store, with downtime limited to a final run while every 0.16 node is stopped. It needs disk space for a second copy of the data store. The account-by-account route uses the migration proxy, moving accounts one at a time while both servers run, at the cost of clients downloading the moved accounts' data again. The docs point small and medium deployments that can accept a short maintenance window at stalwart-migrate.
Failure modes and the strings you will see
The admin interface never loads. Stalwart's requirements page names this one directly: the web interface bundle is downloaded from GitHub at startup, and until that download succeeds, /admin and /account return 404. Check with curl -sI https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip from the server; a redirect is a pass, a timeout is your egress firewall. The troubleshooting page adds two more causes. After setup, sign-in works only over HTTPS at /admin, and plain HTTP fails with Unknown client id. Behind a reverse proxy, or on an HTTPS port other than 443, the server must be configured with the URL clients use.
No bootstrap password in the log. It is printed at every start while the server is in bootstrap mode, and only the newest block is valid. Widen the window with sudo journalctl -u stalwart --since today | grep -A8 'bootstrap mode'. If the wizard keeps coming back after you finished it, the configuration file is missing, so restore or remount it. If you would rather not depend on the log at all, set STALWART_RECOVERY_ADMIN in /etc/stalwart/stalwart.env and restart.
Privileged ports do not answer after you wrote your own unit. Without AmbientCapabilities=CAP_NET_BIND_SERVICE, the stalwart user cannot bind port 25, 443, 465 or 993. Stalwart skips each failed listener, starts the others and logs a registry.build-error event with Failed to bind to <address>: <error>. Copy the capability line from the unit the installer generated. If another mail server holds port 25, stop and disable it. The installer's unit conflicts with Postfix, Sendmail and Exim, so starting one of them stops Stalwart.
Certificates never issue. HTTP-01 needs port 80 reachable and forwarded to a Stalwart HTTP listener. TLS-ALPN-01 needs Stalwart itself to answer the TLS handshake on 443. If another process takes the required port without forwarding the challenge, ACME fails and logs acme.auth-error or acme.order-invalid events. With manual DNS, the troubleshooting page also expects mta-sts, autoconfig, autodiscover and ua-auto-config under your default domain to resolve to the server, because they go on the certificate. Network, DNS and validation failures are retried automatically under the task retry policy; invalid requests and unsupported challenges are not.
FAQ
Does Stalwart replace Postfix, Dovecot and Rspamd on one VPS?
Yes. One Rust binary answers SMTP, IMAP, POP3, JMAP, CalDAV, CardDAV and WebDAV, and it includes the spam filter, the message store and an ACME client. There is one systemd unit and one config file at /etc/stalwart/config.json instead of four daemons and their glue. What it does not replace is your DNS zone or your provider's port 25 policy, which is where self-hosted mail actually succeeds or fails.
How much RAM does a Stalwart mail server need?
As of 27 October 2026, Stalwart's system requirements page gives no figure per user, and the FAQ says no measured figure of users per node is published. The page says an idle server stays well below its limits, and that CPU use depends on mail volume and sign-ins rather than account count. Its only worked example is a 2 GiB host, where the default memory limits add up to about 2.4 GiB, including two 512 MiB reservations that stay empty unless you host very large accounts. maxConnections defaults to 8,192 per listener. No minimum disk size is published, so size the disk for the mail you keep.
Will switching to Stalwart improve my email deliverability?
No. Deliverability is decided by whether outbound TCP port 25 is open on your VPS, by reverse DNS on your IP, and by SPF, DKIM and DMARC on your domain. Stalwart does support DANE, MTA-STS and SMTP TLS reporting, and it can publish your MTA-STS policy for you, but those govern transport security rather than whether a receiving network trusts your address. Test port 25 with nc -vz -w 5 alt1.aspmx.l.google.com 25 before you install anything.
Does Stalwart include webmail?
Not as of 27 October 2026. It ships a web admin interface, which is a different thing. The project's roadmap post of 20 June 2025 says webmail development would start once version 1.0 was reached, built in Rust with Dioxus, "most likely sometime in 2026". Version 1.0 shipped on 26 October 2026 without webmail, and the project blog carries no announcement of one yet. If your users need a browser inbox now, deploy Roundcube alongside it or use a stack that bundles SOGo.
What does Stalwart's encryption at rest protect against?
It encrypts each opted-in user's incoming messages with their own OpenPGP or S/MIME public key before writing them to disk, so a stolen disk, a stolen backup or an administrator reading the store cannot recover the bodies. It is not end to end encryption: the message arrives in plain text and is encrypted on delivery, so every hop before that saw it. encryptOnAppend defaults to off, so client-appended messages stay in the clear unless both server and account settings enable it; in v1.0.1, JMAP drafts and Sent copies created by JMAP submission stay unencrypted even then. The documentation says headers such as sender, recipients and subject stay readable, that mail stored before the key was registered is not re-encrypted, and that body and attachment searches find nothing in encrypted messages.