What is Mosquitto?

What is Mosquitto? The official site says: ” Eclipse Mosquitto is an open source message broker that implements the MQTT protocol .”

Well, but what is it and what is it good for? IoT toy users probably know this because it is probably the most used program for IoT. So let’s install it.

If, like me, you have a VPS with the latest version of the Debian OS, the installation is very simple:

apt install mosquitto

Done, but if we look in the processes, mosquitto is running, but netstat -nap shows us that mosquitto is listening on IP 127.0.0.1 and port 1883.

So what next? Let’s enable port 1883 on the firewall

We still need to do at least some minimal configuration. All configuration files are in

Although the user configuration files are in /etc/mosquitto/conf.d/, we can directly modify the main file /etc/mosquitto/mosquitto.conf for our needs.

For our needs, it will be enough to configure:

bind_address vyboh.zarea.net
log_type notice
password_file /etc/mosquitto/pwfile

Of course, for your own purposes, you need to set bind_adress to the FQDN or IP of your machine. Set  poland phone number data the log_type variable according to your preferences, but notice is a very suitable setting for initial debugging.

We will create the user zynek using the mosquitto_passwd command .

phone number data

 

restart mosquitto:

systemctl restart mosquitto

Now we have a minimally configured server with MQTT .

MQTT is primarily intended for IoT, but nothing prevents us from using MQTT, for example, to monitor focus on what is essential at all times server status. We will install mosquitto-clients using:

apt install mosquitto-clients

So, now let’s extract the free  cz listsmemory on my VPS from the system (just for illustration.

Scroll to Top