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.20Ā release.
This guide works perfectly with the latestSTEP 1
Please Support My work by Making a Donation.
STEP 2
Install Container Manager via Synology āPackage Centerā. If you run an older DSM version (under 7.2), search for Docker instead of Container Manager.
STEP 3
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.
STEP 4
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.
STEP 5
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. šNote: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!
STEP 6
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.
STEP 7
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 chmod -R 0700 /volume1/docker/mosquitto/data
STEP 8
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.
STEP 9
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. The default Mosquitto username and password are the following:
Note: How to Add USB Support on DSM 7.
Note: Can I run Docker on my Synology NAS?Ā See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
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 Monday / December 2nd, 2024 at 11:43 PM