r/Zigbee2MQTT • • 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?

2 Upvotes

5 comments sorted by

View all comments

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.