Mosquitto

Mosquitto

Official

Docker 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):

  1. Open the Unraid main menu and click TERMINAL.
  2. 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

  1. 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.

Download Statistics

686,183,873
Total Downloads
7,076,716
This Month
4,566,966
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Explore more like this

Explore all

Details

Repository
eclipse-mosquitto:2
Last Updated2026-09-18
First Seen2022-09-04

Runtime arguments

Network
host
Shell
sh
Privileged
false
Extra Params
--restart=unless-stopped

Template configuration

Config DirectoryPathrw

Host directory: mosquitto.conf, passwords.mqtt, data/

Target
/config
Default
/mnt/user/appdata/Mosquitto
TimezoneVariable

Container timezone (TZ environment variable)

Target
TZ
Default
UTC