All apps · 0 apps
Mosquitto
OfficialDocker app from Hunter47's Repository
Overview
Official Eclipse Mosquitto 2.x MQTT broker (continuously updated) with a minimal Unraid template: host networking and a single /config folder. Supports MQTT protocol 5 (required by modern Home Assistant).
HOW TO MANAGE USERS (no coding knowledge needed — just copy, replace, paste):
- Open the Unraid main menu and click TERMINAL.
- Copy the command below and paste it into the terminal (press Ctrl+Shift+V or right-click in most browsers).
Replace YOURNAME and YOURPASSWORD with your own values.
If your container has a different name than "Mosquitto", replace it there too.
ADD A NEW USER:
docker exec Mosquitto sh -c "mosquitto_passwd -b /config/passwords.mqtt YOURNAME 'YOURPASSWORD'"
(If the terminal says the file does not exist, use this version instead:
docker exec Mosquitto sh -c "mosquitto_passwd -c -b /config/passwords.mqtt YOURNAME 'YOURPASSWORD'")
CHANGE A USER'S PASSWORD:
Run the ADD command again with the same name and the new password.
REMOVE A USER:
sed -i '/^YOURNAME:/d' /mnt/user/appdata/Mosquitto/passwords.mqtt
SEE ALL USERS:
cut -d: -f1 /mnt/user/appdata/Mosquitto/passwords.mqtt
- After ANY change above, restart the container so it takes effect:
docker restart Mosquitto
(Or simply press the Restart button in the Docker tab of the Unraid web UI.)
WARNING: never run the ADD command with the -c flag when users already exist — it deletes all other users. Use -c only the very first time, when no password file exists yet.
After a restart, clients (e.g. Home Assistant) reconnect automatically; if one does not, restart that app.
Categories
Download Statistics
Total Downloads Over Time
Related apps
Explore more like this
Explore allDetails
eclipse-mosquitto:2Runtime arguments
- Network
host- Shell
sh- Privileged
- false
- Extra Params
--restart=unless-stopped
Template configuration
Host directory: mosquitto.conf, passwords.mqtt, data/
- Target
- /config
- Default
- /mnt/user/appdata/Mosquitto
Container timezone (TZ environment variable)
- Target
- TZ
- Default
- UTC