๐ Matter Server
![]()
Matter Server (matter.js) is the Matter controller that Home Assistant uses to talk to Matter devices (Wi-Fi, Ethernet and Thread). It is the official successor of the archived Python Matter Server and uses the same WebSocket API, so Home Assistant connects to it without any changes.
On Home Assistant OS this runs as an add-on. With Home Assistant in Docker (e.g. on MOS), you run it as its own container next to Home Assistant.
๐ท๏ธ Category: Network, Home Automation
๐ณ Image: ghcr.io/matter-js/matterjs-server:stable
โ ๏ธ Requires: Host networking ยท IPv6 enabled on the host interface ยท Same (V)LAN as your Matter devices, Thread border routers and phone
๐ Links
| ย | ย |
|---|---|
| ๐ฆ Project | github.com/matter-js/matterjs-server |
| ๐ณ Docker Guide | docs/docker.md |
| ๐ฅ๏ธ OS Requirements | docs/os_requirements.md |
| ๐ Home Assistant | home-assistant.io/integrations/matter |
| ๐ Support | GitHub Issues |
๐ Network
| Setting | Value |
|---|---|
| Network mode | host (required โ Matter uses IPv6 link-local multicast / mDNS) |
| Port | 5580 TCP โ WebSocket API (/ws) and web dashboard |
There is no port mapping because the container uses the host network stack.
๐พ Volumes
| Host Path | Container Path | Mode | Description |
|---|---|---|---|
/mnt/cache/appdata/matterjs-server | /data | RW | Matter fabric data (node credentials, certificates). Back this up โ losing it means re-pairing every device. |
โ๏ธ Environment Variables
| Variable | Default | Masked | Description |
|---|---|---|---|
TZ | Europe/Vienna | โ | Timezone |
PRIMARY_INTERFACE | br0 | โ | Host interface for mDNS/Matter. Must have IPv6 enabled |
LISTEN_ADDRESS | (empty = all) | โ | Bind address for port 5580. 127.0.0.1 = only local (recommended if HA runs on the same host with host networking) |
PORT | 5580 | โ | WebSocket API / dashboard port |
LOG_LEVEL | info | โ | critical, error, warning, info, debug, verbose |
ENABLE_TIME_SYNC | true | โ | Sync time to Matter devices that support it |
More options (OTA, Bluetooth, DCL โฆ): see the upstream Docker guide.
โ Host Requirements (read before installing!)
Matter is built on IPv6. Most problems come from the host, not from the container.
1. IPv6 on the host interface
IPv6 must be enabled on the interface you set in PRIMARY_INTERFACE (e.g. br0):
# Must print 0 (= IPv6 enabled)
sysctl net.ipv6.conf.br0.disable_ipv6
# Should show at least an fe80:: link-local address
ip -6 addr show br0
If it prints 1, enable IPv6 for this interface in the MOS network settings.
2. Thread routing (only needed for Thread devices)
For Thread devices behind a border router (HomePod, Apple TV, SLZB-MR5U โฆ) the host must accept IPv6 route information from Router Advertisements:
| sysctl | Required value |
|---|---|
net.ipv6.conf.br0.accept_ra | 1 |
net.ipv6.conf.br0.accept_ra_rt_info_max_plen | 64 |
net.ipv6.conf.all.forwarding | 0 |
sysctl net.ipv6.conf.br0.accept_ra net.ipv6.conf.br0.accept_ra_rt_info_max_plen net.ipv6.conf.all.forwarding
These values must be persistent (survive reboot). Set them via the MOS network configuration or a boot script โ
sysctl -walone is reset when the network service restarts.
3. Network equipment (e.g. UniFi)
- Matter devices, border routers, the phone used for pairing and the server must be in the same (V)LAN
- Disable โMulticast Enhancementโ / multicast-to-unicast on the Wi-Fi networks used by Matter devices
- Do not use an mDNS reflector/forwarder (โmDNSโ / โMulticast DNSโ option in UniFi) for this network โ it can corrupt Matter traffic
- If devices drop out, try toggling IGMP/MLD snooping
๐ Quick Start
Step 1: Check host requirements
Run the checks from the section above. IPv6 on br0 is mandatory.
Step 2: Prepare the data folder
The container runs unprivileged as UID/GID 1000:
mkdir -p /mnt/cache/appdata/matterjs-server
chown -R 1000:1000 /mnt/cache/appdata/matterjs-server
Step 3: Install via MOS Hub
- Open the MOS Hub and search for Matter-Server
- Adjust the data path if your appdata lives elsewhere
- Set
PRIMARY_INTERFACEto your LAN interface (usuallybr0) - Optional: set
LISTEN_ADDRESS=127.0.0.1if Home Assistant runs on the same host with host networking - Click Install
Step 4: Verify
docker logs -f Matter-Server
docker inspect --format='' Matter-Server # โ healthy
Dashboard: http://YOUR_SERVER_IP:5580 (only if LISTEN_ADDRESS is not 127.0.0.1)
๐ Home Assistant Integration
- Settings โ Devices & Services โ Add Integration โ Matter
- When asked for the server URL, enter:
- same host, HA with host networking:
ws://localhost:5580/ws - otherwise:
ws://YOUR_SERVER_IP:5580/ws
- same host, HA with host networking:
- For Thread devices: in the Home Assistant iOS/Android app go to Settings โ Companion App โ Troubleshooting โ Sync Thread credentials so HA uses the same Thread network as your Apple/Google border routers.
Adding devices (recommended: multi-admin)
- Pair the device in its primary ecosystem first (e.g. Apple Home)
- In Apple Home: device โ Settings โ Turn On Pairing Mode โ copy the setup code
- In Home Assistant: Add Matter device โ โItโs already in use by another controllerโ โ enter the code
The device is then controlled natively by Apple Home and available in Home Assistant for automations.
๐ ๏ธ Troubleshooting
| Problem | Fix |
|---|---|
| HA canโt connect to the server | Check docker logs, URL must end with /ws, firewall on port 5580 |
| Pairing fails / โdevice not foundโ | Phone, server and device in the same VLAN? IPv6 enabled on br0? mDNS reflector off? |
| Thread devices unavailable after a while | accept_ra_rt_info_max_plen=64 set persistently? all.forwarding=0? |
Permission denied on /data | chown -R 1000:1000 on the data folder |
| Migrating from python-matter-server | Use the same data folder โ data is migrated automatically on first start (migration guide) |
๐ก Best Practices
- Back up the data folder โ it holds the fabric credentials
- Keep one Thread network (share credentials between Apple/Google and HA instead of creating a second one)
- Donโt expose port 5580 to the internet โ the API has no authentication