Start any Spring Boot App as a Windows Service with AlwaysUp

How to your Run your Spring Boot Application as a Windows Service

Automatically start your Spring Boot/Maven/Java application whenever your computer reboots — no need to log in first


Last Updated on May 2, 2026

Spring Boot is an open source Java-based framework ideally suited for creating production-grade micro services.

To install your Spring Boot app as a Windows Service with AlwaysUp:

  1. First, compose the full command line that starts your application.

    Since we followed the Spring Quickstart guide to generate the application used in this tutorial, our Maven command line is:

    C:\Maven\bin\mvn.cmd spring-boot:run

    Now would be a good time to open a command prompt and ensure that the command launches your application as you expect. If your command doesn't work here, it won't work as a service either.

  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 Maven executable, mvn.cmd. This is C:\Maven\bin\mvn.cmd for us.

    • In the Arguments field, enter your parameters to Maven.

    • In the Start in directory field, enter the folder holding the Spring Boot project files (where the "pom.xml" configuration file lives).

    • And in the Name field, enter the name that you would like call this application in AlwaysUp.

      We've gone with "Spring Boot Service" but you can choose a better name for your situation:

    Spring Boot Windows Service: General Tab

  6. Click over to the Logon tab and enter the user name and password of the Windows account in which you installed and configured Maven and Java. Your service needs to run in this account, to find your environment variables (such as JAVA_HOME and MAVEN_HOME) and other required settings:

    Spring Boot Windows Service: Logon Tab

  7. Move to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that Spring Boot needs the TCP/IP networking stack to do its work:

    Spring Boot Windows Service: Startup Tab

  8. When Spring Boot is running as a background Windows Service (in the isolated Session 0), its informative console window will not be visible on your desktop. You won't be able to see if Maven or Java is failing.

    To get around that issue, we recommend capturing the console output to a text file. You can then open the file in Notepad — or better yet, use the free Tail for Win32 utility to follow the file's contents.

    To set this up, switch to the Extras tab and enter the full path to a log file in the Capture output to this log file section. We recommend automatically trimming the file to prevent it growing too large:

    Spring Boot Windows Service: Extras Tab

  9. We're done configuring Spring Boot so click the Save button to record your settings. In a couple of seconds, an application called Spring Boot Service (or whatever you called it) will show up in the AlwaysUp window.

    The service has been installed but it's not yet running and the state will be "Stopped":

    Spring Boot Windows Service: Created

  10. To start your Spring Boot app, choose Application > Start "Spring Boot Service". The state will transition to "Running":

    Spring Boot Windows Service: Running

  11. Finally, confirm that your web application is working as expected. Check both the browser and the console log file you configured in step 8.

    Our simple service is working fine:

    Confirm Spring Boot is Working

  12. That's it! Next time your computer boots, AlwaysUp will launch your Spring Boot application, before anyone logs on.

    Feel free to edit the entry in AlwaysUp and explore the many advanced options available to you.

    For example, you can:


Spring Boot 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 your Spring Boot application. The AlwaysUp Event Log Messages page explains the more obscure messages.

  • 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!