
This is the companion guide to the video Stalwart 1.2.1 updated Setup: Self-Hosted Email in One Binary — same steps, same commands, in text form you can copy. Video claims below describe what the video shows; anything beyond it comes from the linked docs and verified test notes.
Stalwart is an open-source all-in-one mail server in Rust, so one binary covers what used to take Postfix, Dovecot, and a spam filter glued together. The video installs version 1.2.1 on Ubuntu 24.04 with the official install script, and the v1.2.1 release published 2026-11-26 was confirmed as the latest tag on 2026-11-29.
If you followed the earlier long-form install, read Install Stalwart 1.0 on Ubuntu: Your Own Mail Server first for background. The difference here is the version and the method: this guide uses the official script path to 1.2.1, while the earlier guide covered the 1.0 line.
Demo honesty up front, matching the video: the sandbox used the placeholder domain mail.example.com, so no real mail was sent or received and the certificate step was skipped. Real delivery needs your own hostname, DNS records, and port 25 access, covered below.
The video and the requirements checklist agree on what the target host needs:
Caution before you run anything below: the installer runs as root, creates a stalwart service account, writes to system paths, and enables and starts a systemd service. Only run it on a host you control, and read the fetched script before executing it.
Confirm you are on the supported platform with cat /etc/os-release | head -2 and uname -m, and expect Ubuntu 24.04 LTS and x86_64. The video shows this exact check, recreated from the test run:

The Linux install docs document this script as the default path. Fetch it over pinned TLS, read it, then run it:
curl --proto '=https' --tlsv1.2 -sSf https://get.stalw.art/install.sh -o install.shless install.sh before running anythingsudo sh install.shThe installer lays down the binary at /usr/local/bin/stalwart, config under /etc/stalwart/, data under /var/lib/stalwart/, and a systemd unit that it enables and starts itself. The video notes the download size of 35,412 bytes for the installer it fetched.
The video treats this as the first payoff, and each line below is verified output from the test run:
/usr/local/bin/stalwart --version, and expect 1.2.1sudo systemctl is-enabled stalwart, and expect enabledsudo systemctl is-active stalwart, and expect activesystemctl status stalwart --no-pager | grep Active, and expect Active: active (running)
Then confirm the listeners with ss -ltn | grep -E ':(25|443|465|993|995|4190|8080)' and expect mail ports plus the setup page to be listening. Note there is no plaintext IMAP on port 143 in this configuration, only 993 and 995, so the proof below uses the SMTP banner and the admin page instead.
The first start with no configuration is bootstrap mode: only port 8080 serves, and the log prints a temporary admin account with a 16-character password shown once. Read it with sudo journalctl -u stalwart --no-pager | grep -A4 'bootstrap mode', save the password immediately, and treat it as secret. The video hides it on screen, and so should you.
Open the setup page at http://YOUR-SERVER-IP:8080/admin and sign in as admin with that one-time password. If port 8080 is not exposed, reach it through a loopback tunnel with ssh -L 8080:127.0.0.1:8080 YOU@YOUR-SERVER-IP and open it locally instead.

Work through the five setup screens covering hostname, domain, storage, and DNS records, then the server restarts into normal mode. On the placeholder domain the automatic certificate step fails with an invalidContact error for example.com and setup still completes with manual certificate management, per the docs. With a real domain, publish the records from the DNS records walkthrough and arrange a valid certificate instead of skipping this.
Three checks close the loop, all verified in the test run:
curl -v smtp://127.0.0.1:25, and expect 220 mail.example.com Stalwart ESMTP at your service carrying your configured hostnamecurl -s -o /dev/null -w "admin HTTP:%{http_code}\n" http://127.0.0.1:8080/admin/, and expect HTTP:200/usr/local/bin/stalwart --version, and expect 1.2.1 servingThe following were not tested in the sandbox and are marked untested here rather than implied:
For those next steps, work from the Linux install docs, the requirements checklist, and the DNS records walkthrough.