How to Install the Mosquitto MQTT Broker on Windows?

by Dec 3, 2020MQTT

The Mosquitto or MQTT broker is an OASIS standard messaging protocol for IoT. The inculcation of IoT in modern-day lives has pulled MQTT in the picture. Being a lightweight messaging transport that can remotely connect devices, MQTT tutorials were in much demand. So, here we portray one tutorial for the installation of Mosquitto MQTT broker Windows.

There exist three different ways of installing Mosquitto broker on Windows.

  • Standard install
  • Quick install
  • Windows PowerShell install

We will first see the basic one, i.e., the Standard Install. And then move on to the Quick and PowerShell installation methods.

Method 1: Standard or Manual Installation of MQTT Broker on Windows

When obeying this standard procedure, you will have to install certain other dependencies.

To start with the manual installation procedure, the pre-requisite is to download files from Eclipse as a part of the dependencies.

Mosquitto can be downloaded as a service since version 15.8. In this case, Mosquitto starts automatically.

But before these, you need to install the Windows installation files.

So now, let’s move on to the installation steps.

1: Double click on install script.

2: The “Dependencies” screen will appear, which will tell you about the required additional files.

3: In the “Choose Components” page, tick the box that will install Mosquitto as a “Service.”

4: By default, the location of installation will be set at C:\ program files\mosquitto. If you want to install the service somewhere else, you can browse to that particular location.

5: Click on “Finish” to complete the process.

After the above steps get executed successfully, you now need to copy the additional files to the install directory.

Two additional files will be available for copying, as listed below:

  • libcrypto-1_1_x64.dll
  • libssl-1_1_x64.dll

Point to Note: These files are included in the 1.5.8 install package. And you can also get these files by installing OpenSSL.

Starting MQTT on Your Windows Device

For manual starting of the MQTT broker, open “Command Window.” Navigate to the directory where you installed Mosquitto and type mosquitto.

If saved in C drive, the command will appear as: C:\mosquitto>mosquitto

If you want to use command-line switches, type

mosquitto -h

It will open the “Help” section for you, as shown in the below-given snapshot.

The command mosquitto -v will let you start in verbose mode, and you can thus see the console messages.

Method 2: Quick Installation of MQTT Broker Windows

Many people don’t prefer the traditional manual way of installing an MQTT broker. It is because the manual process involves the installation of many other dependencies. To avoid the hectic process of copying files from here to there and finding sources to download the dependencies, many users have shifted to the Quick install process.

The mosquitto version 1.5.8 works well with WebSockets.

While Quick installation, you can take the help of online sites that offer quick links for downloading all the packages at one go. Then, you can unzip the folders in the directory where you have kept MQTT. Henceforth, follow the steps as discussed for standard installation.

Method 3: MQTT Installation via PowerShell

It is an alternative installation process involving Windows PowerShell.

1: Open the PowerShell Command prompt by selecting “Run as Administrator” option.

2: Chose the directory where you want to install mosquitto and type the below command:

./mosquitto install

3: Mosquitto will get installed, but you won’t get any notification.

4: To start mosquitto, reboot your device, or start it manually.

5: Open the regular command prompt as Administrator and type the following codes. Make sure it is in the same given sequence.

  • sc query mosquitto, sc start mosquitto, sc query mosquitto

Testing the Installation

Now that you have done your part of the installation, how can you confirm whether the process got executed successfully?

Well, it is simple.

  • Open command window
  • Type down the below command
    • netstat -a

The format should be as follows:

C:\ Users\ username> netstat -a

An instance is shown below.

Running the command should show you that the MQTT broker is running on port 1883.

So, these were some of the ways to install the Mosquitto MQTT broker Windows. I hope the tutorial will be beneficial for you.

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

How to use MQTTBox to debug MQTT messages?

How to use MQTTBox to debug MQTT messages?

MQTTBox is a versatile MQTT (Message Queuing Telemetry Transport) client tool that facilitates testing and debugging of MQTT-based applications. MQTT is a lightweight messaging protocol commonly used in IoT (Internet of Things) and other scenarios where low-bandwidth,...

How to enable Mosquitto MQTT over WebSocket on Windows

How to enable Mosquitto MQTT over WebSocket on Windows

WebSocket is one of the communication protocols which provides full duplex communication over a single TCP/IP connection. It uses HTTP as a intial connection establishment. The WebSocket enables the communication from the web browser (client) to the server, in which...

MQTT Mosquitto Broker on Windows via Windows PowerShell

MQTT Mosquitto Broker on Windows via Windows PowerShell

Eclipse Mosquitto is an open-source message broker (EPL/EDL licensed) that supports MQTT versions 5.0, 3.1.1, and 3.1. The MQTT protocol uses a publish/subscribe method to deliver a lightweight messaging method. This makes it outstanding for Internet of Things (IoT)...

How to Install the Mosquitto MQTT Broker on Linux (Ubuntu)?

How to Install the Mosquitto MQTT Broker on Linux (Ubuntu)?

With IoT becoming a leading name in the market, businesses are keen to import it in their strategy. Due to the increasing demand, many people seek to learn the use of Mosquitto MQTT broker Linux to pump up their IoT productivity. Eclipse Mosquitto is an open-source...

How to build an MQTT Server using Raspberry Pi

installing-and-testing-MQTT-on-Raspberry_Pi What is MQTT ? MQTT stands for Message Queuing Telemetry Transport and is a network messaging protocol commonly used for messaging between IoT devices. MQTT is a publish/subscribe protocol that allows edge-of-network devices...

CoAP and MQTT: Analyzing the Best IoT Protocol

CoAP and MQTT: Analyzing the Best IoT Protocol

INTRODUCTION TO CoAP and MQTT CoAP and MQTT are two of the most important and most used IoT protocols nowadays. Both are equally important in machine communication. CoAP is a considerable competitor for MQTT because of the similarities in their use. Yet both have...

Mosquitto MQTT Broker introduction

Mosquitto MQTT Broker introduction

In this tutorial, we will discuss about the intro of Mosquittto MQTT broker. MQTT Broker is responsible for receiving network connections from the client and handling the client’s requests of Subscribe/Unsubscribe and Publish, as well as forwarding the messages...

How to choose an MQTT broker for an IoT project?

How to choose an MQTT broker for an IoT project?

What is MQTT Broker? MQTT stands for Message Queuing Telemetry Transport is an open OASIS and ISO standard lightweight, a publish-subscribe network protocol that transports messages between devices. Basically, MQTT Broker is simply software running on the computer. It...

Setting up a private Mosca MQTT broker using Node.js

Setting up a private Mosca MQTT broker using Node.js

In this tutorial, we are going to learn all about setting up a private Mosca MQTT broker using Node.js. But before we get into it let us brush up what we know about MQTT protocol. MQTT stands for Message Queuing Telemetry Transport. It works on the pub sub-model. The...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....