Skip to content
On this page

Install from Source Code


To compile and install EMQX from the source code, the following dependencies are needed:

  • Erlang/OTP OTP 24 or 25
  • GCC 4.8 or higher versions
  • Git
  • make
  • openssl-devel
  • libcurl-devel

You can use the Docker compilation environment EMQX Builder to compile and install EMQX from source code.

With the following commands, you can create an EMQX Builder container, configure the port mapping (optional), and start the preview after the compilation is complete:

docker run -d --name emqx-builder \
  # -p 1883:1883 \
  # -p 8083:8083 \
  # -p 8084:8084 \
  # -p 8883:8883 \
  # -p 18083:18083 \ \
  bash -c "tail -f /dev/null"

Compile and Start EMQX

The EMQX repository is located at, where the master branch is the latest EMQX 5.0 version, and the main-* branch corresponds to different minor versions (such as 4.4.x, 5.1. x).

To compile and run the latest version of EMQX, run:

# docker exec -it emqx-builder bash
git clone
cd emqx
_build/emqx/rel/emqx/bin/emqx console