: ⚠️ Startup failed: Binary was not compiled with the selected data store backend

Issue Description

I built stalwart 0.16.17 from source with cargo build --release -p stalwart --no-default-features --features "postgres enterprise"

Expected Behavior

working binary

Actual Behavior

Error message: “Startup failed: Binary was not compiled with the selected data store backend”

Reproduction Steps

  1. Download source code
  2. build according to the above command
  3. start binary with systemctl

Relevant Log Output

Aug 13 14:39:34 stalwart systemd[1]: Started stalwart.service - Stalwart.
░░ Subject: A start job for unit stalwart.service has finished successfully
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ A start job for unit stalwart.service has finished successfully.
░░
░░ The job identifier is 3148.
Aug 13 14:39:34 stalwart stalwart[42775]: :warning: Startup failed: Binary was not compiled with the selected data store backend
Aug 13 14:39:34 stalwart systemd[1]: stalwart.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd

Stalwart Version

v0.16.x

Installation Method

Built from source

Database Backend

PostgreSQL

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Your build command only enabled the postgres and enterprise features, but you configured RocksDB as the blob store backend. The rocks feature is a separate compile-time feature that needs to be included whenever any store (data, blob, lookup, etc.) is configured to use RocksDB, regardless of which store role it fills.

You need to rebuild with:

cargo build --release -p stalwart --no-default-features --features "postgres rocks enterprise"

This matches the pattern shown in the compile docs, where each backend you actually use in your configuration (PostgreSQL for data, RocksDB for blob storage) must have its corresponding feature flag enabled at compile time. See Compiling Stalwart | Stalwart for the full feature list.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

Assuming the AI is correct, there’s still an obvious flaw here - the error message is inspecific. It should specify which type of data store is missing, and which store exactly.

E.g. “:warning: Startup failed: Binary was not compiled with the selected data blob storage backend (rocks)”