Plan: 0 destroy, 4 update, 5 create, 0 upsert, 0 reconcile (9 objects)✗ create Domain: jmap error: forbidden: The server is in bootstrap mode. Only the 'Bootstrap' object type can be modified until the bootstrap process is complete

Your question

When migrating from v0.15 to v0.16 following this guide stalwart/UPGRADING/v0_16.md at main · stalwartlabs/stalwart · GitHub, I encountered an error executing stalwart-cli apply --file export.json.

stalwart-cli apply --file export.json
Plan: 0 destroy, 4 update, 5 create, 0 upsert, 0 reconcile (9 objects)
✗ create Domain: jmap error: forbidden: The server is in bootstrap mode. Only the ‘Bootstrap’ object type can be modified until the bootstrap process is complete.
Done: 0 destroyed, 0 updated, 0 created (1 failed)
error: jmap error: forbidden: The server is in bootstrap mode. Only the ‘Bootstrap’ object type can be modified until the bootstrap process is complete.

Plan: 0 destroy, 4 update, 5 create, 0 upsert, 0 reconcile (9 objects)✗ create Domain: jmap error: forbidden: The server is in bootstrap mode. Only the ‘Bootstrap’ object type can be modified until the bootstrap process is complete

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

That error means the server started with no configuration file at all, so what you’re talking to is a blank install waiting for the setup wizard rather than your migrated instance. Check the boot log: you’ll see server.bootstrap-mode with “No configuration file was found”, where a correct migration run logs server.recovery-mode instead.

The cause is Steps 3.4 and 3.5 of the guide. The config.json the migration script produced has to be installed and passed explicitly with --config=/etc/stalwart/config.json, together with STALWART_RECOVERY_MODE=1 and STALWART_RECOVERY_ADMIN, and only then does stalwart-cli apply run against 127.0.0.1:8080. Without the --config the binary can’t find its configuration and falls back to a fresh setup.

One thing not to do while you sort this out: don’t complete the setup wizard against the migrated database. It refuses a data store that already contains data, and if it did succeed you’d end up with a second, empty deployment rather than your migration.