Linux

Where Does Stalwart Store Mail and Config?

Stalwart splits config into /etc/stalwart and mail data into /var/lib/stalwart, with four stores per install.

Last updated

Stalwart keeps config and data strictly apart. Config lives in /etc/stalwart as config.toml. Mail data lives in /var/lib/stalwart under RocksDB by default. Four stores (main data, blobs, search index, ephemeral state) can each move to external backends later without reinstalling.

Version upgrades renamed the legacy /opt/stalwart-mail tree to /opt/stalwart, which still bites Docker users on old mounts. Fix the paths in config.toml before starting the new image, or the server boots into setup mode beside your real data.

Where Stalwart stores this, by platform

Linux
/var/lib/stalwart

RocksDB home for the four stores on single node installs. Bind mounts must belong to UID 2000 or the service cannot write.

Linux
/etc/stalwart

Main config.toml plus certs. Legacy /opt/stalwart-mail references must be renamed here after upgrades or bootstrap mode triggers.

Frequently asked questions

Which Stalwart paths must persist in Docker?

Mount volumes for /etc/stalwart and /var/lib/stalwart and run as UID 2000 on bind mounts. External Postgres or S3 backends leave the data volume nearly empty.

How do I back up Stalwart mail data?

Copy the data directory while stopped for RocksDB, or dump per your external database docs. The built in export tool covers database free setups.

Upgrading orphaned my data with bootstrap mode. Why?

Update every old /opt/stalwart-mail reference in config.toml to /opt/stalwart and remount. Skipping the rename strands the server in bootstrap mode.

Notice an outdated path? Let us know.