Skip to main content

Configure EMQTT as a Windows Service

info
  • Download the latest EMQTT Broker from here.
  • Download the latest Process Explorer from here.
  • Download the latest NSSM Service Manager from here.
  1. Extract EMQTT Broker into C:\emqttd

  2. Open a command prompt as administrator and CD into C:\emqttd. Then run the following command.

.\bin\emqttd console
tip

You should see the following EMQTT console when you execute the above command.

EMQTT Console

  1. Extract Windows Process Explorer and run it as Administrator. Navigate to explorer.exe > cmd.exe > werl.exe and then right click on it and open properties.

Process Explorer

  1. Make sure to record the values of Path, Command line, and Current directory.

Werl.exe Properties

  1. Extract NSSM Service Manager into C:\Program Files\nssm-2.24.

  2. Open a command prompt as administrator and CD into C:\Program Files\nssm-2.24. Then run the following command.

nssm install emqttd
tip

You shoud get the following NSSM Service Installer window when you execute the above command. Fill the Path, Startup Directory, and Argumets recorded in Step 4.

NSSM Service Installer

  1. Open Services.msc and start the EMQTT Broker service which we added in step 6.

Windows Service Manager

  1. Open a web browser and navigate to the following URL in order to make sure EMQTT Broker service is running.
tip

EMQTT Dashboard

References:

  1. Recommend way to run emqttd 2.0 on Windows
  2. Documentation: Installing on Windows