Running HiveMQ as a service on Windows OS
To run HiveMQ as a Windows service, we provided an alternative Windows service installation by using the NSSM tool.
Instructions for installing Windows service
First, download a PowerShell script that will automate all required steps in the GitHub repository below.
Download "InstallHiveMQService.ps1" PowerShell Script
Open Windows PowerShell as administrator.
Temporarily sets the current PowerShell session execution policy to Bypass.
Set-ExecutionPolicy Bypass -Scope Process -Force
Navigate to the folder where you downloaded the PowerShell script and execute the
InstallHiveMQService.ps1
script to install the HiveMQ service and observe the execution output in the terminal.
.\InstallHiveMQService.ps1
We recommend installing HiveMQ in the C:\hivemq
directory. The following steps assume this directory is used. If you have extracted HiveMQ to a different directory on your Windows OS, you can specify the parameter -installationFolder
directly in the command line to specify a different version of HiveMQ or a different installation folder, sample command below.
.\InstallHiveMQService.ps1 -installationFolder "C:\hivemq"
If the HiveMQ Windows service is installed successfully, you will see the output like the screenshot below.
At this point, you may confirm that HiveMQ is up and running. First, double-check if the service is installed and with the status “running”.
The next step is to verify if you can access the HiveMQ administrative console in your browser at http://localhost:8080. The default username is
admin
and the default password ishivemq
.
Restart your machine. Upon reboot, verify that HiveMQ starts automatically.
Instructions for uninstalling Windows service
To remove the HiveMQ service, simply execute the following commands in either a Command Prompt or a PowerShell window.