Run Node.js as a Windows Service

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

Start your Node.js script when your PC boots and keep it running 24/7 in the background. No need to log in!

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

AlwaysUp includes advanced tools to make Node.js start at boot and run 24/7.

The Application Advisor will help you install Node.js as a Windows Service with all our recommended settings — in just a few clicks. Simply select Advisor from the Application menu and follow the straightforward prompts.

To configure your Node.js script as a Windows Service with AlwaysUp 8.0 and later:

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

  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 Node.js executable, node.exe. By default, this will be:

      C:\Program Files\nodejs\node.exe

    • In the Arguments field, enter the full path to your Node.js script, enclosing the entire thing in quotes if it has a space. We have 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.

    • In the Name field, enter the name that you will call the application in AlwaysUp. We have specified Node.js Server but you can specify another name if you like.

    Node.js Windows Service: General Tab

  6. Click over to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that Node.js needs TCP/IP networking support to do its work.

    Node.js Windows Service: Startup Tab

  7. Click the Save >> button. In a couple of seconds, an application called Node.js Server will show up in the AlwaysUp window. It is not yet running though.

    Node.js Windows Service: Created

  8. To start your application from AlwaysUp, choose Application > Start "Node.js Server":

    Node.js Windows Service: Running

    Note that Node.js will be running in Session 0. If you are on Windows 2012/8/7/2008/Vista, you can select Tools > Switch to Session 0... to see the usual console window running in the isolated Session 0:

    Node.js Windows Service: Running in Session 0

  9. That's it! Next time your computer boots, your Node.js application will start up immediately, before anyone logs on. We encourage you to edit your application in AlwaysUp and check out the many other settings that may be appropriate for your environment. For example, send email alerts if the application stops, boost its priority, etc.



Node.js not working properly as a Windows Service?

  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and your application. The AlwaysUp Event Log Messages page explains the more obscure messages.
  • Consult the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1 New!

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!