Frontend of zigbee2mqtt not showing up (docker on Pi)

Hey community,

I’ve installed zigbee2mqtt together with mosquitto today on my Raspberry Pi in a docker container. After having many issues I was able to start both containers without erros in the logs. But unfortunately, the frontend of the zigbee2mqtt is not showing up.

Here are some more information:

Mosquitto

  • I’m using portainer to manage my docker containers.
  • I followed to official “Getting started” tutorial from zigbee2mqtt documentation, but I was not able to add the following command using portainer:
command: "mosquitto -c /mosquitto-no-auth.conf"
  • It was telling me everytime, that the command is not known when I add it to the command section of portainer config. So instead of that I generated a password hash and added it to the config:
/ # mosquitto_passwd -b -c passwd mqtt myMQTTPassword
/ # cat passwd
  • This is the content of the mosquitto.conf file:
port 1883
listener 9001
protocol websockets
persistence true
persistence_location /mosquitto/data
allow_anonymous false
password_file /mosquitto/config/passwd
  • (passwd file includes the generated hash from the above command)

zigbee2mqtt

  • I didn’t created a port configuration in portainer, so the container should use default 8080:8080. But to be sure I also added one time the config 83:8080 and tried to open in with port 83, but it didn’t help.
  • This is my configuration.yaml content:
homeassistant: true
permit_join: true

# MQTT settings
mqtt:
  # MQTT base topic for zigbee2mqtt MQTT messages
  base_topic: zigbee2mqtt
  # MQTT server URL
  server: 'mqtt://192.168.178.51:1883'
  # MQTT server authentication, uncomment if required:
  user: mqtt
  password: myMQTTPassword
  
serial:
  port: /dev/ttyUSB0
  adapter: deconz
  
# Enable the Zigbee2MQTT frontend
frontend:
  port: 8080
advanced:
  network_key:
    - MY
    - NETWORK
    - KEY
  • Hint: I added the server address of the raspberry pi in the server property, because mqtt://mqtt from the official documentation was not working for me.
  • This is the output from the logs:
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-04-29 09:36:13: Logging to console and directory: '/app/data/log/2022-04-29.09-36-06' filename: log.txt
Zigbee2MQTT:info  2022-04-29 09:36:13: Starting Zigbee2MQTT version 1.25.0 (commit #6f1460e)
Zigbee2MQTT:info  2022-04-29 09:36:13: Starting zigbee-herdsman (0.14.20)
CREATED DECONZ ADAPTER
Zigbee2MQTT:info  2022-04-29 09:36:15: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-04-29 09:36:15: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":88,"product":0,"revision":"0x26580700","transportrev":0},"type":"ConBee2/RaspBee2"}'
Zigbee2MQTT:info  2022-04-29 09:36:15: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-04-29 09:36:15: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-04-29 09:36:15: Allowing new devices to join.
Zigbee2MQTT:warn  2022-04-29 09:36:15: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-04-29 09:36:15: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-04-29 09:36:16: Connecting to MQTT server at mqtt://192.168.178.51:1883
Zigbee2MQTT:info  2022-04-29 09:36:16: Connected to MQTT server
Zigbee2MQTT:info  2022-04-29 09:36:16: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
Zigbee2MQTT:info  2022-04-29 09:36:17: Started frontend on port 0.0.0.0:8080
Zigbee2MQTT:info  2022-04-29 09:36:17: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"6f1460e","coordinator":{"meta":{"maintrel":0,"majorrel":38,"minorrel":88,"product":0,"revision":"0x26580700","transportrev":0},"type":"ConBee2/RaspBee2"},"log_level":"info","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.25.0"}'

Does anyone have an idea on how to resolve that issue?
I’m also using zwavejs2mqtt container on the same portainer, that one works well.

Best regards,
Mark

In your Docker command line/compose file, did you configure either host networking, or forward port 8080?

Do you mean this:

I’ve tried to forward the ports, but it makes no difference:

1 Like

Since you are on bridge, you should use hard-mapping otherwise docker will auto assign ports
Try to go back a bit more simple without network key

I also have other docker on 8080 so using 8090, I am running z2m on host so not mapping anything (–net=host)

I was able to fix the issue. The problem was, that the URL was pasted automatically with https in front, which the browser is not showing per default. So I missed that. After moving my cursor to the begin of the adress bar, it shows the prefix and I was able to replace it by http. Then it works…

2 Likes