Skip to content

Setup an MQTT Broker (EMQX)

Pablitox26 edited this page Nov 24, 2020 · 3 revisions

At this moment there is no Windows procedure. Here the instructions for a Linux based O.S. First, donwload the required repostories. other distributions

wget https://www.emqx.io/downloads/broker/v4.1.0/emqx-ubuntu18.04-v4.1.0.zip
unzip emqx-ubuntu18.04-v4.1.0.zip

By default, the system will use the following ports. However, some of the following are being used by Hornet.

  • Port 1883 /TCP: MQTT
  • Port 11883 /TCP: MQTT only used for local client connection
  • Port 8883 /TCP: MQTT with SSL connection
  • Port 8083 / TCP: MQTT Web Socket
  • Port 8084 /TCP: MQTT Web Socket with SSL
  • Port 18083 / TCP: HTTP Dashboar
  • Port 8081 / TCP: HTTP Magnament Console

We proceed to modify the necessary ports

nano /emqx/etc/emqx.conf

Look up for the line with port 8083 and replace it by 8093; also, modify the line with port 8084 by 8094

Then we go to the magnament file

nano /emqx/etc/plugins/emqx_management.conf

Replace the line with port 8081 by 8090 Updated ports:

  • Port 1883 /TCP: MQTT
  • Port 11883 /TCP: MQTT only used for local client connection
  • Port 8883 /TCP: MQTT with SSL connection
  • Port 8093 / TCP: MQTT Web Socket
  • Port 8094 /TCP: MQTT Web Socket with SSL
  • Port 18083 / TCP: HTTP Dashboar
  • Port 8090 / TCP: HTTP Magnament Console

If you are running the Broker on a VPS or hosting, adjust it to modify the listed ports.

Then we go to the emqx folder

cd /emqx

From this folder we execute

./bin/emqx start

After opening the corresponding ports in the firewall, then go to http://www.yourdomain:18083

  • Usename: admin
  • Password: public

Don't forget to change the default password.