Install Mosquitto MQTT server
apt install mosquitto mosquitto-clients
Create a new config file for Mosquitto (you can name it whatever you want)
vim /etc/mosquitto/conf.d/primary.conf
By default, Mosquitto only listens on localhost
, to listen on all interfaces, use the following config
persistence false
# mqtt
listener 1883
protocol mqtt
# websockets
listener 9001
protocol websockets