Install/Configure the Mosquitto MQTT Broker on Synology NAS
April 25th, 2019 9:30 AM | by Alfred Markus Paar | Posted in Synology
- Install
- Install Community Packages Source: https://synocommunity.com/#easy-install
- Search in Community and install Mosquitto
- Configure
- Connect via SSH
- Locate mosquitto.conf: sudo find / -iname mosquitto.conf
- Edit config file: sudo nano /volume1/@appstore/mosquitto/var/mosquitto.conf
- Note: if nano is not installed, use vi
- Locate line #allow_anonymous and edit: allow_anonymous false
- Locate line #password_file and edit: password_file /volume1/@appstore/mosquitto/var/pwd_file
- Save and close
- Create Password File
- Create a new Password file with username test-user: sudo /volume1/@appstore/mosquitto/bin/mosquitto_passwd -c /volume1/@appstore/mosquitto/var/pwd_file test-user
- Note: -U instead to add more user, -D to delete a user
- Type in a password when asked
- Create a new Password file with username test-user: sudo /volume1/@appstore/mosquitto/bin/mosquitto_passwd -c /volume1/@appstore/mosquitto/var/pwd_file test-user
- Start and Test
- Start Mosquitto in the Package Center
- Test the connection using a MQTT Tool like MQTTBox
Tagged Broker, DiskStation, Mosquitto, MQTT, NAS, SSH, Synology
Leave a Reply