I think in your case it would be better if you adopt HAOS. Docker is not for the faint of heart if you are not a technical person.
Hello, I have the same problem here.
I would like to install “Zigbee2MQTT” in Home Assistant. (my HA is in Docker)
For this I need the MQTT Broker (right?)
I found this (https://hub.docker.com/_/eclipse-mosquitto) Docker image and started it, but I don’t see any output in the console, I get an error message when I try to set up the broker in HA and when I try to ping the container from the HA container on the open port (1883) I get a “refused” error. After some testing I can say for sure that the container is the problem, it just doesn’t respond to the ping.
Am I using the wrong image? (Do I need it at all?)
How can I use “Zigbee2MQTT” in my Docker HA?
Please see my guides, which you can adapt for Docker.
An MQTT broker (aka eclipse mosquitto) does not have a webUI. You need a tool to access the contents of the message queues.
https://portal.habitats.tech/Mosquitto/3.+Mosquitto+-+Setup
https://portal.habitats.tech/Zigbee2MQTT/Zigbee2MQTT+-+Setup
settings >> devices&services >> mqtt integration >> configure >> there is a built in tool in HA here to view and send event on mqtt bus
you can subscibe to “#” and you will see all messages sent by mqtt
if you know the correct topic you can subscribe to that
when asking “my docker container dont work” questions, please post docker run command or docker compose. usually if it doesnt work or connect it is because those have small mistake.
my guess is you are trying to connect to mqtt broker at host:1883 when you should use internal docker network and connect at dockerIP:1883 or hostname:1883. If you give your docker containers hostnames you may use that on docker network to connect. both containers must be included into same docker network which is basically default setup.