How to have mosquitto broker running?

I need to install a MQTT broker in ZimaOS v1.5.3.
I found a docker image in CasaOS-HomeAutomation and install it.
I do have the mosquitto icon on the dashboard, and when I use a ssh terminal, I do access the config file in /DATA/AppData/mosquitto/config/. But the command mosquitto or mosquitto_passwd are not valid.
When I try to open the app in the dashboard, nothing happen. It switch to the zimaos dashboard.

I am newbie in docker container, so I have some question:

  • How can I check that the mosquitto broker is running ? Obviously, it is not a linux service, so systemctrl status mosquitto.service says not found..
  • Has somebody make mosquitto run with home assistant in ZimaOS. What was procedure ?
    Happy new year to all

This is expected behaviour on ZimaOS.

Mosquitto was installed as a Docker container, not as a system service, so commands like mosquitto, mosquitto_passwd, or systemctl status mosquitto will not exist on the host OS.

How to check if Mosquitto is running

  • In the ZimaOS dashboard: Apps → Mosquitto → status should be Running
  • Or via SSH:
docker ps

If the mosquitto container is listed and “Up”, the broker is running.

Why clicking the app does nothing
Mosquitto has no web UI, so opening it just returns you to the dashboard. This is normal.

How to use mosquitto_passwd
It must be run inside the container:

docker exec -it mosquitto mosquitto_passwd -c /mosquitto/config/passwords username
docker restart mosquitto

Using Mosquitto with Home Assistant

  • Broker: ZimaOS IP (not localhost)
  • Port: 1883
  • Username/password only if you enabled authentication

Many users run Mosquitto + Home Assistant this way on ZimaOS without issues.

Thank you. Seems clear now.

1 Like