Using HA on Raspberry 4 in Docker

Hello,
i installed HA via docker on my Raspberry Pi OS.
I chose this way, because I would like to run more stuff on it.
So in this case Addons cannot be installed via HA directly, i have to add the docker services first and then add it, right?

i used this image now, but HA says its the wrong version to add matter server

docker run -d \
  --name matter-server \
  --restart unless-stopped \
  --network host \
  -v ~/homeassistant/matter:/data \
  tediore/matter-server:aarch64

Any recommendations to solve this issue?

Running Matter Server in docker

I don’t know who Tediore is
Use OHF version

Also get in habit of veryifying source of what you install and if it’s actively being worked on. I looked that up and looks like it is deprecated 2yrs

Hello,
I managed to get it up and running with this image, i also added the service to HA and a power outlet with matter is found, can be configured, but it fails during pairing.

Edit: i have connection via WIFI and not ethernet, if that matters, i guess the error below related to that

docker run -d \
  --name matter-server-3 \
  --restart=unless-stopped \
  --security-opt apparmor=unconfined \
  --privileged \
  -v ~/homeassistant/matter:/data \
  -v /run/dbus:/run/dbus:ro \
  --network=host \
  ghcr.io/matter-js/python-matter-server:stable --storage-path /data --paa-root-cert-dir /data/credentials --bluetooth-adapter 0

this is the docker log from the matter service

[1769692656.458699][1:1] CHIP:CTL: Setting attestation nonce to random value
[1769692656.459069][1:1] CHIP:CTL: Setting CSR nonce to random value
[1769692656.460559][1:1] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1769692656.470268][1:1] CHIP:DL: Wrote settings to /tmp/chip_kvs
[1769692656.470642][1:1] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1769692656.470853][1:1] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_config.ini
[1769692656.470932][1:1] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_counters.ini
[1769692656.477135][1:1] CHIP:DL: Wrote settings to /data/chip_counters.ini
[1769692656.477178][1:1] CHIP:DL: NVS set: chip-counters/reboot-count = 6 (0x6)
[1769692656.477617][1:1] CHIP:DL: Got Ethernet interface: eth0
[1769692656.477810][1:1] CHIP:DL: Found the primary Ethernet interface:eth0
[1769692656.477966][1:1] CHIP:DL: Got WiFi interface: wlan0
[1769692656.483505][1:1] CHIP:DL: Found the primary WiFi interface:wlan0
[1769692656.483533][1:1] CHIP:PAF: WiFiPAF: WiFiPAFLayer::Init()
2026-01-29 13:17:36.484 (MainThread) INFO [chip.storage] Initializing persistent storage from file: /data/chip.json
2026-01-29 13:17:36.484 (MainThread) INFO [chip.storage] Loading configuration from /data/chip.json...
2026-01-29 13:17:36.733 (MainThread) INFO [chip.CertificateAuthority] Loading certificate authorities from storage...
2026-01-29 13:17:36.733 (MainThread) INFO [chip.CertificateAuthority] New CertificateAuthority at index 1
2026-01-29 13:17:36.735 (MainThread) INFO [chip.CertificateAuthority] Loading fabric admins from storage...
2026-01-29 13:17:36.735 (MainThread) INFO [chip.FabricAdmin] New FabricAdmin: FabricId: 0x0000000000000001, VendorId = 0xFFF1
2026-01-29 13:17:36.736 (MainThread) INFO [matter_server.server.stack] CHIP Controller Stack initialized.
2026-01-29 13:17:36.736 (MainThread) INFO [matter_server.server.server] Matter Server initialized
2026-01-29 13:17:36.736 (MainThread) INFO [matter_server.server.server] Using 'None' as primary interface (for link-local addresses)
2026-01-29 13:17:36.738 (MainThread) INFO [matter_server.server.server] Starting the Matter Server...
2026-01-29 13:17:36.745 (MainThread) INFO [matter_server.server.helpers.paa_certificates] Skip fetching certificates (already fetched within the last 24h).
2026-01-29 13:17:36.745 (MainThread) INFO [chip.FabricAdmin] Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000001, NodeId: 0x000000000001B669, CatTags: []
2026-01-29 13:17:36.907 (Dummy-2) CHIP_ERROR [chip.native.DIS] Failed to advertise records: src/inet/UDPEndPointImplSockets.cpp:417: OS Error 0x02000065: Network is unreachable
2026-01-29 13:17:36.912 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 165 ms, for event type 2
2026-01-29 13:17:36.929 (MainThread) INFO [matter_server.server.vendor_info] Loading vendor info from storage.
2026-01-29 13:17:36.946 (MainThread) INFO [matter_server.server.vendor_info] Loaded 388 vendors from storage.
2026-01-29 13:17:36.946 (MainThread) INFO [matter_server.server.vendor_info] Fetching the latest vendor info from DCL.
2026-01-29 13:17:37.357 (MainThread) INFO [matter_server.server.vendor_info] Fetched 387 vendors from DCL.
2026-01-29 13:17:37.358 (MainThread) INFO [matter_server.server.vendor_info] Saving vendor info to storage.
2026-01-29 13:17:37.370 (MainThread) INFO [matter_server.server.device_controller] Loaded 0 nodes from stored configuration
2026-01-29 13:17:37.378 (MainThread) INFO [matter_server.server.server] Matter Server successfully initialized.

dont know if this is a temporary issue with the network error or how I could fix that

Need to look into this

Also do you have IPv6 enabled on your network. Not sure if that’s related but could be

Yes its enabled.

ip -6 addr show wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet6 fe80::8aa2:9eff:fe9a:3d18/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever

The pairing is via bluetooth i guess, and bluetooth is down and softlocked by default.

hciconfig
hci0:	Type: Primary  Bus: UART
	BD Address: 88:A2:9E:9A:3D:1A  ACL MTU: 1021:8  SCO MTU: 64:1
	DOWN 
	RX bytes:3610 acl:0 sco:0 events:375 errors:0
	TX bytes:64639 acl:0 sco:0 commands:375 errors:0

Then i need to do the following

sudo rfkill unblock bluetooth

:~ $ rfkill list
0: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
1: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no

and
sudo hciconfig hci0 up

now bluetooth is also running

~ $ hciconfig
hci0:	Type: Primary  Bus: UART
	BD Address: 88:A2:9E:9A:3D:1A  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING 
	RX bytes:4363 acl:0 sco:0 events:419 errors:0
	TX bytes:65360 acl:0 sco:0 commands:419 errors:0

Dont know how i can enable this bluetooth softblock to false by default on startup

But adding the matter device still fails at pairing via the iphone app home assistant app.

iPhone app, device an Ha on sane network with IPv6 enabled and no vlan in between?

Bluetooth from phone is enough
HA and matter server do not need it

Yes, if device has IPv6 enabled is hard to say, its just a power outlet. as far as i know i have no vlan in between, at least i havent set up one.

I tried to add the containers through a stack and its the same.
Is there a dummy stack i could try for this setup?

this is my current one with all the bluetooth stuff enabled

version: "3.9"

services:
  homeassistant:
    container_name: homeassistant-new
    image: ghcr.io/home-assistant/home-assistant:stable
    restart: unless-stopped
    privileged: true
    network_mode: host
    volumes:
      - /home/r2d2/homeassistant:/config
      - /run/dbus:/run/dbus:ro
    environment:
      - TZ=Europe/Vienna

  matter-server:
    container_name: matter-server-new
    image: ghcr.io/matter-js/python-matter-server:stable
    restart: unless-stopped
    privileged: true
    network_mode: host
    security_opt:
      - apparmor=unconfined
    cap_add:
      - NET_ADMIN
      - NET_RAW
    volumes:
      - /home/r2d2/homeassistant/matter:/data
      - /run/dbus:/run/dbus:ro
    command: >
      --storage-path /data
      --paa-root-cert-dir /data/credentials
      --bluetooth-adapter 0
      --listen-address 0.0.0.0
      --port 5580

Could I venture you have artificially created an unnecessary burden you don’t need?
Just install HomeAssistant barebones, getting it running well, and then go ahead and transplant it into a virtual environment and add the other things you may need later.
This way if there are problems, they are easier to troubleshoot.

Hey, i dont understand what you mean with barebones? You mean HomeAssistantOS directly on the controller?

If not, how do I set it up barebones with docker? I havent done anything than installing raspberrypi OS, then install docker and created the containers, there is nothing else modified

Is there a stack for Dcoker which is working out of the box with Raspberry Pi 4?

Sorry. The link in my first post weirdly had an extra character that broke it

I will edit it and add link to compose file below