# Get Started

Starting from download and installation, this document is to guide you to quickly get an EMQX node up and running.

# Download EMQX

EMQX stands as the world's premier Cloud-Native IoT Messaging Platform. It incorporates a comprehensive distributed MQTT broker and a SQL-based IoT rule engine, all in one package. This powerful combination enables EMQX to facilitate robust, high-performance data transportation, processing, and integration, thereby driving business-critical IoT solutions.

  • Support for multiple IoT protocols
  • Powerful SQL-based rule engine
  • Rich data persistence and bridging choices
  • Management & monitoring center
  • Global technical support team

Try Free (opens new window)

# Install EMQX

# Deplot EMQX with Docker

Learn more about the docker image on Docker Hub (opens new window). Container deployment is the quickest way to start experimenting with EMQX

  1. Get the Docker image
docker pull emqx/emqx-ee:latest
  1. Start Docker container
docker run -d --name emqx-ee -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx-ee:latest

# Deploy EMQX with Kubernetes

For Kubernetes, EMQ offers EMQX Kubernetes Operator (opens new window).

EMQX Kubernetes Operator is an application orchestration tool based on Kubernetes native API, which is used for the automatic deployment and lifecycle management of EMQX clusters. You can refer to the documentation (opens new window) to learn how to deploy EMQX using the Operator.

# Deploy EMQX with Terraform

Deploy all infrastructure including EMQX Enterprise clusters on the mainstream public cloud with one click through Terraform.

The fastest way to deploy EMQX Enterprise clusters on the public cloud

For more information about Terraform installation and deployment, please refer to EMQX Terraform (opens new window)

# Run in a VM or on Bare Metal

EMQX can be deployed directly to bare metal servers or virtual machines. A minimum of 2 cores and 4GB RAM can run the EMQX.

EMQX has prebuilt packages downloadable for Linux (RedHat, CentOS, Rockylinux) as well as Debian, Ubuntu, and MacOS.

For other platforms which are not in the prebuilt list, you may simply contact EMQ (opens new window) for support.

# Start EMQX

After the installation, you can start EMQX through the command of systemctl or EMQX.

After EMQX is started successfully, you can visit http://localhost:18083/ (opens new window) (replace localhost with your actual IP address) through a browser to access EMQX Dashboard for device connection and related indicator monitoring and management.

To start EMQX directly, run:

emqx start

After the startup is successful, you can use the emqx ping command to check the running status of the node. If pong is returned, it means the running status is OK:

emqx ping

To start EMQX using systemctl, run:

sudo systemctl start emqx

Check if the service is working properly:

sudo systemctl status emqx

Start EMQX when installed with ZIP installation package

Switch to the EMQX decompression directory and execute the following command to start EMQX:

./bin/emqx start

In development mode, you can use the console command to start EMQX on the console and view the startup and runtime logs printed to the console.

./bin/emqx console

# Quick Verification Using an MQTT client

After startup, you can quickly verify if EMQX is working by any MQTT client. You can use the following client tools or client libraries to access EMQX

# Dashboard WebSocket Tool

EMQX dashboard comes with a built-in, WebSocket-based MQTT client.

Open Dashboard and enter the page of Tools -> Websocket, where you can use the MQTT over WebSocket client to quickly access EMQX.

The Websocket page provides you with a simple but effective WebSocket client tool, which can be used for publishing, subscribing, and inspecting messages.


# MQTTX desktop client tool

MQTTX is an elegant cross-platform MQTT 5.0 open source desktop client tool that supports running on macOS, Linux, and Windows.

MQTTX has many features, provides a concise graphical interface and operation logic, supports MQTT/MQTT over WebSocket access and one-way/two-way SSL authentication, and supports Payload format conversion, simulation of test data with a custom script, automatic subscription of $SYS topic, viewing Traffic statistics and so on.

For download and use, please refer to the MQTTX website (opens new window).


# EMQX Client Library

For developers, we have compiled a list of popular MQTT clients for your reference.

# MQTT Client Libraries

# Client Example Code

For MQTT client library example code, we try to cover as many mainstream programming languages and platforms as possible, including

For a more detailed list, please refer to MQTT-Client-Examples (opens new window)

# Advanced Operation

After completing the installation, startup, and access test, you can now continue to read the following documents for a proper in-production setup.

# Authentication

Authentication is an important part of most applications, and enabling authentication can effectively fence off malicious client connections.

Authorization rules, or Access Control List (ACL) can be configured to ensure only legit clients are permitted to publish or subscribe to certain topics.

  • Authentication: Select a built-in plugin, to integrate with an internal or external database, JWT, or HTTP service as the authentication data source.
  • Authorization / ACL: Select a built-in plugin, to integrate with an internal or external database, or HTTP service as the ACL data source.

# Rule Engine

The built-in SQL based rule-engine can extract, filter, enrich, and convert messages between devices and data platforms in real-time, and forward the data to Webhooks or other MQTT Brokers without having to implement MQTT clients to do the job.

EMQX enterprise edition can also integrate with Kafka, various SQL / NoSQL / time-series databases, and enterprise systems, such as SAP.

  • Rule Engine: The concept and basic usage of the rule engine.
  • Create Rule: How to create a rule.
  • Example: Tutorial on using various data sources for a rule engine.


HTTP API is a frequently used function in IoT platform development and EMQX operation and maintenance. HTTP API can realize integration with external systems, such as querying and managing client information, broker subscription, publishing messages and creating rules.

  • HTTP API: include HTTP API access point and access authentication method.
  • Basic Information: Get basic information such as EMQX version and running status.
  • Node: Get the information of EMQX node.
  • Client: View online client information and support kicking out the client.
  • Subscription Information: View the subscription topic list and subscription relationship.
  • Routes: View subscribed topics.
  • Message Publishing: Call EMQX through HTTP to publish MQTT messages, with a reliable way for applications to communicate with clients.
  • Topic Subscription: Dynamically manage the client subscription list, without the need for the client to actively initiate subscription/unsubscription.
  • Plugins: Status management of plugins with start and stop operations.

# Operation and Maintenance

It contains official usage guidelines and best practices.


In FAQ (Frequently Asked Questions), we regularly collect and sort out the common problems and frequently encountered errors of EMQX users, such as topic number limit, external resource connection errors, startup failure reasons, etc.

In addition, you can visit EMQ Q&A Community (opens new window) to put forward and answer questions about the use of EMQX and EMQ-related products, and exchange experience of IoT-related technologies with EMQX users.