Overview
Stalwart supports several database and object-storage backends. The choice of backend depends primarily on the scale and topology of the deployment.
The following table summarises which backend is available for each store type:
| Data store | Blob store | Search store | In-memory store | |
|---|---|---|---|---|
| RocksDB | ✅ | ✅ | ✅ | ✅ |
| FoundationDB | ✅ | ✅ | ✅ | ✅ |
| PostgreSQL | ✅ | ✅ | ✅ | ✅ |
| MySQL / MariaDB | ✅ | ✅ | ✅ | ✅ |
| SQLite | ✅ | ✅ | ✅ | ✅ |
| S3/MinIO | ✅ | |||
| Azure Blob Storage | ✅ | |||
| Filesystem | ✅ | |||
| ElasticSearch | ✅ | |||
| Meilisearch | ✅ | |||
| Redis | ✅ |
Backend support is compiled into the Stalwart binary. Switching to backends such as FoundationDB therefore requires running a different binary built with the corresponding feature enabled.
Each store (data, blob, search, in-memory) is configured through its own singleton object: DataStore, BlobStore, SearchStore, and InMemoryStore. These objects are multi-variant: changing backend means selecting a different variant on the corresponding object, without restructuring the rest of the configuration.