Keep Openfire Windows Service running 24/7

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

Automatically restart Openfire when it stops for any reason. Guard against memory leaks, crashes, hang-ups with the web interface and more

Openfire is an open-source real-time collaboration server enabling instant messaging and group chat. It is best installed as a windows service to ensure that it starts as soon as the server boots and runs unattended in the background.

To manage the Openfire 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. You will be on the General tab. In the Service to protect field, choose the Openfire windows service, called, surprisingly Openfire. You will notice a green circle on the left if the Openfire service is already running, as was the case on our server.

    Openfire Windows Service: General Tab

  5. Switch over to the Monitor tab. If you find that Openfire accumulates memory and gets slower over time, we recommend that you periodically restart the service at a time when no one is likely to be using the server. To do so:

    1. Check the At the following times box.

    2. Click the Add button.

    3. Specify the day and time to restart the service. We have chosen every day at 3 AM. Note that you can choose to reboot the server at that time if you like.

    4. Click the OK button to record the time.

    Openfire Windows Service: Monitor Tab

  6. And if you find that the Openfire windows service occasionally gets stuck in the "Stopping" or "Starting" state, click over to the Extras tab and check the corresponding options.

    Openfire Windows Service: Extras Tab

  7. Click the Save button. In a second or two, an entry for Openfire will show up in the Service Protector window. The Openfire service is probably already running but it's not yet being monitored by Service Protector (hence the red shield). Click on the green circle to reveal some details on the Openfire service:

    Openfire Windows Service: Created

  8. To start protection, choose Protector > Start "Openfire". The shield icon will go to green to indicate that Service Protector has started and the Openfire service is being protected.

    Click the shield icon to see how Service Protector is doing:

    Openfire Windows Service: Running

  9. That's it! Next time your computer boots, Openfire will start and Service Protector will begin watching the service to quickly restart it if it fails.

    We encourage you to edit Openfire in Service Protector and check out the many other settings that may be appropriate for your environment. For example, send email alerts when the service fails, add a script to detect failures of the web interface, and much more.



Trouble protecting the Openfire Windows Service?