Running as a service
How to install and start SonarQube Server as a service in case of a ZIP installation. The operation depends on your operating system.
On Windows
Installing or uninstalling SonarQube as a service
> <sonarqubeHome>\bin\windows-x86-64\SonarService.bat install
> <sonarqubeHome>\bin\windows-x86-64\SonarService.bat uninstallStarting the service
> <sonarqubeHome>\bin\windows-x86-64\SonarService.bat startStopping the service
> <sonarqubeHome>\bin\windows-x86-64\SonarService.bat stopChecking the service status
To check if the SonarQube service is running:
> <sonarqubeHome>\bin\windows-x86-64\SonarService.bat statusOn Linux with systemd
On a Unix system using systemd, you can install SonarQube as a service. You cannot run SonarQube as root in Unix systems. Ideally, you will have created a new account dedicated to the purpose of running SonarQube. Let’s suppose:
The user used to start the service is
sonarqubeThe group used to start the service is
sonarqubeThe Java Virtual Machine is installed in
/opt/java/SonarQube has been unzipped into
/opt/sonarqube/
Then create the file /etc/systemd/system/sonarqube.service based on the following:
Once your sonarqube.service file is created and properly configured, run:
On Linux with initd
The following has been tested on Ubuntu 20.04 and CentOS 6.2.
You cannot run SonarQube as root in *nix systems. Ideally, you will have created a new account dedicated to the purpose of running SonarQube. Let’s suppose the user used to start the service is sonarqube. Then create the file/etc/init.d/sonar based on the following:
Register SonarQube at boot time (RedHat, CentOS, 64 bit):
Register SonarQube at boot time (Ubuntu, 64 bit):
Once registration is done, run:
Was this helpful?

