OpenThreadBorderRouter-HA

OpenThreadBorderRouter-HA

Docker app from pureelectricity's Repository

Overview

OpenThread Border Router (Home Assistant Optimized) This container runs an OpenThread Border Router (OTBR) specifically tweaked for integration with Home Assistant via the Silicon Labs EFR32MG21 chipset (SkyConnect, ZBT-1, Sonoff ZBDongle-E). CRITICAL PREREQUISITES - READ BEFORE INSTALLING: 1. Enable IPv6 in Unraid: Navigate to Settings > Network Settings. Ensure "Network Protocol" is set to IPv4 + IPv6. If this is disabled, Thread networking will not function. 2. Host Kernel Configuration (Persistence Required): Unraid resets network forwarding rules on every reboot. You must apply the following commands on the Unraid Host to prevent the Thread network from breaking. Commands to run: [code] sysctl -w net.ipv6.conf.all.forwarding=1 sysctl -w net.ipv6.conf.br0.accept_ra=2 sysctl -w net.ipv6.conf.eth0.accept_ra=2 [/code] How to automate this (Choose one): Option A: User Scripts Plugin (Recommended) Install the "User Scripts" plugin. Create a new script with the commands above and set it to run "At Startup of Array". Option B: The Go File (Native) Edit the file /boot/config/go on your flash drive and add the commands to the bottom of the file. This will execute them during the boot sequence. 3. USB Firmware: Your USB stick MUST be flashed with OpenThread RCP Firmware at 460800 baud. (Multiprotocol firmware is not supported). Configuration Notes: - Network Type: Must be Host for mDNS discovery. - WebUI Port: Default is 8099 (to avoid conflict with Unraid Port 80).

Home Assistant: Docker OpenThread Border Router

Stand-alone Home Assistant OpenThread Border Router docker container. For containerized home assistance setup without Yellow or HassOS.

This is a docker container based on the Home Assistant OpenThread Border Router add-on (https://github.com/home-assistant/addons/tree/master/openthread_border_router) to get the patches and quirks that the hass team has made. It is the same without the bashio stuff that communicates with home assistance instance in some way. Just to make the container work stand-alone.

Tested with Home Assistant Connect ZBT-1. Only tested with Aqara U200 Lock as it is the only Thread device I've got so far.

Disclaimer: I am completely new to IPv6 and Thread so I don't fully know what I am doing here. Just read documentation and forum threads and eventually got it working using this setup.

Prerequisite

  1. It did not work until I turned on IPv6 on my LAN (without ISP involved). I use Unifi networking hardware so I enabled static IPv6 in the Unifi Controller for the Default network:

    • Used https://unique-local-ipv6.com/# for generating a local IPv6 subnet and added ":0001" as gateway address. For example: fda1:1c14:16ac:0001::/64 (starting fd means local).
    • Configured SLAAC and enabled IPv6 DNS server.
    • IPv6 on WAN interface disabled.
    • Also enabled mDNS and IGMP snooping on the Default network.
  2. Configured the docker host with the following sysctl:

    net.ipv6.conf.all.disable_ipv6 = 0
    net.ipv4.conf.all.forwarding = 1
    net.ipv6.conf.all.forwarding = 1
    net.ipv6.conf.all.accept_ra_rt_info_max_plen = 64
    net.ipv6.conf.all.accept_ra = 2
    
  3. Flash the OpenThreadRCP firmware on the Home Assistant Connect ZBT-1 stick. I used the python flasher and the latest v2.4.0.0 firmware.

Setup

  1. Start this ghcr.io/ownbee/hass-otbr-docker container, see the docker-compose file and modify the environment variables according to you environment. The env variables are mapped from the addon config to these env variables:

    ENV VARIABLE Description
    DEVICE Serial port where the OpenThread RCP Radio is attached. Set to /tmp/ttyOTBR if using network-based RCP
    BAUDRATE Serial port baudrate (depends on firmware)
    FLOW_CONTROL (1 or 0) If hardware flow control should be enabled (depends on firmware)
    AUTOFLASH_FIRMWARE (1 or 0) Automatically install/update firmware (Home Assistant SkyConnect/Yellow)
    OTBR_LOG_LEVEL Set the log level of the OpenThread BorderRouter Agent (debug,info,notice,warning,error,critical,alert,emergency)
    OTBR_REST_PORT Port for REST API used by home assistant
    OTBR_WEB_PORT Port for WEB UI
    OTBR_WEB_INTERFACE empty
    OTBR_WEB (1 or 0) Enable or disable WEB UI
    FIREWALL (1 or 0) Enable OpenThread Border Router firewall to block unnecessary traffic
    NAT64 (1 or 0) Enable NAT64 to allow Thread devices accessing IPv4 addresses
    NETWORK_DEVICE IP address and port to connect to a network-based RCP (NOT TESTED)
    BACKBONE_IF Host network interface to use (e.g. eth0, wlan0, enp3s0)
    THREAD_BETA Define (i.e. set to '1') to enable Thread 1.4+ beta binaries
  2. Install the Open Thread Border Router, Thread and Matter integrations in your home assistance instance.

  3. Integrations -> Open Thread Border Router, and add your border router container that you just started. I used "http://:8081".

  4. Go to Integrations -> Thread -> Configure and add the OTBR network, it should pop-up after the last step. Click "Make as preferred", "Reset Border router" and Enable Android/IOS commissioning.

  5. You might have to go to https:///config/matter/dashboard and "SET THREAD CREDENTIALS" to the dataset found with clicking the "i" in your Thread integration. Unclear if this is needed.

  6. On you Android Phone, go to Settings -> App -> Troubleshooting and click on Sync Thread Auth.

  7. Pair a Thread device by scanning the Matter QR-Code with Integrations -> Add Matter device -> New device.

  8. The Android based commissioning/pairing took roughly 2-3 minutes but succeeded eventually.

Also see the following documentation for further information:

Buy me a coffee

I am using my free time maintaining this at nights while the kids are asleep. Buy me a ko-fi.com/ownbee if you like to boost my maintenance motivation and keep me awake.

Install OpenThreadBorderRouter-HA on Unraid in a few clicks.

Find OpenThreadBorderRouter-HA in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for OpenThreadBorderRouter-HA Review the template variables and paths Click Install

Related apps

Details

Repository
ghcr.io/ownbee/hass-otbr-docker:latest
Last Updated2026-07-17
First Seen2025-12-15

Runtime arguments

Web UI
http://[IP]:[PORT:8099]/
Network
host
Shell
bash
Privileged
true
Extra Params
--cap-add=SYS_ADMIN --cap-add=NET_ADMIN --sysctl "net.ipv6.conf.all.disable_ipv6=0" --sysctl "net.ipv4.conf.all.forwarding=1" --sysctl "net.ipv6.conf.all.forwarding=1"

Template configuration

Radio Device (Passthrough)Devicerw

Map your physical USB stick here (use /dev/serial/by-id/...). It maps to /dev/ttyUSB0 inside the container.

Target
/dev/ttyUSB0
Default
/dev/serial/by-id/YOUR_DEVICE_HERE
Radio Path (Internal)Variable

The internal path to the radio. Leave this as /dev/ttyUSB0 matching the internal side of the device mapping above.

Target
DEVICE
Default
/dev/ttyUSB0
Value
/dev/ttyUSB0
BaudrateVariable

Baudrate for RCP Firmware. SkyConnect/ZBT-1/Sonoff-E usually use 460800.

Target
BAUDRATE
Default
460800
Value
460800
Flow ControlVariable

Hardware Flow Control. Set to 1 for SkyConnect/ZBT-1. Set to 0 if using a generic stick without flow control support.

Target
FLOW_CONTROL
Default
1
Value
1
Backbone InterfaceVariable

The Unraid Host interface connected to your LAN/Internet. Usually br0 or eth0.

Target
BACKBONE_IF
Default
br0
Value
br0
OTBR WebUI PortVariable

Port for the OTBR Web Interface. Changed from default 80 to prevent conflict with Unraid.

Target
OTBR_WEB_PORT
Default
8099
Value
8099
OTBR REST PortVariable

Port for the REST API (Used by Home Assistant).

Target
OTBR_REST_PORT
Default
8081
Value
8081
Enable NAT64Variable

Enable NAT64 translation.

Target
NAT64
Default
1
Value
1
Enable FirewallVariable

Enable internal firewall.

Target
FIREWALL
Default
1
Value
1
Data StoragePathrw

Persistent storage for Thread credentials and dataset.

Target
/data/thread
Default
/mnt/user/appdata/otbr
TUN AdapterDevicerw

Required for creating the wpan0 network interface.

Target
/dev/net/tun
Default
/dev/net/tun
Value
/dev/net/tun
Local TimePathro

Sync time with host.

Target
/etc/localtime
Default
/etc/localtime
Value
/etc/localtime
Auto-Flash FirmwareVariable

Disable automatic firmware flashing attempts.

Target
AUTOFLASH_FIRMWARE
Default
0
Value
0
Log LevelVariable

Log verbosity (info, debug, warn).

Target
OTBR_LOG_LEVEL
Default
info
Value
info