Configure EMQTT as a Windows Service

  • 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

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

EMQTT Console

3. 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

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

Werl.exe Properties

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

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

nssm install emqttd

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

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

Windows Service Manager

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

EMQTT Dashboard

References: