How to Set-Up Mosquitto MQTT Server

SETTING of MOSQUITTO MQTT SERVER VERSION 2.0.14 SCREEN SHOT
In “C:\Program Files\mosquitto”, open “mosquitto.conf” and add:

  • find “Listeners” and add
    listener 1883 0.0.0.0
  • find “Security” and add
    allow_anonymous true

Stop “Mosquitto Broker” in “Services”
Open command prompt as administrator and enter:

  • cd “C:\Program Files\mosquitto”
  • mosquitto -v -c mosquitto.conf
 

 

SETTING of TP-LINK Wireless Router Archer C1200 SCREEN SHOT REMARK
Open admin panel (192.168.1.1). Go to “Advanced” -> “NAT Forwarding” -> “Virtual Servers”, add:

  • Service Type = TCP
  • External Port = 1883
  • Internal IP = 192.168.1.102
  • Internal Port = 1883
  • Protocol = All
 

Connect MQTT Explorer or Q25 using the router’s Public IP:

or using DNS