MQTT Explorer

[ This article is available in French / Cet article est disponible en Français ]

You have an MQTT server, and sometimes you need to consult or browse “topics”.
I recommend installing the “smeagolworms4/mqtt-explorer” docker image, which will let you do all this and more.

There’s no need for a fat client, just a simple Chrome or Firefox browser.

We don’t need to tell you about the advantages of containers, so we’re going to do this installation using docker and docker-compose.

We’re going to start by creating several directories on our server, to store the configuration of our docker images. The first directory, which will contain all the images, will be “docker”, and we’ll create it on the root.

mkdir /docker

Next we will create a directory for MQTT-Explorer :

mkdir /docker/mqtt-explorer

In the “/docker/mqtt-explorer” directory, there will be just one file: “docker-compose.yml” will contain the configuration of the “MQTT-Explorer” docker image.

Let’s create the “docker-compose.yml” configuration file for our MQTT-Explorer.

nano /docker/mqtt-explorer/docker-compose.yml

Here’s the text to copy into the “docker-compose.yml” to install MQTT-Explorer as a container, you can adapt it to your needs if you like.

version: '3'
 services:
   mqtt-explorer:
     container_name: mqtt-explorer
     image: smeagolworms4/mqtt-explorer
     hostname: mqtt-explorer
     domainname: legeek.info
     restart: always
     ports:
       - 9001:9001
     environment:
       - HTTP_PORT=9001
       - CONFIG_PATH=/mqtt-explorer/config
       - TZ=Europe/Paris
     volumes:
       - ./config:/mqtt-explorer/config
       - /etc/timezone:/etc/timezone:ro

Now we’re going to start creating the container:

cd /docker/mqtt-explorer/
docker compose up -d

Downloading, decompression, installation and execution begin. This may take a few seconds, depending on the speed of your server.

Once finished, we’ll check that the container has been launched with the “docker compose ps” command:

root@raspberrypi:/docker/mqtt-explorer# docker compose ps
 WARN[0000] /docker/mqtt-explorer/docker-compose.yml: version is obsolete
 NAME            IMAGE                         COMMAND                  SERVICE         CREATED              STATUS              PORTS
 mqtt-explorer   smeagolworms4/mqtt-explorer   "/entrypoint.sh /bin…"   mqtt-explorer   About a minute ago   Up About a minute   4000/tcp, 0.0.0.0:9001->9001/tcp, :::9001->9001/tcp
 root@raspberrypi:/docker/mqtt-explorer#

We can see that the container has been running for about 1 minute.


We will now check the logs with the command “docker compose logs“.

root@raspberrypi:/docker/mqtt-explorer# docker compose logs
 WARN[0000] /docker/mqtt-explorer/docker-compose.yml: version is obsolete
 mqtt-explorer  | LOAD MODULE WRAPPED: electron
 mqtt-explorer  | Start MQTT Explorer node server
 mqtt-explorer  |
 mqtt-explorer  |     - http-port: 9001
 mqtt-explorer  |     - config-path: /mqtt-explorer/config
 mqtt-explorer  |     - http-user:
 mqtt-explorer  |     - http-password:
 mqtt-explorer  |     - ssl-key-path:
 mqtt-explorer  |     - ssl-cert-path:
 mqtt-explorer  |
 mqtt-explorer  | subscribing connection/add/mqtt
 mqtt-explorer  | subscribing connection/remove
 mqtt-explorer  | subscribing storage/store
 mqtt-explorer  | subscribing storage/load
 mqtt-explorer  | subscribing storage/clear
 mqtt-explorer  | server is listening on 9001
 root@raspberrypi:/docker/mqtt-explorer#

Connect to the MQTT Explorer WEB interface

If all goes well, you should be able to connect to the MQTT Explorer web interface. The address is in the form: http://x.x.x.x:9001
In my case, my RPI obtained the IP address 192.168.1.248, so I go to the URL http://192.168.1.248:9001 with my favorite browser.

You’re done! All that’s left is to enter your MQTT server information to connect to it.

One thought on “MQTT Explorer

Leave a Reply