Home Assistant & Matter over Thread devices using Raspberry PI and ESP32
2026-12-05

I wanted to control some Matter over Thread devices with Home Assistant (HA), using hardware I already had: a Raspberry Pi 2 and an ESP32-C6.
The Raspberry Pi 2 is a 32-bit board, so neither Home Assistant nor Matter are officially supported on it. It works anyway, if you skip the official images and install everything by hand.
Home Assistant
I created a dedicated Linux user, homeassistant, and a Python project with uv:
sudo adduser --system --group --home /home/homeassistant homeassistant
sudo -iu homeassistant
uv init ha
cd ha
uv add homeassistant
Home Assistant listens on port 8123.
Matter server
For the Matter controller I used matterjs-server, installed with npm in the home directory of the same homeassistant user (it needs Node.js 22.13 or newer):
npm install matter-server
It listens on port 5580, and HA connects to it through the Matter integration.
Start at boot with systemd
Both services are started at boot by systemd. This is the unit for Home Assistant:
# /etc/systemd/system/homeassistant.service
[Unit]
Description=Home Assistant
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=homeassistant
Group=bluetooth
WorkingDirectory=/home/homeassistant/.homeassistant
ExecStart=/home/homeassistant/ha/.venv/bin/hass -c /home/homeassistant/.homeassistant
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN
SupplementaryGroups=bluetooth
Restart=on-failure
RestartForceExitStatus=100
Environment=PATH=/usr/local/bin:/usr/bin:/bin
[Install]
WantedBy=multi-user.target
And this is the unit for the Matter server. Before each start it removes a stale matter.lock file, which can be left behind after a crash:
# /etc/systemd/system/matter-server.service
[Unit]
Description=Matter Server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=homeassistant
Group=homeassistant
WorkingDirectory=/home/homeassistant
Environment=HOME=/home/homeassistant
ExecStartPre=-/usr/bin/find /home/homeassistant/.matter_server -name "matter.lock" -delete
ExecStart=/home/homeassistant/node_modules/.bin/matter-server
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable both:
sudo systemctl daemon-reload
sudo systemctl enable --now homeassistant matter-server
Thread border router on ESP32-C6
Thread devices need a border router to reach the IP network. I flashed an ESP32-C6 with esp32c6-border-router. It has a small web interface on port 80:

Matter server status
The Matter server is up and connected to Home Assistant:

Adding the devices
I bought two IKEA GRILLPLATS smart plugs, plugged them in, and scanned the QR code from the Home Assistant app on my phone. Both were added as Matter over Thread devices, and they now show up in HA like any other switch.
Conclusion
An old Raspberry Pi 2 and a cheap ESP32-C6 are enough for a working Matter over Thread setup. The only cost is that it is unsupported, so updates and fixes are up to you.