Run Node.js as a Windows Service with AlwaysUp

How to Run Any Node.js Application as a Windows Service with AlwaysUp

Automatically start your Node.js script whenever your computer boots and keep it running 24/7 in the background. No need to log in first


Last Updated on June 4, 2026

Node.js is a popular platform for building scalable, server-side JavaScript applications.


To install your Node.js script as a Windows Service so that it starts at boot:

  1. Download, install, and configure Node.js, if necessary:

    Install Node.js

    Ensure that you can run your script from the command line. It's important to confirm that everything works exactly as you expect before introducing Windows Services!

  2. Next, download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Advisor to open the Application Advisor:

    Start Application Advisor

  5. Click Next to get started:

    Application Advisor: Introduction

  6. Choose Node.js from the list of applications and click Next:

    Select Node.js

  7. The advisor will spend a few seconds gathering information about your Node.js installation. Afterwards, you'll be asked to enter the full path to your Node.js script (*.js):

    Enter the full path to your Node.js script

    We specified our slightly modified version of the sample web server script mentioned on the Node.js home page, saved as "C:\Scripts\web-server.js".

    Click Next once your file is in place.

  8. On the next screen, the Advisor will prompt you to enter the user name and password of your Windows account. Click Next after you've entered them:

    Enter your Windows Credentials

  9. At this point, AlwaysUp has completed all the heavy lifting. Click Next to continue:

    Application Advisor: Ready to add Node.js

  10. The Add Application window contains all the recommended settings for running your Node.js script 24x7 as soon as your computer boots. If you are curious, you can cycle through the tabs and review the options that AlwaysUp has selected for you.

    Click Save to record your new Node.js service:

    Save your new Node.js Windows Service

  11. In a couple of seconds, a new entry will show up in the AlwaysUp window. The service is now installed.

    However, the state will be "Stopped" because the service isn't running yet:

    Node.js Windows Service installed

  12. To start your Node.js application from AlwaysUp, choose Application > Start. The state will transition to "Running" and your script will be running invisibly in the background (in Session 0):

    Node.js Windows Service running

    At this point, you should verify that your script is working as expected. Is it doing what it should?

    Our simple web server application worked flawlessly:

    Confirm that your Node.js script is working as a service

  13. That's it! Next time your computer boots, your Node.js application will start up automatically, before anyone logs on.

    We encourage you to edit the Node.js entry in AlwaysUp and check out the many other settings that may be helpful in your specific situation.

    For example, you can:


Node.js 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 Node.js 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!