Setting Up an MQTT Server with Mosquitto and Testing It Using MQTT-Explorer

Release Time:2025-10-27

Mosquitto is an open-source, lightweight MQTT (Message Queuing Telemetry Transport) broker. MQTT is a lightweight messaging protocol based on the publish/subscribe model, ideal for IoT devices and low-bandwidth environments.

Installing Mosquitto on Ubuntu / Debian

sudo apt update
sudo apt install -y mosquitto  

After installation, Mosquitto will start as a service by default. Use the following commands to check its status:

sudo systemctl enable mosquitto
sudo systemctl start mosquitto
sudo systemctl status mosquitto # Check the service status

Testing the Server Setup with MQTT-Explorer

Download MQTT-Explorer: https://mqtt-explorer.com/

Enter the server address:
MQTT-Explorer Login
MQTT-Explorer Test

As shown, the topics are the subjects published via MQTT. On the left panel, you can see all topics and their messages.