Stalwart-migrate 1.0.0: prepare fails with Registry deserialization error

Issue Description

I try to migrate a single Stalwart instance from 0.16.27 to 1.0.0 using stalwart-migrate. The prepare command fails while reading the source store, with an Account registry deserialization error.

According to the migration documentation, prepare reads and converts the 0.16 settings and should produce a migration report after the conversion questions have been answered. In my case, it exits with an error before completing.

Environment:

OS: Debian Trixie
Architecture: x86_64
Source version: Stalwart 0.16.27
Target version: Stalwart 1.0.0
Database: local RocksDB
Single Stalwart node

Expected Behavior

stalwart-migrate prepare should open the Stalwart 0.16 source store, read and convert its settings, and complete the preparation step so that I can review the migration report and continue with the documented migration procedure.

Actual Behavior

The command exits with an error while deserializing an Account registry entry:

Registry deserialization error (registry.deserialization-error)

prepare does not complete. After the failed run, /var/lib/stalwart-migrate contains only a logs directory; no migration report was produced.

Reproduction Steps

  1. Stop the existing Stalwart service:

    systemctl stop stalwart.service
    systemctl is-active stalwart.service

    The service reports inactive.

  2. Use the following source configuration at /etc/stalwartv016/config.json:

    {“@type”:“RocksDb”,“path”:“/var/lib/stalwart-v016/”,“blobSize”:16834,“bufferSize”:134217728,“poolWorkers”:null}

  3. Confirm that the source store directory exists:

    /var/lib/stalwart-v016

    Its observed ownership and permissions are:

    drwxr-x— 3 stalwart stalwart 4096 Oct 26 23:27 /var/lib/stalwart-v016

  4. Run:

    stalwart-migrate prepare
    –source /etc/stalwartv016/config.json
    –state /var/lib/stalwart-migrate

  5. The command exits with the registry deserialization error shown below.

Relevant Log Output

2026-10-26T22:31:10.062280Z ERROR stalwart_migrate: command failed error=account error: Registry deserialization error (registry.deserialization-error): causedBy = vendor/v016/crates/store/src/registry/mod.rs:96, value = [REDACTED BASE64 STRING], causedBy = vendor/v016/crates/store/src/dispatch/store.rs:99

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

RocksDB

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

Let me check the migration docs for requirements and troubleshooting.

The docs don’t cover this specific error, so I can’t give you a confirmed cause. These are the documented points that might apply:

  • Source version: stalwart-migrate requires the source to run exactly Stalwart 0.16.27. It doesn’t upgrade earlier 0.16 releases. Please confirm the binary that last wrote this store reports 0.16.27, for example with stalwart --version. If the store was last opened by an earlier 0.16 build, or the 0.16.27 binary was never started on it, upgrade to 0.16.27 and start it once. Then stop it cleanly and retry.
  • Live source: The tool opens the 0.16 store read-only and the runs before the final one read a live server. A stopped service is fine for prepare.
  • Paths: The tool must reach the store under the same path the 0.16 server used. Your source config points at /var/lib/stalwart-v016/, so check that this is the directory the 0.16 service actually used. Check that the tool can read it too. The directory is drwxr-x--- stalwart:stalwart, so run the tool as stalwart or with sudo.

The error comes from decoding an Account object in the 0.16 registry, so the cause is probably the content of that record and not the configuration. A human will need to look at it. Please include the output of stalwart --version for the 0.16 binary and say whether the store has ever been written by a different 0.16 release. Also check whether the same error appears when 0.16.27 itself reads that account.

References:

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

I have this same exact problem !

This has been fixed. Please try again with stalwart-migrate 1.0.1 which is being compiled now.

Had a similar problem, after using stalwart-migrate 1.0.1 migration finished, but now stalwart does not start at all, the only output is `stalwart[xxx]: Registry read error`.

When in recovery mode the error is more verbose:

ERROR Registry read error (registry.read-error) objectType = (null), id = (null), causedBy = Registry deserialization error (registry.deserialization-error) { causedBy = “crates/store/src/registry/get.rs:96”, id = 337251486421486081, details = “MtaOutboundThrottle”, value = base64:REDACTED, causedBy = “crates/store/src/dispatch/store.rs:152”, causedBy = “crates/store/src/registry/get.rs:104” }

Thank you, with version 1.0.1 the migration worked for me.