Run ZooKeeper as a Windows Service with AlwaysUp

How to Run Apache ZooKeeper 24/7 as a Windows Service with AlwaysUp

Automatically start ZooKeeper whenever your server boots, without having to log in. Survive crashes, accidental shutdowns and other interruptions


Last Updated on August 20, 2026

Apache ZooKeeper provides directory service support for distributed applications.

To install ZooKeeper as a windows service with AlwaysUp:

  1. If necessary, download and install ZooKeeper and ensure that it works properly on your system.

    Formulate the command line that launches the application from a command prompt. This is what we'll run with AlwaysUp.

    For this guide, we installed ZooKeeper in "C:\ZooKeeper" and this command works for us:

    C:\ZooKeeper\bin\zkServer.cmd

    ZooKeeper is working

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the command file that starts ZooKeeper, zkServer.cmd. It's the command that worked for us in step 1.

    • In the Start the application field, choose Automatically, but shortly after the computer boots. This setting ensures that critical supporting services will be up and running before AlwaysUp launches ZooKeeper.

    • In the Name field, enter a name for this application in AlwaysUp. We went with ZooKeeper but you can specify something else if you like:

    ZooKeeper Windows Service: General Tab

  6. Move to the Logon tab and enter the user name and password of the Windows account where you run ZooKeeper's zkServer.cmd file. Running in this context will ensure that ZooKeeper will find your Java installation (and any other settings you may have configured in this account):

    ZooKeeper Windows Service: Logon Tab

  7. Next, switch to the Startup tab and check the Ensure that the Windows Networking components have started box. This lets AlwaysUp know that ZooKeeper needs the TCP/IP networking stack to do its work:

    ZooKeeper Windows Service: Startup Tab

  8. We're now done configuring ZooKeeper to run as a windows service, so click the Save button. In a couple of seconds, an application called ZooKeeper will show up in the AlwaysUp window. It's not yet running and will be in the "Stopped" state:

    ZooKeeper Windows Service: Installed

  9. To start ZooKeeper, choose Application > Start "ZooKeeper". The directory service will start in the background:

    ZooKeeper Windows Service: Running

  10. That's it! Next time your computer boots, ZooKeeper will start up immediately, before anyone logs on.

    Now would be a good time to restart and confirm that ZooKeeper comes up automatically.

    Finally, we encourage you to edit ZooKeeper in AlwaysUp and check out the many other settings that may be appropriate for your environment.

    For example, setup email notifications, capture console output, periodically restart the directory service to cure memory leaks, and much more.


ZooKeeper not working properly as a Windows Service?

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a Windows Service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and ZooKeeper. The AlwaysUp Event Log Messages page explains what each message means.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!

Our 14,000+ customers include...
AlwaysUp is fully compatible with Windows 11 AlwaysUp is fully compatible with Windows Server 2025
Over 97,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 20+ years!