Keep the SonarQube Windows Service running 24/7 with Service Protector

How to Keep the SonarQube Windows Service Running 24/7 with Service Protector

Automatically restart SonarQube if it stops for any reason. Ensure that your code quality engine achieves 100% uptime today!

SonarQube, is an open source platform for continuous inspection of code quality. It can be installed as a windows service to start automatically when your server boots:


To monitor the SonarQube windows service and have Service Protector automatically restart it if it stops for any reason:

  1. Download and install Service Protector, if necessary.

  2. Start Service Protector.

  3. Select Protector > Add to open the Add Protector window:

    Add Protector

  4. On the General tab, in the Service to protect field, choose the SonarQube windows service.

    SonarQube Windows Service: General Tab

  5. Switch to the Extras tab. To ensure that SonarQube is promptly restarted if the service takes too long to stop, check the Stopping, for longer than box mid-way down the window. The default of 60 seconds should be fine.

    SonarQube Windows Service: General Tab

  6. While there are many more settings to help you monitor and protect the SonarQube service, we're done setting up the basics. Click the Save >> button to record your settings. In a few seconds, an entry for SonarQube will show up in the Service Protector window. Service Protector is now monitoring your SonarQube service. Click on the green shield icon to see some details on protection:

    SonarQube Windows Service: Created

  7. That's it! Next time your computer boots, the SonarQube windows service will start as normal and Service Protector will begin monitoring it to quickly restart it if it stops for any reason.

    And now that you have configured the basics, please feel free to edit the SonarQube entry in Service Protector and check out the many other settings that may help SonarQube to operate smoothly. For example, send an email when the service fails, check for the service using too much CPU or RAM, restart it regularly, and much more.



Trouble protecting the SonarQube Windows Service?