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.

💡Note: This guide works perfectly with the latest Eclipse Mosquitto v2.0.18 release.

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

Download Container Manager Synology Docker

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

👉🏻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.

Synology User Defined Script

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

  • 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

After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.

Synology Task Scheduler Confirm Admin Password

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

Eclipse Mosquitto Synology NAS Set up 7 new 2024

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:

⚠️Warning: the default username is admin and the default password is password

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 Friday / September 22nd, 2023 at 1:19 PM