I’m trying to upgrade to 1.0 when i prepare and run migrate with "sudo stalwart-migrate run --source /opt/stalwart/etc/config.json --target /etc/stalwart-v1/config.json --state /var/lib/stalwart-migrate --owner “$(id -u stalwart):$(id -g stalwart)” " i get a
"cannot read /etc/stalwart-v1/config.json: No such file or directory (os error 2) " error.
when i manually create the config.json file i get a “2026-10-27T10:22:09.364145Z ERROR stalwart_migrate: command failed error=the v1 --target already holds a v1 store that this --state did not create; the migration writes only into a new, empty v1 store” error.
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.
The two errors share one cause. The tool expects /etc/stalwart-v1/config.json to exist and to point at a new, empty store. Your first error says the file is missing. Your second error says the store it points at already holds a v1 store that this --state didn’t create.
This applies to v1.0 and the stalwart-migrate tool. Here is what to do:
Create the target config file first. The tool doesn’t generate it. It only defines the new, empty store. For RocksDB, /etc/stalwart-v1/config.json is:
Point the file at a store that has never been used. The second error means the target path or database already contains v1 data. It may have been filled by a different --state directory, or by an earlier attempt such as starting Stalwart 1.0 against that path. Use a new path or database that is empty.
Start again with a clean state if an earlier run was partly done. Use a new, empty target. If the old target was filled by a run that used /var/lib/stalwart-migrate, either keep using that state directory or use a new state directory with a new target.
Check the source path. Your command uses --source /opt/stalwart/etc/config.json. The docs assume /etc/stalwart/config.json, so make sure yours is the real 0.16 config.
Don’t point --target at your 0.16 data or blob store. The tool refuses when the paths overlap.