Install Eclipse Mosquitto on Your Synology NAS with Docker

Last updated on January 6th, 2023 at 08:58 pm

Mosquitto (or MQTT) is an open source implementation of a server for version 5.0, 3.1.1, and 3.1 of the MQTT protocol. 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.

MQTT is very popular with Home Assistant users. I personally use MQTT with Home Assistant to automate LED lights, door sensors and so on. It’s simply a must have for Home Automation.

Website / GitHub

Skip to Docker Run Code / Skip to Compose & Portainer Code

Important: This guide will not teach you how to use MQTT. This is an installation guide only. Please see the official website for more details on how to use MQTT.

Install Docker

Before we start, please ensure you have Docker installed. This can be installed through the Synology Package Center.

Creating Mosquitto Folders

We now need to create the Docker folder. Head into File Station and open the Docker folder. Select Create, choose Create folder and name it mosquitto. We also need to create 3 more folders inside the mosquitto directory, name them config, data and log.

Your Mosquitto folder should look like this.

Create Scheduled Task

We will now head into Control Panel > Task Scheduler > Create > Scheduled Task and click User-defined script. (see demonstration)

Configure Scheduled Task

In the window that appears, insert the following:

In the General tab, In the Task field, enter Mosquitto. From the User list, select root. Uncheck the Enabled option.

In the Schedule tab, Select Run on the following date (make sure It’s today’s date). Now select Do not repeat.

In the Task Settings tab, under Notification, You can choose to turn this on, otherwise skip this. Now copy-paste the following code into the Run command area. Now click OK.

docker run -d --name eclipsemosquitto \
-p 1883:1883 \
-p 9005:9005 \
-v /volume1/docker/mosquitto:/config/mosquitto.conf \
-v /volume1/docker/mosquitto:/data \
-v /volume1/docker/mosquitto:/log \

Important: Remember to update the Directory values to match your own. Check out the GitHub page for more configuration options.

Accept the warning

When the below warning appears, press OK.

Run the Mosquitto Task

You will now see your list of tasks. Select Mosquitto, now press Run.

Confirm you want to Run Mosquitto

When asked to run Mosquitto, press Yes.

Mosquitto is now Installed

The installation of Mosquitto has now finished. Give it a few seconds to appear in your Docker list.

Important: This container does not have a Web Interface.

Docker Compose and Portainer

If you would prefer to install with Docker Compose or Portainer, use the following code. You can also view a demonstration here.

version: '3.3'
        container_name: eclipsemosquitto
            - '1883:1883'
            - '9005:9005'
            - '/volume1/docker/mosquitto:/config/mosquitto.conf'
            - '/volume1/docker/mosquitto:/data'
            - '/volume1/docker/mosquitto:/log'
        image: eclipse-mosquitto

More Guides:

Actual AdGuard airsonic Audiobookshelf autobrr Bitcoin Calibre-Web ChatpadAI Cleanarr Composerize Crypto DailyTxT Dashy deemix Deluge Emby EmulatorJS Ethereum Euterpe FileBot FilePizza FileZilla Flame Focalboard FreshRSS Grafana Grocy Heimdall Homarr Home Assistant Homebridge Jackett Jellyfin Jellyseerr Joplin Kavita Komga LanguageTool LibreOffice Lidarr Mealie MediaGoblin Medusa Memegen Minecraft Minecraft Bedrock MQTT MusicBrainz MyMediaForAlexa Navidrome Node-RED NZBGet NZBHydra Ombi Overseerr PaperlessNGX Pashword Password Cards Petio Pi-Hole Picard Plex Portainer PostgreSQL Prowlarr PUID & PGID pwndrop Radarr Radicale Readarr ruTorrent SABnzbd SearX Seed Phrase Shiori Sonarr SpeedTest Stash Storm Tailscale TasmoAdmin Tautulli Theia Trilium TubeSync Unpackerr Uptime Kuma Vaultwarden Watchtower WebPDF Whisparr Wordle YouTubeDL

Leave a Comment

Scroll to Top