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.


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 9.7

4.6 MB Installer
  • Unrestricted 30-day trial for new users; upgrade for existing users
  • Windows 10/8.1/8/7/XP & Windows Server 2012 R2/2008/2003
  • How to Install | EULA
Our customers include...


Compatible with Windows 10 (32 & 64-bit)

Windows Server 2012 Certified (32 & 64-bit)

Windows 8 Compatible (32 & 64-bit)

Compatible with Windows 7 (32 & 64-bit)

Works with Windows Server 2008 R2 (32 & 64-bit)



Over 68,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 10+ years!