Your question
I’m logging in via the port 8080 interface in bootstrap mode but I get an error that says “The selected data store has already been initialized.” In reference to the rocksDB
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
The error “The selected data store has already been initialized” means the setup wizard is detecting that the RocksDB data store at the default path (/var/lib/stalwart/) already contains data from a previous (possibly failed or partial) bootstrap run. Bootstrap mode only triggers when config.json is absent, but if Stalwart wrote partial data to RocksDB before config.json was finalized, the wizard blocks re-initialization to prevent overwriting existing data.
Here are the likely causes and what to try:
-
You already completed (or partially completed) bootstrap once. If config.json was written by the wizard, Stalwart should have restarted into normal operation and port 8080 would no longer be the admin interface. Check whether /var/lib/stalwart/config.json (or wherever your data path is) exists. If it does, access the admin UI via https://<your-hostname>/admin instead.
-
A prior bootstrap run wrote data to RocksDB but did not finish writing config.json. The wizard sees the pre-existing RocksDB files and refuses to reinitialize. To start fresh: stop Stalwart, remove or move the RocksDB data directory (e.g. /var/lib/stalwart/), then restart – Stalwart will enter bootstrap mode cleanly again.
-
config.json is absent but the RocksDB path already has files (e.g. from a reinstall over old data). Same fix: clear the data directory before restarting.
Caution: Clearing the data directory is destructive. Only do this if there is no mail data you need to preserve.
See the Bootstrap mode docs for the full flow.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
That message means the RocksDB store on disk already has a working v0.16
schema; Bootstrap mode is for the initial setup only. You can delete the old RocksDB file if it is empty to force bootstrap.
I re-ran the script a couple times and it completed. There were some double entries in the RocksDB but I deleted them.