Running HiveMQ as a service on Windows

Windows services are in many ways similar to Unix daemons. A primary advantage of running software in this way, is that it can launch and run independently of user logins.

This property is especially useful when when planning for events, such as unplanned reboots where one would want software to launch automatically.

In order to run HiveMQ as a Windows service, a few steps are necessary.

 

First we will need to unpack hivemq-windows-service.zip and move the newly created folder windows-service to our HiveMQ home folder.

Within it we can find installService.bat which will take care of setting up our desired service.

This needs to be run with the necessary privileges for the required changes. The easiest way to achieve this

is to either run the script as administrator with a simple double click, or to right click and select “Run as administrator”.

If installService.bat is run successfully, you will see the log message Service HiveMQ installed.

At this point you may restart your machine and confirm HiveMQ is up and running.

Related: https://hivemq.atlassian.net/wiki/spaces/KB/pages/2728329333