/go/mqtt installs Eclipse Mosquitto, a lightweight broker for MQTT, the messaging protocol used by IoT devices, sensors, and many apps. The command: The command works on RHEL-family servers that use firewalld (AlmaLinux, Rocky, CentOS, Red Hat, Fedora). It does not check the operating system. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# 1. Install and configure Mosquitto
/go/mqtt
# 2. Secure the configuration before the broker restarts (see "Securing the broker")
sudo nano /etc/mosquitto/mosquitto.conf
# 3. Apply it
sudo systemctl restart mosquitto
Options
This command has no options. Arguments are only written to the log file.
Examples
# Install Mosquitto
/go/mqtt
# Test it from the server: in one terminal, listen...
mosquitto_sub -h localhost -t "test/topic"
# ...and in another, publish a message
mosquitto_pub -h localhost -t "test/topic" -m "Hello MQTT"
# Check the service and the open port
systemctl status mosquitto
sudo firewall-cmd --list-ports
Output
The command prints what firewall-cmd and dnf print, such as success for each firewall step and the package installation progress. There is no final message. Every run is recorded in /var/log/go/mqtt.log.
[!IMPORTANT]
The configuration file is written after the service is restarted, and the service is not restarted again. Mosquitto keeps running with its previous settings until the next restart or reboot. After that, it listens on all interfaces and allows anonymous clients.
See the full reference at /go/mqtt and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
