Zigbee2MQTT vs ZHA: which Zigbee stack should you run?
It is the first real fork in the road for a Home Assistant build, and the internet argues about it like a sports rivalry. The short answer: both are mature, both run big networks well, and they differ mainly in philosophy — ZHA is built into Home Assistant, Zigbee2MQTT is a standalone service that happens to feed it. Here is how to choose once, because switching later costs you an evening of re-pairing.
Published Nov 17, 2026 · Updated Nov 20, 2026
The short answer
| ZHA | Zigbee2MQTT | |
|---|---|---|
| What it is | Built-in Home Assistant integration | Standalone app + MQTT broker |
| Setup time | About 5 minutes, all clicks | 30–60 minutes, some YAML |
| Device support | Broad; community 'quirks' for oddballs | Broadest published list (5,500+ devices) |
| Web interface | Home Assistant's own pages | Its own excellent dashboard + network map |
| Survives HA restarts? | No — it is part of HA | Yes — the radio keeps running |
| Best for | Most people, most homes | Tinkerers, odd devices, big networks |
If you are starting today and just want your sensors working: ZHA. If you already know you will buy unusual devices, want the best network diagnostics in the business, or like your infrastructure in separate containers: Zigbee2MQTT. Neither choice fixes a flaky mesh — that is placement, channels and interference, covered in our flaky Zigbee guide.
How each one actually works
ZHA talks to your coordinator directly from inside Home Assistant. There is nothing else to install, back up or update — when Home Assistant updates, ZHA updates. Device oddities are handled by quirks, small community-written translators that ship with Home Assistant itself.
Zigbee2MQTT runs as its own program — in this site's world, its own Docker container next to a Mosquitto MQTT broker. It owns the coordinator, publishes every device state to MQTT topics, and Home Assistant subscribes. That extra hop buys independence: restart Home Assistant and your Zigbee network never blinks, and the same MQTT feed can serve other tools too.
The differences that actually matter
- Device support at the edges. Mainstream gear (IKEA, Hue, Aqara, Sonoff, Third Reality) works identically on both. Brand-new or obscure devices land in Zigbee2MQTT first, because anyone can write a converter without waiting for a Home Assistant release.
- Diagnostics. Zigbee2MQTT's network map — every device, every route, link quality on each hop — is the single best troubleshooting tool in Zigbee. ZHA shows far less.
- Moving parts. ZHA: zero extra services. Zigbee2MQTT: two containers (itself + Mosquitto) to configure, secure and back up. On a NAS running Docker anyway, that cost is small; on a minimal install it is real.
- Coordinator freedom. Both work with the same network coordinators (an SLZB-06MU serves either stack). One coordinator can only run one stack at a time — there is no try-both-on-one-radio.
- Firmware updates. Both do over-the-air device updates; Zigbee2MQTT's manufacturer coverage is broader out of the box.
Running Zigbee2MQTT the Docker way
If you choose Zigbee2MQTT on a NAS, this is the whole stack — a broker plus the bridge, pointed at a network coordinator by its IP address (no USB passthrough needed):
services:
mosquitto:
image: eclipse-mosquitto:2
container_name: mosquitto
restart: unless-stopped
ports:
- "1883:1883"
volumes:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
zigbee2mqtt:
image: koenkk/zigbee2mqtt:latest
container_name: zigbee2mqtt
restart: unless-stopped
depends_on:
- mosquitto
ports:
- "8080:8080" # Zigbee2MQTT frontend
environment:
- TZ=America/New_York
volumes:
- ./zigbee2mqtt/data:/app/data
# For a USB coordinator instead of a network one, add:
# devices:
# - /dev/ttyUSB0:/dev/ttyUSB0
In Zigbee2MQTT's configuration.yaml, the two lines that matter most are the coordinator address — port: tcp://192.168.1.50:6638 for a network coordinator like the SLZB-06MU (adapter type ember for its EFR32 chip) — and the MQTT server, mqtt://mosquitto:1883. Then add the MQTT integration in Home Assistant and devices appear as you pair them.
Security note: give Mosquitto a password before you expose it to anything beyond your LAN, and never port-forward 1883 to the internet. On a home LAN behind your router it is fine; the broker is a trusted-inside-the-house service.
That pair — Mosquitto plus Zigbee2MQTT, wired together — is also in our Docker Compose Generator: tick both services and it produces this same stack with your own folder paths and timezone filled in.
The migration nobody warns you about
There is no supported migration path in either direction. Your coordinator keeps its network settings, but every device must be re-paired into the new stack, and groups, bindings and some entity IDs get recreated along the way. For a 10-device apartment that is twenty minutes. For an 80-device house it is a weekend project you will resent.
So choose on where you are heading, not where you are: if your device list will stay mainstream, ZHA's simplicity compounds for years. If you are the kind of person who buys the weird sensor nobody has reviewed yet, Zigbee2MQTT's converter ecosystem will save you repeatedly.
Backups, restores and moving machines
Whichever stack you pick, the network itself — which devices are paired, the network key, the channel — has to survive a dead coordinator and a machine move, or you are re-pairing everything from scratch.
ZHA keeps its network inside Home Assistant, so it rides along with Home Assistant's own backups. Its radio tools can also export the network and restore it onto a replacement coordinator, which is the flow to use when a radio dies.
Zigbee2MQTT keeps everything in its data folder: configuration.yaml, the device database, and a coordinator backup file it maintains itself. Copy that folder to a new machine and the stack comes back as it was; restore the coordinator backup onto a same-family radio and the network, pairings included, survives the swap.
Either way, the habit that matters is the same one as everywhere else on this site: a backup only counts if it exists somewhere other than the machine it protects. Our coordinator migration guide walks the radio-swap flow step by step.
The verdict
- New build, mainstream devices, minimal fuss → ZHA. It is the default for a reason.
- Docker/NAS homelab, oddball devices, you want the map → Zigbee2MQTT. The extra containers earn their keep.
- Already on one and it works → stay. 'Supposedly better' is not worth a re-pairing weekend.
Same radio, same rules: coordinators and channels
Whichever stack wins, the physical layer is identical, and it decides your experience more than the software does. A network coordinator (rather than a USB stick in the NAS) lets you place the radio centrally, away from USB 3 interference, and it survives NAS reboots — the SLZB-06MU below is the one this site's build uses, and it speaks to both stacks. Channel planning matters just as much: Zigbee channels 15, 20 and 25 sit in the gaps between the busy Wi-Fi channels 1, 6 and 11, and picking a quiet one is the closest thing Zigbee has to a free reliability upgrade. Our flaky-network guide walks the diagnosis; a channel-planning tool is on this site's roadmap for exactly this reason.
One more shared truth: both stacks get more reliable with every mains-powered device you add, because plugs and bulbs act as routers that carry traffic for sleepy battery sensors. Software choice is a real decision — but placement, channel and mesh depth are the decision underneath it.
Gear for this build
Prices are editorial estimates, checked against retailer listings on the date stated on the page, and change often — the links open current listings where you can verify price and availability. Some links may earn a commission at no cost to you — see the disclosure page.
Official documentation and references
- Zigbee2MQTT documentation — setup, configuration and device support
- Zigbee2MQTT documentation — the getting-started guide
- Home Assistant — the built-in ZHA integration
- Home Assistant — the MQTT integration Zigbee2MQTT builds on
Frequently asked questions
Can I run ZHA and Zigbee2MQTT at the same time?
Only with two separate coordinators on two separate Zigbee networks — one coordinator can serve exactly one stack. Some people run a small ZHA network for a few devices alongside a main Zigbee2MQTT network, but for most homes one stack, chosen well, is simpler.
Is Zigbee2MQTT more reliable than ZHA?
Neither stack fixes radio problems. Reliability differences people report almost always trace back to coordinator placement, USB interference, channel overlap with Wi-Fi, or too few mains-powered router devices — all fixable on either stack. Zigbee2MQTT's edge is visibility: its map shows you the weak links.
Does Zigbee2MQTT work with a network coordinator like the SLZB-06MU?
Yes — it is arguably the best way to run it. Zigbee2MQTT connects over TCP (port: tcp://IP:6638, adapter ember for the SLZB-06MU), so the radio lives on your network, independent of the NAS, and Docker reboots never touch it.
I'm starting from zero. Which one should I pick?
ZHA, unless you already know you need Zigbee2MQTT's extras. ZHA is five minutes of clicking, with nothing extra to run or back up, and it handles mainstream devices identically. Pick Zigbee2MQTT from day one if you plan to buy unusual devices, want the network map for troubleshooting, or already run Docker and MQTT for other things. Switching later is possible but means re-pairing every device — so the one real mistake is choosing Zigbee2MQTT 'just in case' and then maintaining two extra containers for features you never open.
Can I move my devices from one stack to the other without re-pairing?
No — there is no supported transfer that carries pairings between ZHA and Zigbee2MQTT. The coordinator can keep its network settings, but each device has to leave the old network and join the new one, and groups, bindings and some entity names are recreated along the way. Budget an evening for a typical house, work room by room, and start with the mains-powered devices so the new mesh has its routers in place before the battery sensors join.

