Migrating from matter-server to matterjs-server on NixOS

Date: 2026-07-26

Tags: NixOS, Home Automation


The Python matter-server is no longer receiving updates or support, so I migrated to matterjs-server on NixOS. I have 9 matter nodes, and I wanted to migrate without recommissioning any of them.

The reports I found were mixed on whether the migration actually worked, and the instructions I did find were all for Docker. I couldn’t find anything for NixOS; I’m sharing what worked for me.

The matterjs-server NixOS service can import the legacy matter-server configuration, but I needed to correct the vendor ID.

NixOS configuration

I changed this matter-server configuration:

{
  services.matter-server = {
    enable = true;
    port = 5580;
    extraArgs.primary-interface = "br0";
  };
}

to this matterjs-server configuration:

{
  services.matterjs-server = {
    enable = true;
    port = 5580;
    package = pkgs.matterjs-server;
    extraArgs = [
      "--primary-interface=br0"
      "--vendorid=4939"
    ];
    bluetoothSupport = false;
  };
}

Migrating the data

I started matterjs-server once; none of my nodes migrated.

I stopped the service, copied the legacy matter-server data over, and restarted:

sudo systemctl stop matterjs-server
sudo cp -r /var/lib/matter-server/* /var/lib/matterjs-server/
sudo systemctl start matterjs-server

On the next start matterjs-server logged this warning:

INFO   MatterServer         Command line: --storage-path=/var/lib/matterjs-server --listen-address=127.0.0.1 --port=5580 --production-mode --primary-interface=br0
INFO   MatterServer         Using storage drivers: kv=wal, blob=dir
INFO   LegacyDataLoader     Loaded legacy chip.json with 1 fabric(s)
WARN   LegacyDataLoader     No fabric found matching vendorId=0xfff1 and fabricId=1. Available fabrics: [index=1 vendorId=0x134b fabricId=1]
WARN   MatterServer         Legacy data error: No fabric found matching vendorId=0xfff1 and fabricId=1. Available fabrics: [index=1 vendorId=0x134b fabricId=1]

The legacy chip.json from matter-server uses vendorId=0x134b (Nabu Casa), but matterjs-server defaults its vendor ID to 0xfff1 (test vendor). The legacy loader searches chip.json for a fabric matching both the configured --vendorid and --fabricid, so it didn’t find mine.

Adding --vendorid=4939 to the launch arguments fixed the migration.

The mismatch is NixOS-specific. The matter-server module hardcodes --vendorid 4939, while the matterjs-server module leaves it at the upstream default of 0xfff1.