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.
Install Docker via Synology “Package Center”.
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 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 on STEP 8, select your “Install Eclipse Mosquitto” Task then click the “Run” tab. You will be asked to run Install Eclipse Mosquitto – click Yes. 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: 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.
This post was updated on Friday / August 26th, 2022 at 11:29 AM