๐Ÿ”— 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


ย  ย 
๐Ÿ“ฆ 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 -w alone 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

  1. Open the MOS Hub and search for Matter-Server
  2. Adjust the data path if your appdata lives elsewhere
  3. Set PRIMARY_INTERFACE to your LAN interface (usually br0)
  4. Optional: set LISTEN_ADDRESS=127.0.0.1 if Home Assistant runs on the same host with host networking
  5. 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

  1. Settings โ†’ Devices & Services โ†’ Add Integration โ†’ Matter
  2. When asked for the server URL, enter:
    • same host, HA with host networking: ws://localhost:5580/ws
    • otherwise: ws://YOUR_SERVER_IP:5580/ws
  3. 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.
  1. Pair the device in its primary ecosystem first (e.g. Apple Home)
  2. In Apple Home: device โ†’ Settings โ†’ Turn On Pairing Mode โ†’ copy the setup code
  3. 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

MOS Templates โ€“ maintained by J000K3R

This site uses Just the Docs, a documentation theme for Jekyll.