Keep UniFi Controller Windows Service running 24/7 with Service Protector

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

Automatically re-launch the UniFi Controller when it stops for any reason. Survive crashes, memory leaks, accidental shutdowns, etc.

The UniFi Controller from Ubiquiti Networks allows you to manage multiple wireless networks from your web browser. It can be installed as a Windows Service, to start immediately when your server boots and keep running unattended in the background in a 24x7 environment:

To protect the UniFi Controller Windows Service with Service Protector:

  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, select the UniFi Controller windows service. It will be called UniFi Controller.

    There will be a green circle next to the name if the service is already running.

    UniFi Controller Windows Service: General Tab

  5. Click the Save button. In a few seconds, an entry for UniFi Controller will show up in the Service Protector window. The UniFi Controller windows service may be running but it is not yet being protected by Service Protector.

    UniFi Controller Windows Service: Created

    Click on the green circle to see details of the UniFi Controller service:

    UniFi Controller Windows Service: Details

  6. To start monitoring UniFi Controller, choose Protector > Start "UniFi Controller". In a couple of seconds the shield icon in the Protected column will go green to show that UniFi Controller is being managed by Service Protector.

    UniFi Controller Windows Service: Protected

    Click on the green shield to see details of the UniFi Controller service:

    UniFi Controller Windows Service: Details

  7. That's it! Next time your computer boots, UniFi Controller will start up automatically (as normal) and Service Protector will start monitoring the service to restart it quickly it if it crashes for any reason.

    We encourage you to edit the UniFi Controller entry in Service Protector and check out the many other settings that may be helpful in your environment. For example, periodically restart the service to cure memory leaks, configure a script to detect failures of the web interface, and much more.



Trouble protecting the UniFi Controller Windows Service?