Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers. The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for Internet of Things messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers. In this step by step guide I will show you how to install Eclipse Mosquitto on your Synology NAS using Docker.
Eclipse Mosquitto v2.0.15 release.This guide works perfectly with the latest
Please Support My work by Making a Donation.
Install Container Manager via Synology “Package Center”. If you run an older DSM version (under 7.2), search for Docker instead of Container Manager.
Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it mosquitto. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
Now create three new folders inside the mosquitto folder that you created at STEP 3 name them config, data and log. Follow the instructions in the image below.
Note: Be careful enter only lowercase, not uppercase letters.
Download (click on the blue link below) then upload the mosquitto.conf file below in the config folder that you have previously created at STEP 4. Follow the instructions in the image below.
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.
Once you click on User-defined script, a new window will open. Follow the instructions below:
- General: In the Task field type in Install Eclipse Mosquitto. Uncheck the “Enabled” option. Select root User.
- Schedule: Select Run on the following date then select “Do not repeat“.
- Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that, click OK.
docker run -d --name Eclipse-Mosquitto \ -p 1883:1883 \ -p 9001:9001 \ -v /volume1/docker/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf \ -v /volume1/docker/mosquitto/data:/mosquitto/data \ -v /volume1/docker/mosquitto/log:/mosquitto/log \ eclipse-mosquitto
After you click OK on STEP 7 a new warning pop up window will open. Click OK.
After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.
After you click Submit on STEP 8, select your “Install Eclipse Mosquitto” Task then click the “Run” tab. You will be asked to run Install Eclipse Mosquitto – click OK. Follow the instructions in the image below.
From now on you can connect to Eclipse Mosquitto via a client by putting in your own NAS Local IP and port 1883.
Note: How to Add USB Support on DSM 7.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: Find out how to update the Eclipse Mosquitto container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.
This post was updated on Wednesday / April 26th, 2023 at 2:01 PM