Overview
Stalwart supports several database and object-storage backends. The choice of backend depends primarily on the scale and topology of the deployment.
RocksDB
RocksDB is an embeddable, high-performance, persistent key-value store originally developed at Facebook. It is well suited to fast storage devices such as SSDs, and its efficient use of CPU and memory makes it a popular choice for embedded workloads. RocksDB is the recommended backend for single-node installations of Stalwart because of its speed and reliability.
FoundationDB
FoundationDB is a distributed database designed to handle large volumes of data across multiple machines. It combines ACID transactions with the scalability of NoSQL systems, providing high performance, fault tolerance, and straightforward horizontal scaling. It is the recommended backend for distributed deployments of Stalwart.
PostgreSQL
PostgreSQL (often called Postgres) is an open-source object-relational database system known for its architecture, reliability, data integrity, and feature set. It handles workloads ranging from single machines to heavily loaded web services with many concurrent users.
MySQL / MariaDB
MySQL is a widely used open-source relational database management system, known for its reliability, simplicity, and broad platform compatibility. It handles large volumes of data efficiently and is a popular choice for web applications and online transaction processing. MariaDB is a drop-in compatible fork of MySQL and is supported through the same variant.
SQLite
SQLite is a self-contained, serverless, zero-configuration database engine. Its simplicity and reliability make it well suited to small single-node installations. Data can be replicated for redundancy using external tools such as Litestream, which provides continuous replication of SQLite database files.
S3-compatible
For distributed and larger-scale deployments, Stalwart supports S3-compatible object storage services as a blob store. S3 (Simple Storage Service) is a scalable object-storage protocol supported by many cloud providers. Using an S3-compatible service lets the server hold email bodies, Sieve scripts, and other blobs on remote infrastructure suited to large-scale storage management, replication, and backup.
Filesystem
For single-node installations, Stalwart can store email bodies and other blobs directly on the local filesystem. A hashed directory layout distributes files into nested subdirectories to avoid the performance issues that arise when a single directory contains a very large number of files.
ElasticSearch
Elasticsearch is an open-source, distributed search and analytics engine built on Apache Lucene. It handles textual, numerical, geospatial, structured, and unstructured data, providing high scalability and near real-time search. When full-text search volumes grow beyond what the internal engine handles comfortably, Elasticsearch is a common choice as an external search backend.
Meilisearch
Meilisearch is an open-source search engine designed for fast, relevance-focused queries with minimal configuration. It offers features such as typo tolerance, synonyms, filters, and faceted search.
Redis
Redis (Remote Dictionary Server) is an in-memory data-structure store used as a database, cache, and message broker. It supports a range of data structures (strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs, geospatial indexes, streams), replication, Lua scripting, LRU eviction, transactions, and several levels of on-disk persistence. Valkey, the open-source Redis-compatible fork, is also supported through the same variant.
Azure Blob Storage
For distributed and larger-scale deployments, Stalwart supports Azure Blob Storage as a blob store. Azure Blob Storage is a cloud-based object storage service designed for scalable storage of unstructured data, and is well suited to large-scale storage management, replication, and backup of email bodies, Sieve scripts, and other blobs.
Composite
4 items