Running Home Assistant & Matter Server on a UGREEN NAS: A Deep Dive into Thread Device Commissioning

I saw that IKEA launched new smart home products with affordable price and decided to play with them during Holiday season.  These newer IKEA devices use Matter over Thread – the “new” and “universal” smart home standard that promises interoperability across ecosystems.

The vision was simple: control all my devices from a single interface, with local control (no cloud dependency), and the flexibility to switch ecosystems if needed. Matter makes this possible by allowing devices to be shared across multiple controllers simultaneously.

Why Home Assistant Over Apple Home?

While Apple Home works well within the Apple ecosystem, I chose to try Home Assistant for several reasons:

  1. Open source and extensible – Thousands of integrations, custom automations, maximized hackability & HACS.
  2. No vendor lock-in – Works with virtually any smart home protocol (Matter, Zigbee, Z-Wave, WiFi, etc.) and almost any device that can be controlled remotely.
  3. Advanced automations – Far more powerful than Apple’s limited automation capabilities
  4. Local control – Everything runs on my own hardware, no cloud required. I already have NAS with bunch of services running locally in Docker.
  5. Matter multi-admin support – Devices can be controlled by both Apple Home AND Home Assistant simultaneously, so transition is expected to be smooth.

Running Home Assistant on a NAS

Instead of buying dedicated hardware (like Home Assistant Green or a Raspberry Pi), I decided to run Home Assistant on my existing UGREEN DXP4800PLUS NAS. This approach has several advantages, at least for me:

  • Cost savings – No additional hardware purchase, only IKEA lamps, switches and sensors
  • Reliability – NAS systems are designed to run 24/7
  • Consolidation – One device to maintain instead of multiple

Docker vs VM

For running Home Assistant on a NAS, you have two options: Docker containers or a full Virtual Machine. I chose Docker because:

  • Lower resource usage – Containers share the host kernel
  • Maintainability – I have a private git repo with all my docker compose files and configuration
  • Simpler network configuration – Direct access to host network for mDNS/multicast (no need to configure network bridge on NAS)

The main downside of Docker is that some Home Assistant add-ons don’t work (they require Home Assistant OS). However, you can run most services as separate containers, which is what we’ll do with the Matter server.

Reusing Apple’s Thread Border Router

Here’s where it gets interesting. Thread devices need a Thread Border Router to communicate with your IP network. You could buy a dedicated one, like:

But if you already have Apple devices like a HomePod Mini or Apple TV 4K, they already function as Thread Border Routers! The idea was simple: let Apple’s border router handle the Thread mesh networking, while Home Assistant controls the devices via Matter multi-admin.

This should work because:

  1. Matter supports multi-admin (device joins multiple controllers)
  2. Thread Border Routers advertise routes via IPv6 Router Advertisements
  3. Any device on the network should be able to reach Thread devices through the border router

Should being the operative word…

The Setup: Docker Compose

Here’s the docker-compose configuration for running Home Assistant and Matter Server:

# docker-compose.yaml
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ./config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
    environment:
      TZ: Europe/Warsaw

  matter-server:
    container_name: matter-server
    image: ghcr.io/home-assistant-libs/python-matter-server:stable
    restart: unless-stopped
    security_opt:
      - apparmor:unconfined
    volumes:
      - ./matter-data:/data
      - /run/dbus:/run/dbus:ro
    network_mode: host
    command: --storage-path /data --primary-interface eth0

Key points:

  • network_mode: host is essential – Matter requires mDNS/multicast which doesn’t work well with Docker’s bridge networking
  • --primary-interface eth0 tells the Matter server which network interface to use (assuming you also plugged you ethernet cable to 1st post)
  • --storage-path /data ensures device pairings persist across container restarts

The Problem: Commissioning Fails

After setting everything up, I tried to share my device from Apple Home to Home Assistant. The process:

  1. Open Apple Home → Select device → Turn On Pairing Mode
  2. Open Home Assistant → Add Matter device → Enter pairing code

But commissioning kept failing with these errors in the matter-server logs:

CHIP_ERROR [chip.native.CTL] Discovery timed out
CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33

WiFi-based Matter devices worked fine – only Thread devices failed. Something was wrong with the network path between my NAS and the Thread devices.

Debugging: The Investigation

Step 1: Verify mDNS Discovery Works

First, I checked if the NAS could even see the Thread Border Routers and Matter devices:

# SSH into the NAS
ssh [email protected]

# Check if Thread Border Routers are visible
avahi-browse -t _meshcop._udp

Output:

+   eth0 IPv4 Apple TV 4K                        _meshcop._udp        local
+   eth0 IPv6 Apple TV 4K                        _meshcop._udp        local

Good – the NAS can see the Apple Border Routers via mDNS.

Step 2: Check Device in Commissioning Mode

While the device was in pairing mode, I checked if it was advertising:

avahi-browse -r _matterc._udp

Output:

hostname = [264DA88A7891BAE6.local]
address = [fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0]
port = [5540]
txt = ["VP=4476+36873"]

The device was visible and advertising its IPv6 address. But notice the address: fd40:aff8:a38d:... – this is a different IPv6 prefix than my home network!

Step 3: Understanding the Network Topology

This revealed the architecture:

Home Network (fd9c:3a44:26e2:453f::/64)
    │
    ├── NAS (fd9c:3a44:26e2:453f:...)
    ├── PC  (fd9c:3a44:26e2:453f:...)
    └── Apple Border Router
            │
            └── Thread Mesh Network (fd40:aff8:a38d::/64)
                    │
                    └── IKEA DEVICE (fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0)

Thread devices live on a separate IPv6 subnet. The Border Router should advertise routes to this subnet so other devices can reach it.

Step 4: Test Connectivity from PC vs NAS

Here’s where it got interesting. From my PC:

# On PC
ping -6 -c 3 fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0

Output:

64 bytes from fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0: icmp_seq=1 ttl=63 time=25.6 ms
64 bytes from fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0: icmp_seq=2 ttl=63 time=25.2 ms
64 bytes from fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0: icmp_seq=3 ttl=63 time=30.2 ms

It works! My PC can reach the Thread device.

But from the NAS:

# On NAS
sudo ping -6 -c 3 fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0

Output:

3 packets transmitted, 0 received, 100% packet loss

The NAS cannot reach the Thread device! Same network, same device, different results.

Step 5: Compare IPv6 Routes

On my PC:

ip -6 route show | grep fd40

Output:

fd40:aff8:a38d::/64 via fe80::143e:4077:22b:562e dev enp101s0 proto ra
fd40:aff8:a38d::/64 via fe80::49e:d415:b2e8:5904 dev enp101s0 proto ra

The PC has routes to the Thread network, learned via Router Advertisement (proto ra).

On the NAS:

ip -6 route show | grep fd40

Output: (empty)

The NAS has no route to the Thread network! It’s not processing the Router Advertisements from the Apple Border Routers.

Step 6: Find the Root Cause

The key setting is accept_ra_rt_info_max_plen – this controls whether the kernel accepts Route Information Options (RIO) from Router Advertisements:

cat /proc/sys/net/ipv6/conf/eth0/accept_ra_rt_info_max_plen

On NAS: 0 (disabled)
Required: 64 (accept routes with prefix length up to 64)

Root cause found! The NAS kernel was configured to ignore IPv6 Route Information Options, so it never learned how to reach the Thread network.

The Solution

Temporary Fix (Testing)

sudo sysctl -w net.ipv6.conf.eth0.accept_ra_rt_info_max_plen=64

After running this, verify the route appears:

ip -6 route show | grep fd40
# Should now show: fd40:aff8:a38d::/64 via fe80::... dev eth0 proto ra

And test connectivity:

sudo ping -6 -c 3 fd40:aff8:a38d:0:8f51:64dc:1b6e:f8b0
# Should now work!

Permanent Fix: Systemd Service

⚠️ Important for UGREEN NAS users: The standard /etc/sysctl.d/ approach does not work on UGreen OS (and likely other NAS systems like QNAP, Synology). These systems restore /etc/ from a read-only image on every boot.

Create a systemd service that applies the setting after boot:

sudo tee /etc/systemd/system/thread-routing.service << 'EOF'
[Unit]
Description=Enable IPv6 RIO for Thread Border Routers (Matter/HomeAssistant)
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/sbin/sysctl -w net.ipv6.conf.eth0.accept_ra_rt_info_max_plen=64
ExecStart=/sbin/sysctl -w net.ipv6.conf.all.accept_ra_rt_info_max_plen=64
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF

# Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable thread-routing.service
sudo systemctl start thread-routing.service

Verify After Reboot

sudo reboot

# After reboot:
systemctl status thread-routing.service
# Should show: active (exited)

cat /proc/sys/net/ipv6/conf/eth0/accept_ra_rt_info_max_plen
# Should show: 64

ip -6 route show | grep fd40
# Should show routes to Thread network

Summary

Running Home Assistant on a NAS with Matter Thread devices is absolutely possible – you can even reuse Apple’s Thread Border Routers instead of buying dedicated hardware. But there’s a catch: NAS systems have conservative IPv6 settings that prevent them from learning routes to the Thread network.

Quick Diagnostic Commands

CheckCommand
See Thread Border Routersavahi-browse -t _meshcop._udp
See device in pairing modeavahi-browse -r _matterc._udp
Check route to Thread networkip -6 route show | grep fd40
Check RIO settingcat /proc/sys/net/ipv6/conf/eth0/accept_ra_rt_info_max_plen
Test connectivityping -6 <device-ipv6>

Key Lessons

  1. mDNS discovery ≠ connectivity – Just because you can see a device doesn’t mean you can reach it
  2. Thread uses separate IPv6 prefix – Devices aren’t on your home network, they’re on the Thread mesh
  3. Compare working vs broken – My PC worked, NAS didn’t – that pointed to a local configuration issue
  4. NAS systems are quirky – Don’t assume standard Linux configs will persist; use systemd services
  5. Router Advertisements matter – The accept_ra_rt_info_max_plen setting is crucial for Thread routing

With this fix in place, I can now commission Thread devices to Home Assistant while keeping them in Apple Home too. The best of both worlds!

F# Weekly #1, 2026 – Kipo & future of MonoGame

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

And before the year ends, last update!The map editor is working, playtest mode enabled, full 3D rendering (no more 2.5D).Perf rounds pending, and better QoL features pending but I'm so happy I've arrived this far #fsharp #monogame #dotnet #gamedev #BuildingInPublic

Angel Munoz (@tunaxor.me) 2026-01-01T04:47:09.135Z

Videos

Blogs

Part 2 of my "Designing Weaving Software" series is up. This time using generic and parameterized implementations to reduce duplication. #fsharpfsharpforfunandprofit.com/posts/design…

Scott Wlaschin (@scottwlaschin.bsky.social) 2025-12-29T19:37:11.031Z

F# vNext

Highlighted projects

New Releases

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #52, 2025 – Happy New Year

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Videos

"F# Advent Calendar in English 2025" is complete and all slots are filled 🎉 #fsharp #fsadvent sergeytihon.com/2025/11/03/f…

Sergey Tihon 🦔🦀 (@sergeytihon.com) 2025-12-27T09:13:55.112Z

Blogs & FsAdvent

F# vNext

Highlighted projects

New Releases

OK, the code is here – github.com/Krzysztof-Ci…I've cooked. Do not enjoy it. Cheers.#fsharp

Krzysztof Cieslak (@kcieslak.io) 2025-12-22T21:38:20.586Z

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #51, 2025 – WebSharper 10 & Fidelity Framework

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

We have decided to put the Fidelity Framework elements in their own GitHub org. Everything is still in fairly early days. We don't expect many community contributions at this point but we wanted to be sure that folks will see the work progressing in the open. github.com/FidelityFram… #fsharp

SpeakEZ.tech (@speakeztech.bsky.social) 2025-12-19T23:50:07.930Z

Videos

Blogs & FsAdvent

Highlighted projects

New Releases

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #50, 2025 – Making of A Programming Language

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

🚀 Excited to announce SharpIDE – A Modern, Cross-Platform IDE for .NET!I'm thrilled to share my latest open-source project, just in time for .NET 10: SharpIDE, a brand new IDE for .NET, built with .NET and Godot! 🎉🔗 Check it out on GitHub: github.com/MattParkerDe……

Matt Parker (@mattparker.dev) 2025-11-11T23:24:13.521Z

Videos

Let's build a Programming Language – together!The goal? Combine the developer experience of Python with the safety of TypeScript.In Episode 0: Syntax + Type Inference📺 http://www.youtube.com/watch?v=fSRT…#TypeInference #TypeScript #CSharp #FSharp #Rust #Haskell

SchlenkR (@schlenkr.bsky.social) 2025-12-13T08:58:15.904Z

Blogs & FsAdvent

F# vNext

Highlighted projects

New Releases

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #49, 2025 – Oxpecker 2, fsi-mcp, LSP & AOC in F#

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Videos

Link to blog post: jvaneyck.wordpress.com/2025/12/04/f…Showcase video: youtu.be/_AxsTQDxSbc?… #fsharp #FsAdvent

Jo Van Eyck (@jovaneyck.bsky.social) 2025-12-04T16:32:41.580Z

Blogs & FsAdvent

Let the party begin!medium.com/@lanayx/the-…#fsharp #FsAdvent #oxpecker

Vladimir Shchur (@lanayx.bsky.social) 2025-12-01T01:34:02.283Z

F# vNext

Highlighted projects

New Releases

ReSharper and Rider 2025.3 release party is incoming! 😃 📅 December 9, Tue, 4pm UTC🗣️ Our .NET Advocates and @auduchinok.bsky.social🎁 Lots of new features!🤔 Bring all your questions!#dotnet #devtools #ai #csharp #fsharp #ama

JetBrains Rider (@jetbrains-rider.bsky.social) 2025-12-03T16:38:53.5694242Z

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #48, 2025 – #FsAdvent starts Dec 1st.

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Fable 4 and Fable 5, both got a new release to make them work with .NET 10 🎉 #fsharp #fablecompiler

Maxime (@mangelmaxime.bsky.social) 2025-11-25T22:19:29.580Z

Videos

Blogs

F# vNext

Highlighted projects

Non periodic reminder that there's an unofficial F# discord where some members of the community hang outdiscord.gg/fsharp-19669…#programming #languages #dotnet #fsharp #developers

Angel Munoz (@tunaxor.me) 2025-11-30T04:29:44.122Z

New Releases

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #47, 2025 – F# 10 & last #FsAdvent slots

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Only 4 slots left in the main timeline #fsharp #FsAdent

Sergey Tihon 🦔🦀 (@sergeytihon.com) 2025-11-20T07:00:51.556Z

Videos

Blogs

F# vNext

Introducing F# 10 #fsharp devblogs.microsoft.com/dotnet/intro…

Jon Sagara (@jonsagara.com) 2025-11-17T18:14:31.057Z

Highlighted projects

New Releases

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee

F# Weekly #46, 2025 – #FsAdvent & .NET Conf 2025

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

F# Advent Calendar in English 2025 #fsharp #FsAdvent sergeytihon.com/2025/11/03/f…

Sergey Tihon 🦔🦀 (@sergeytihon.com) 2025-11-03T21:26:49.016Z

.NET Conf 2025

Videos

Hey #fsharp! Ionide 7.29.0 / FsAutocomplete 0.81.0 is out and brings F# 10 and .NET 10 support! Give it a try and report issues when you find them!

Jimmy Byrd (@theangrybyrd.bsky.social) 2025-11-13T15:21:27.108Z

Blogs

F# vNext

Dear #fsharp, we're asking again about a possible Fantomas default change: github.com/fsprojects/f…With 500+ downloads a day and only ~130 votes, we simply don’t have enough data yet. Absolute numbers matter before making such a decision.

Florian Verdonck (@nojaf.com) 2025-11-13T09:08:46.676Z

Highlighted projects

New Releases

🌈 After 2 years of serious side-project hustle, we’ve built a limited batch of 100 PXL Clocks – premium programmable clock for developers and design lovers.Use code "fsharp" for a 50€ discount and bring light into your workspace.👉 pxlclock.com#fsharp #pxlclock #csharp #pixelart

SchlenkR (@schlenkr.bsky.social) 2025-11-08T11:40:40.549Z

That’s all for now. Have a great week.

If you want to help keep F# Weekly going, click here to jazz me with Coffee!

Buy Me A Coffee