r/docker • • 15d ago

Matter server not starting

/r/homeassistant/comments/1xsvf42/matter_server_not_starting/

i dont know how to continue, maybe someone can help me?

im running the latest version of HA as a docker container, which doesnt come with an integrated matter server. so according to documentation, i cloned the official matter server repository and wanted to run it again as a docker on the same host as the HA.

now i have the problem that the server doesnt start, it always fails with the eror below.

basically what it says is that creating the directory config"

asdmatterjs-server  | 2026-11-10 18:48:03.274 INFO   MatterServer         Command line: (no arguments)
matterjs-server  | 2026-11-10 18:48:03.281 INFO   MatterServer         Using storage drivers: kv=wal, blob=dir
matterjs-server  | 2026-11-10 18:48:03.294 INFO   ConfigStorage        Storage location: /data (Directory)
matterjs-server  | 2026-11-10 18:48:03.324 FATAL  MatterServer         Server failed to start /data/config: EACCES: permission denied, mkdir '/data/config'
matterjs-server  |   at async mkdir (node:internal/fs/promises:1571:10)
matterjs-server  |   at async NodeJsDirectory.mkdir (/app/node_modules/@matter/nodejs/src/fs/NodeJsDirectory.ts:83:9)
matterjs-server  |   at async NodeJsDirectory.lock (/app/node_modules/@matter/nodejs/src/fs/NodeJsDirectory.ts:91:9)
matterjs-server  |   at async DatafileRoot.#acquireRef (/app/node_modules/@matter/general/src/storage/DatafileRoot.ts:74:29)
matterjs-server  |   at async DatafileRoot.lock (/app/node_modules/@matter/general/src/storage/DatafileRoot.ts:64:20)
matterjs-server  |   at async WalStorageDriver.initialize (/app/node_modules/@matter/general/src/storage/StorageDriver.ts:264:26)
matterjs-server  |   at async WalStorageDriver.initialize (/app/node_modules/@matter/general/src/storage/wal/WalStorageDriver.ts:91:9)
matterjs-server  |   at async WalStorageDriver.create (/app/node_modules/@matter/general/src/storage/wal/WalStorageDriver.ts:52:13)
matterjs-server  |   at async StorageService.#openFilesystem (/app/node_modules/@matter/general/src/storage/StorageService.ts:273:29)
matterjs-server  |   at async ConfigStorage.open (/app/node_modules/@matter-server/ws-controller/src/server/ConfigStorage.ts:107:25)
matterjs-server  | 2026-11-10 18:48:03.386 NOTICE Runtime              Shutting down
matterjs-server exited with code 1 (restarting)
4 Upvotes

6 comments sorted by

2

u/packetshepherd 15d ago

The Matter server cannot create /data/config because the container lacks write permission to /data.

This is a Docker volume permissions issue. Check folder permissions/ownership.

1

u/drangur123 15d ago

where do i find that folder? i was under the impression it gets created at the time i execute docker compose and sits inside the guest?

2

u/packetshepherd 15d ago

Say your compose has the following:

volumes:
- /volume1/docker/matterjs:/data

The look at the permissions on the docker host:

ls -ld /volume1/docker/matterjs

Make sure the folder exists and permissions are consistent with your docker ID.

1

u/ymgymg 15d ago

If your compose file has a bind mount like - /some/host/path:/data, the chown in the Dockerfile doesn't help. The host folder is mounted over /data at runtime, so the container sees the host folder's owner and permissions, not the ones set during the build.

Check which user the container runs as: docker run --rm --entrypoint id <image>. Then give that UID:GID ownership of the host folder, for example sudo chown -R 1000:1000 /some/host/path with the numbers from the id output. Restart the container after that.

Other options: use a named volume instead of a host path, because Docker copies the image's /data ownership into a new empty named volume. Or set user: "UID:GID" in compose to match the folder owner. I would avoid chmod 777. If the host is Fedora or RHEL, SELinux can also block it, and adding :Z to the mount fixes that.

1

u/lxtakc 13d ago

If /data is a bind mount in your compose file, the host folder's ownership wins over the Dockerfile chown. Find the container user's UID with docker run --rm --entrypoint id <image> and chown the host folder to that. With a named volume, one created earlier as root keeps that ownership, so remove it and let it recreate.