Installing Open-Source EMQX MQTT Broker and Getting Started with MQTTX Client

What is EMQX?

EMQX is an open-source, highly scalable distributed MQTT message broker designed for IoT and real-time communication applications. EMQX 5.0 clusters support up to 100 million concurrent MQTT connections, with single-server throughput reaching millions of messages per second and millisecond-level low latency.

It supports multiple protocols including MQTT 3.1, 3.1.1, 5.0, HTTP, QUIC, and WebSocket, ensuring compatibility across diverse network environments and hardware devices. It also includes comprehensive SSL/TLS support, mutual authentication, and multiple identity verification mechanisms to deliver reliable, high-performance communication infrastructure for IoT devices and applications.

Its built-in SQL-based rule engine enables real-time extraction, filtering, enrichment, and transformation of IoT data. EMQX uses a leaderless distributed architecture to ensure high availability and horizontal scalability, alongside user-friendly operations and excellent observability.

Over 20,000 enterprise users from more than 50 countries rely on EMQX to connect over 100 million IoT devices worldwide, supporting digital, real-time, and intelligent enterprise transformation.

Official resources:

Install Open-Source EMQX on CentOS/RHEL

Official download page: EMQX for RHEL/CentOS

Set up YUM Repository

curl -s https://assets.emqx.com/scripts/install-emqx-rpm.sh | sudo bash

Install Required Dependencies

sudo yum install epel-release -y
sudo yum install -y openssl11 openssl11-devel

Install or Upgrade EMQX

# Install the latest EMQX version
sudo yum install emqx -y

# Upgrade existing EMQX installation
sudo yum update emqx -y

Start EMQX Service

sudo systemctl start emqx

Verify Service Status

sudo systemctl status emqx

The service is runing successfully if the output shows Active: active (running).

Install Open-Source EMQX via Docker

Official download page: EMQX for Docker

Pull EMQX Docker Image

docker pull emqx/emqx:5.7.1

Note: A network proxy is required to pull the image due to Docker's global network restrictions.

Launch EMQX Container

docker run --restart=always -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx:5.7.1

This command configures the container to auto-restart on host boot, runs in detached mode, names the container emqx, and publishes all standard MQTT and management ports.

Install Open-Source EMQX on macOS

Official download page: EMQX for macOS

  1. Select version 5.7.1 and compatible macOS versions (13 or 14)
  2. Download the installation package:
wget https://www.emqx.com/zh/downloads/broker/5.7.1/emqx-5.7.1-macos14-arm64.zip
  1. Extract and prepare the installation:
mkdir -p emqx && unzip emqx-5.7.1-macos14-arm64.zip -d emqx
  1. Start EMQX:
./emqx/bin/emqx start

Additional EMQX Installation Packages

For other operating system versions, visit the official EMQX broker download page.

EMQX Management Console

The EMQX web management console runs on port 18083. Ensure the port is open if you are using a firewall. Access the console by navigating to http://<server-ip>:18083/ in a web browser.

Default login credentials:

  • Username: admin
  • Password: public

You will be prompted to update your password on first login. After successful authentication, you can view cluster status and manage the broker using the left-hand navigation menu.

MQTX Client

MQTTX is a feature-rich cross-platform MQTT client that supports both MQTT 5.0 and 3.x protocols. It is available as desktop, CLI, and web versions, compatible with Windows, macOS, Linux, and Docker.

Download MQTTX: Official MQTTX Downloads

After installing and launching the client:

  1. Create a new connection: You can use the public EMQX test broker at mqtt://broker.emqx.io:1883, or connect to your locally deployed EMQX instance.
  2. Fill in the server connection details, select your preferred MQTT version, then click connect. MQTT 5.0 supports last will and testament messages.
  3. Add a subscription: Enter a topic filter, such as testtopic/# for multi-level wildcard matching (matches topics like testtopic/1 and testtopic/1/test), select a QoS level, then save the subscription.
  4. View incoming messages sent to your subscribed topics, or send messages by entering a target topic and content in the message input box. You will receive your own sent messages if subscribed to a matching topic filter.

Tags: EMQX MQTT MQTTX IoT docker

Posted on Fri, 08 May 2026 09:00:04 +0000 by steply