Developer Tools Azure

Node.js 26 LTS on Windows Server 2025 on Azure User Guide

| Product: Node.js 26 LTS on Windows Server 2025

Overview

Node.js is the open source JavaScript runtime, built on Google's V8 engine, that runs web servers, APIs, real time services and tools; npm is its package manager and the registry of public packages it installs from.

This image runs Node.js 26.14.0 LTS (Lithium, the current long-term support line) with npm 11.21.3 on Windows Server 2025 Datacenter (Desktop Experience). A small sample application is already running as the Windows service NodeApp, under its own virtual account NT SERVICE\NodeApp, and answers on port 80, so you can see the server working from your browser as soon as the VM starts. Replace the sample with your own application and restart the service: it starts with Windows, restarts if it stops, and keeps its output in log files. The image holds no password, key or account of its own; you set the administrator when you deploy. The Windows Server licence is included in the virtual machine price that Microsoft bills; Node.js (MIT) and npm (Artistic License 2.0) are free software. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

What is included:

  • Node.js 26.14.0 LTS from nodejs.org's Windows installer (checksum and signature verified), in C:\Program Files\nodejs and on the machine PATH for every user
  • npm 11.21.3, the npm that ships with Node.js 26.14.0
  • The Windows service NodeApp, which runs C:\nodeapp\app\server.js with Node.js as its own virtual account NT SERVICE\NodeApp (not LocalSystem), through the WinSW 2.12.0 service wrapper; it starts with Windows and restarts if it stops
  • A sample application in C:\nodeapp\app on port 80: a page naming this server's runtime, /health for load balancer probes and /api/info as JSON. It uses only Node.js's own modules
  • C:\nodeapp locked down: the service account can read and run the application and write only its logs folder
  • A Windows Firewall rule for TCP 80, and nothing else beside Remote Desktop
  • Windows Server 2025 Datacenter, patched with Windows Update at build, with Microsoft Defender Antivirus and Windows Firewall on
  • cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours

Prerequisites

An active Azure subscription, a Remote Desktop client, and a virtual network in the target region. Standard_B2ms (2 vCPU, 8 GiB RAM) is a good starting point for an API or website with modest traffic; choose a larger size for busy applications or heavy builds with npm. In the network security group, allow inbound TCP 3389 (Remote Desktop) from your own address range only, and TCP 80 (your application) from the people and load balancers that use it.

Step 1: Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Node.js 26 LTS on Windows Server 2025 by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size, and set the Administrator account username and password. Under Inbound port rules allow RDP (3389) and HTTP (80), then narrow each rule's source to your own address range in the network security group after the VM is created. Select Review + create, then Create.

Step 2: Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn cloudimg1647283583153:nodejs-windows-server:default:latest

az vm create \
  --resource-group <your-rg> \
  --name node-server \
  --image cloudimg1647283583153:nodejs-windows-server:default:latest \
  --size Standard_B2ms \
  --admin-username <admin-name> \
  --admin-password '<a strong password>' \
  --public-ip-sku Standard

az vm open-port --resource-group <your-rg> --name node-server --port 3389 --priority 1000
az vm open-port --resource-group <your-rg> --name node-server --port 80 --priority 1010

az vm open-port opens each port to any address; narrow the rules to your own ranges in the network security group afterwards.

First boot takes a few minutes. When the VM first starts, Windows finishes its setup, then the image checks the application folder and starts the NodeApp service. Until then nothing answers on port 80. The setup is finished when the file C:\ProgramData\nodejs-windows-server-firstboot.done exists (Step 5).

Step 3: Open the sample application

Browse to http://<vm-public-ip>/ from your own computer. The sample application's page names the Node.js, npm, V8 and OpenSSL versions it runs on, the Windows service that runs it, and where its files and logs are:

The sample application's page in Microsoft Edge: Node.js v26.14.0 is running, with npm 11.21.3, V8, OpenSSL 3.5.9, win32 x64, the Windows service NodeApp (NT SERVICE\NodeApp), the application folder C:\nodeapp\app and the logs folder C:\nodeapp\logs

Step 4: Connect with Remote Desktop

Connect to the VM's public IP address with your Remote Desktop client (on Windows, mstsc; on macOS, Windows App), signing in with the administrator name and password you set at deployment. Open Windows PowerShell as administrator for the commands below. node and npm are on the PATH, so they work from any folder.

Step 5: Confirm Node.js and the service are running

node -v
npm -v
Get-Content C:\ProgramData\nodejs-windows-server-firstboot.done
Get-CimInstance Win32_Service -Filter "Name='NodeApp'" | Format-Table Name, State, StartMode, StartName -AutoSize
Get-NetTCPConnection -State Listen -LocalPort 80 | Format-Table LocalAddress, LocalPort, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}} -AutoSize
Get-NetFirewallRule -Group 'Node.js sample application' | Format-Table DisplayName, Enabled, Direction, Action -AutoSize
v26.14.0
11.21.3
done 2026-12-03T11:05:59.2446996Z

Name    State   StartMode StartName
----    -----   --------- ---------
NodeApp Running Auto      NT SERVICE\NodeApp

LocalAddress LocalPort Process
------------ --------- -------
0.0.0.0             80 node

DisplayName                               Enabled Direction Action
-----------                               ------- --------- ------
Node.js sample application (HTTP, TCP 80)    True   Inbound  Allow

First boot has finished at the time it shows, and the NodeApp service is running, starts automatically with Windows, and runs as its own virtual account. Node.js (node) listens on port 80 on every IPv4 address, and the one firewall rule the image adds lets TCP 80 in.

An elevated PowerShell window on a new VM: first boot done, the NodeApp service running and set to start automatically as NT SERVICE\NodeApp, node listening on 0.0.0.0:80, and the firewall rule for TCP 80

The Services console (services.msc) shows the same service, with its description:

The Services console with NodeApp selected: Running, Automatic, Log On As NT SERVICE\NodeApp, described as the Node.js 26.14.0 application that runs C:\nodeapp\app\server.js with PORT=80

Step 6: Ask the sample application for its status

The sample answers /health with a small JSON document, for a load balancer's health probe, and /api/info with the runtime it is on:

curl.exe -s http://localhost/health
curl.exe -s http://localhost/api/info
{"status":"ok"}
{
  "app": "cloudimg-nodejs-sample",
  "node": "v26.14.0",
  "npm": "11.21.3",
  "v8": "14.6.202.34-node.58",
  "openssl": "3.5.9",
  "platform": "win32 x64",
  "service": "NodeApp",
  "startedAt": "2026-12-03T11:05:53.689Z",
  "uptimeSeconds": 518
}

Any other address answers 404 Not Found, and any method other than GET or HEAD answers 405. From your own computer the same addresses work at http://<vm-public-ip>/health and http://<vm-public-ip>/api/info.

An elevated PowerShell window: /health answering {"status":"ok"}, /api/info with Node.js v26.14.0 and npm 11.21.3, and the files in C:\nodeapp

PowerShell can read the same answer as an object:

An elevated PowerShell window: node -v v26.14.0, npm -v 11.21.3, node.exe and npm in C:\Program Files\nodejs, and Invoke-RestMethod of /api/info listing node, npm, v8, openssl, platform and service

Step 7: Install packages with npm

npm installs packages from the public npm registry (registry.npmjs.org) into the folder you run it in. To start a project of your own, make a folder, create its package.json and add a package such as Express:

New-Item -ItemType Directory C:\demo | Out-Null; Set-Location C:\demo
npm init -y | Out-Null; Get-Content package.json | Select-Object -First 4
npm install express --no-fund --no-audit
node -e "console.log('express ' + require('express/package.json').version)"
{
  "name": "demo",
  "version": "1.0.0",
  "description": "",

added 65 packages in 9s
express 5.3.0

An elevated PowerShell window: a new project in C:\demo, npm install express adding 65 packages, and node printing express 5.3.0

Step 8: Deploy your own application

The NodeApp service runs server.js in C:\nodeapp\app with the environment variable PORT set to 80, so an application that listens on process.env.PORT works unchanged. Put your application's files in C:\nodeapp\app (its entry point named server.js, or change the service's settings, below), install its dependencies there with npm ci (from your package-lock.json) or npm install, and restart the service. As an example, this replaces the sample with a one-line Express application:

Set-Location C:\nodeapp\app
Set-Content server.js "const express = require('express'); const app = express(); app.get('/', (req, res) => res.json({ hello: 'from my app', node: process.version })); app.listen(process.env.PORT || 80);"
npm install express --no-fund --no-audit
Restart-Service NodeApp; Start-Sleep 3; (Get-Service NodeApp).Status
curl.exe -s http://localhost/
added 65 packages in 6s
Running
{"hello":"from my app","node":"v26.14.0"}

An elevated PowerShell window in C:\nodeapp\app: a new server.js written, npm install express adding 65 packages, the NodeApp service restarted and running, and curl showing {"hello":"from my app","node":"v26.14.0"}

npm may print a notice that a newer major version of npm exists. The image ships the npm that comes with Node.js 26.14.0; you can ignore the notice, or see Maintenance.

Copy your application to the server however suits you: through the Remote Desktop session's clipboard or drive redirection, git clone after installing Git for Windows, or a release package from your build pipeline. Keep secrets such as database passwords out of server.js: add them as <env> entries in the service's settings (below), which only administrators and the service can read.

Server Components

Component Version or setting Where
Node.js 26.14.0 LTS (Lithium), V8 14.6, OpenSSL 3.5.9 C:\Program Files\nodejs (on the machine PATH)
npm 11.21.3 C:\Program Files\nodejs\node_modules\npm
Service NodeApp, as NT SERVICE\NodeApp, Automatic, restarts on failure; WinSW 2.12.0 C:\nodeapp\NodeApp.exe, settings in C:\nodeapp\NodeApp.xml
Application the cloudimg sample (replace it): server.js, package.json C:\nodeapp\app
Port TCP 80 (PORT=80), every IPv4 address Windows Firewall rule in the group Node.js sample application
Logs the application's output and errors, and the wrapper's log, rolled by size C:\nodeapp\logs
Windows Server 2025 Datacenter, Desktop Experience, build 26100

Filesystem Layout

Get-ChildItem C:\nodeapp | Format-Table Mode, Length, Name -AutoSize
Get-ChildItem C:\nodeapp\app | Format-Table Mode, Length, Name -AutoSize
Get-ChildItem C:\nodeapp\logs | Format-Table Length, Name -AutoSize
Get-Content C:\nodeapp\logs\NodeApp.out.log -Tail 3
Mode   Length Name
----   ------ ----
d-----        app
d-----        logs
-a---- 1158   LICENSE-WinSW.txt
-a---- 655872 NodeApp.exe
-a---- 802    NodeApp.xml
-a---- 1022   README.txt

Mode   Length Name
----   ------ ----
-a----    332 package.json
-a----   5464 server.js

Length Name
------ ----
     0 NodeApp.err.log
     0 NodeApp.out.log
   355 NodeApp.wrapper.log

2026-12-03T11:05:54.848Z cloudimg Node.js sample listening on 0.0.0.0:80 (node v26.14.0)
Path What it holds
C:\nodeapp\app\ Your application (the sample on a new VM). The service reads and runs it; it cannot change it
C:\nodeapp\logs\ NodeApp.out.log (what the application writes to its console), NodeApp.err.log (its errors) and NodeApp.wrapper.log (the service wrapper's starts and stops). The only folder the service can write to
C:\nodeapp\NodeApp.xml The service's settings (shown below)
C:\nodeapp\NodeApp.exe The WinSW 2.12.0 service wrapper, with its licence LICENSE-WinSW.txt
C:\nodeapp\README.txt A short summary of this layout
C:\ProgramData\nodejs-windows-server-firstboot.log What first boot did

The log files are kept open by the running service, so Windows may report a length of 0 for a file that already holds lines, as above; Get-Content reads what is in it. C:\nodeapp can be read only by SYSTEM, the Administrators group and the service's own account, and only SYSTEM and Administrators can change it. The service's settings:

<service>
  <id>NodeApp</id>
  <name>NodeApp</name>
  <description>Node.js 26.14.0 application: runs C:\nodeapp\app\server.js with PORT=80 as NT SERVICE\NodeApp. Logs in C:\nodeapp\logs.</description>
  <executable>C:\Program Files\nodejs\node.exe</executable>
  <arguments>"C:\nodeapp\app\server.js"</arguments>
  <workingdirectory>C:\nodeapp\app</workingdirectory>
  <env name="PORT" value="80"/>
  <env name="NODE_ENV" value="production"/>
  <logpath>C:\nodeapp\logs</logpath>
  <log mode="roll-by-size">
    <sizeThreshold>10240</sizeThreshold>
    <keepFiles>8</keepFiles>
  </log>
  <startmode>Manual</startmode>
  <onfailure action="restart" delay="10 sec"/>
  <onfailure action="restart" delay="30 sec"/>
  <resetfailure>1 hour</resetfailure>
  <stoptimeout>15 sec</stoptimeout>
</service>

startmode is used only when the wrapper installs the service; first boot sets the installed service to start automatically, as Step 5 shows. Log files roll over at 10 MB (sizeThreshold is in KB), keeping 8.

Managing the Service

From an elevated PowerShell window:

# restart after you change the application or its settings
Restart-Service NodeApp

# stop, start, and see its state
Stop-Service NodeApp
Start-Service NodeApp
Get-Service NodeApp

# the application's latest output and errors
Get-Content C:\nodeapp\logs\NodeApp.out.log -Tail 20
Get-Content C:\nodeapp\logs\NodeApp.err.log -Tail 20

To change the entry point, the port or the environment, edit C:\nodeapp\NodeApp.xml in Notepad as administrator, then restart the service. For example, <arguments>"C:\nodeapp\app\dist\index.js"</arguments> runs a built application, and each <env name="..." value="..."/> line sets one environment variable. If you change the port, add a Windows Firewall rule and a network security group rule for it:

notepad C:\nodeapp\NodeApp.xml
Restart-Service NodeApp
New-NetFirewallRule -DisplayName 'My app (TCP 8080)' -Direction Inbound -Protocol TCP -LocalPort 8080 -Action Allow

If your application must write files, give the service account write access to that folder only, rather than to C:\nodeapp\app:

New-Item -ItemType Directory C:\nodeapp\data | Out-Null
icacls C:\nodeapp\data /grant "NT SERVICE\NodeApp:(OI)(CI)M"

On Startup

At the first start of your VM, the scheduled task NodeApp first boot (SYSTEM) runs once:

  1. It keeps the NodeApp service stopped and waits until Azure has finished setting up the VM
  2. It checks that C:\nodeapp is still as the image made it: owned by Administrators, with access for SYSTEM, Administrators and the service account only
  3. It empties the logs folder, starts the service and waits until the application answers /health on port 80
  4. It sets the service to start automatically, writes C:\ProgramData\nodejs-windows-server-firstboot.done, and removes the task and its script

If anything fails, the service stays stopped and set to Manual, and the task runs again at the next start; C:\ProgramData\nodejs-windows-server-firstboot.log says why. Every start after that, NodeApp starts with Windows.

Security Recommendations

  • Put HTTPS in front of the application. Port 80 is plain HTTP. For anything beyond a test, serve your application over HTTPS: an Azure Application Gateway or Front Door in front of the VM, IIS or another reverse proxy on the server, or HTTPS in your application itself with your own certificate.
  • Open port 80 only as widely as you need, and Remote Desktop (3389) only to your own address range. Prefer a VPN or private network for administration.
  • Keep the service's rights narrow. NT SERVICE\NodeApp can read and run C:\nodeapp and write only its logs folder. Grant write access to the folders your application needs, one at a time (see Managing the Service), and never run the service as LocalSystem.
  • Install packages you trust, from your lock file with npm ci, and check them with npm audit.
  • Do not give this VM a managed identity unless you need one. Any program on the VM, including your application and its packages, can reach the Azure Instance Metadata Service (169.254.169.254) and, through it, a managed identity's tokens.

Maintenance

  • Windows updates: Windows Update is on, as Microsoft ships it. Restarting the VM restarts NodeApp automatically.
  • Node.js updates: Node.js 26 receives security and bug fixes as 26.x releases. To update, stop the service, run the newer 26.x x64 Windows installer (.msi) from nodejs.org, then start the service again; it runs C:\Program Files\nodejs\node.exe, so it picks the new version up. Check with node -v.
  • npm updates: the image ships the npm that comes with Node.js 26.14.0, and a Node.js update brings its own. To move npm on its own, run npm install -g npm@<version> as administrator, choosing a version whose requirements list Node.js 26.
  • Back up your application: keep C:\nodeapp\app (or better, your source repository) and C:\nodeapp\NodeApp.xml. Azure Backup for the whole VM is a simple alternative.
  • Logs: the application's output is in C:\nodeapp\logs, rolled at 10 MB, and first boot's in C:\ProgramData\nodejs-windows-server-firstboot.log.

Troubleshooting

The page does not answer, or the .done file is missing

First boot may still be running: give it a few minutes and check again. Its log shows how far it got:

Get-Content C:\ProgramData\nodejs-windows-server-firstboot.log

If it answers on the server (curl.exe -s http://localhost/health) but not from your computer, check that the network security group allows TCP 80 from your address.

The service stops, or keeps restarting, after you deploy your application

The application is most likely failing as it starts. Its errors are in the error log:

Get-Content C:\nodeapp\logs\NodeApp.err.log -Tail 30
Get-Content C:\nodeapp\logs\NodeApp.wrapper.log -Tail 10

Common causes: a missing dependency (run npm ci or npm install in C:\nodeapp\app), an application that writes to a folder the service account cannot write to (see Managing the Service), or an application that listens on a fixed port instead of process.env.PORT. To see the error directly, stop the service and run the application in your PowerShell window: Stop-Service NodeApp; Set-Location C:\nodeapp\app; $env:PORT = 80; node server.js.

EADDRINUSE on port 80

Another program, or a second copy of your application, is already listening on port 80. Get-NetTCPConnection -State Listen -LocalPort 80 names its process.

Forgot the Windows password

Use Reset password on the VM's page in the Azure portal.

Support

cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours. Contact support@cloudimg.co.uk.

Node.js is a trademark of the OpenJS Foundation. Microsoft and Windows Server are trademarks of the Microsoft group of companies. cloudimg is not affiliated with or endorsed by the OpenJS Foundation or Microsoft; the software is provided under its open source licences (MIT for Node.js and WinSW, Artistic License 2.0 for npm).