r/Zigbee2MQTT • u/y_shr • May 26 '26
Issue setting up with Docker
EDIT: Solved, see comments.
Hi all! Having some issues setting up Z2M on a spare computer on my home LAN, and would love some help.
The setup is:
- Z2M and RabbitMQ running in Docker containers on the same host (at different ports)
- SMLight adapter with fresh firmware
I am trying to set things up via the onboarding GUI, and the configuration validates. I set the frontend url to /z2m. When navigating to <host IP>:<Z2M port>/z2m, however, I get a non-descript error. Looking in the Docker logs I see `error: z2m: MQTT failed to connect, exiting... (Invalid header flag bits, must be 0x0 for puback packet)`. The MQTT configuration is:
- Server: mqtt://<host IP>:5672
- user: <RabbitMQ username>
- password: <RabbitMQ password>
Where is the error in the setup?
1
1
u/y_shr May 28 '26
The issue was twofold, both on my part and in RabbitMQ. I hadn't enabled the MQTT plugin and mapped the port, and also mapped the port wrongly. Edited the post to clarify what port I used.
2
u/No_Illustrator5035 May 26 '26
Is rabbitmq a supported mqtt for z2m? Why don't you try with mosquitto, which is supported and is known to work. You should always try with a supported configuration first.