Run Kafka as a Windows Service with AlwaysUp

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

Automatically launch Kafka whenever your server starts, without having to sign on first. Survive reboots, crashes and other failures


Last Updated on August 19, 2026

Apache Kafka is a distributed streaming platform supporting the publish-subscribe paradigm.

To install Kafka as a windows service with AlwaysUp:

  1. First, ensure that Kafka and its supporting software are installed and working properly on your system. Formulate the command line that starts the server from a prompt.

    For this guide, we installed Kafka in "C:\Kafka" and this command stats our server:

    C:\Kafka\bin\windows\kafka-server-start.bat C:\Kafka\config\broker.properties

    Note that we had to update the "kafka-server-start.bat" file to avoid the use of the now defunct WMIC utility:

    Removed WMIC from kafka-server-start.bat

    Hopefully the folks at Apache will fix that soon.

  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 batch file that starts Kafka, kafka-server-start.bat. This should be in the bin\windows folder in your Kafka installation directory.

    • In the Arguments field, enter the full path to your Kafka settings file. This is likely in the config sub-folder.

    • 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 Kafka.

    • And in the Name field, enter a name for this application in AlwaysUp. We chose Kafka but you can specify another name if you like:

    Kafka Windows Service: General Tab

  6. Click over to the Logon tab and enter the user name and password of the windows account that you log into to start Kafka. Running in this account will ensure that Kafka will find your Java installation along with the required environment variables (JAVA_HOME) and other necessary settings:

    Kafka Windows Service: Logon Tab

  7. Next, switch to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that Kafka needs the TCP/IP networking stack to start and operate properly:

    Kafka Windows Service: Startup Tab

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

    Kafka Windows Service: Created

  9. To start Kafka, choose Application > Start "Kafka". The service's state will transition to "Running" soon:

    Kafka Windows Service: Running

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

    We encourage you to edit Kafka in AlwaysUp and check out the many other settings that may be appropriate for your environment.

    For example, capture the output from the console to a file, boost process priority, and much more.


Kafka 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 Kafka. 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!