How to Install Eclipse Mosquitto on Your Synology NAS

How to Install Eclipse Mosquitto on Your Synology NAS

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.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Docker via Synology “Package Center”.

Install Docker Synology DSM 7

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

Eclipse Mosquitto Synology NAS Set up 1

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

Eclipse Mosquitto Synology NAS Set up 2

  • STEP 5

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.

Download mosquitto.conf

Eclipse Mosquitto Synology NAS Set up 3

  • STEP 6

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

Eclipse Mosquitto Synology NAS Set up 4

  • STEP 7

Once you click on User-defined script, a new window will open. Follow the instructions below:

  1. General: In the Task field type in Install Eclipse Mosquitto. Uncheck the “Enabled” option. Select root User.
  2. Schedule: Select Run on the following date then select “Do not repeat“.
  3. 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

Eclipse Mosquitto Synology NAS Set up 5 new 1

  • STEP 8

After you click OK on STEP 7 a new warning pop up window will open. Click OK.

Eclipse Mosquitto Synology NAS Set up 6 new 1

  • STEP 9

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.

Eclipse Mosquitto Synology NAS Set up 7

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.

This post was updated on Friday / August 26th, 2022 at 11:29 AM