How to Install Node.js on Windows Server 2016

Learn to install nodejs on windows server 2016 with the official LTS MSI, verify npm, run a test app, and fix common PATH and native-module errors.
A glowing Node.js runtime cube sits beside a Windows server rack on a dark blue background.

If you need to install nodejs on windows server 2016, use the official 64-bit LTS MSI and verify both the runtime and npm from an elevated terminal. You will have a working Node.js test application in about ten minutes, without adding an unnecessary public network port.

Prerequisites

  • A running 64-bit Windows Server 2016 instance with current Windows updates. Current Node.js Windows binaries support Windows Server 2016 or later, and the 32-bit Windows installer is no longer the normal choice for current LTS releases.
  • An RDP session and a local administrator account, or an account that can approve an elevated installer and open Administrator PowerShell.
  • At least 2 GB of free disk space for Node.js, npm packages, and your test project. Larger applications may need considerably more space.
  • Internet access from the server to download the MSI and npm packages. If the application will be public, prepare its domain name and the TCP port it will use; this guide leaves that port closed.
  • A VPSLake Windows VPS with administrator access if you need a Windows Server environment for the installation.

Step 1: Confirm the server architecture

The MSI must match the operating system architecture, so check it before downloading an installer.

Open Start → Windows PowerShell, then run:

Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,OSArchitecture

Expected output for the supported installer path looks like this:

Caption                         Version        OSArchitecture
-------                         -------        --------------
Microsoft Windows Server 2016  10.0.14393    64-bit

If the result says 32-bit, do not install a current x64 MSI. Upgrade the server to a 64-bit operating system or use an application-compatible legacy runtime only after checking that the application’s dependencies still support it.

Step 2: Download the official Node.js LTS MSI

The official LTS line receives maintenance and security fixes, while the Current line is intended for trying newer features. Downloading from the Node.js site also avoids an untrusted third-party installer.

In a browser on the server, open the official Node.js download page. Select the current LTS release, then download Windows Installer (.msi) for x64. Save it in C:\Users\Administrator\Downloads or another folder you can identify.

Do not choose the ARM64 package or a source archive for this x64 Server 2016 walkthrough. If you downloaded the MSI on another computer, transfer it over a protected channel and confirm that the file name ends in -x64.msi before running it.

Step 3: Install Node.js and npm

The MSI places node.exe and npm in the standard program directory and adds that directory to the system PATH, so new terminals can find the commands.

In File Explorer, open the download folder, right-click the Node.js MSI, and select Install. In the wizard:

  1. Select Next, accept the license, and keep the default destination C:\Program Files\nodejs\ unless your server has a documented application layout.
  2. Leave Node.js runtime, npm package manager, and Add to PATH selected. These are the components required for normal server-side JavaScript work.
  3. Leave Tools for Native Modules unselected unless your project has npm packages that compile C or C++ addons. Those tools add a substantial download and are not needed for a pure JavaScript application.
  4. Select Install, approve the User Account Control prompt, and select Finish.

The installer does not start a Node.js service and does not open a firewall port. Close any Command Prompt or PowerShell windows that were already open; they may still have the old PATH.

Step 4: Verify node, npm, and the PATH

A fresh terminal confirms that Windows can locate the installed executables and that npm was installed with the runtime.

Open a new Windows PowerShell window as a standard user for this check, then run:

node --version
npm --version
Get-Command node | Select-Object Source

The exact numbers change as Node.js releases are updated. A successful check resembles:

v24.21.0
11.6.1
Source
------
C:\Program Files\nodejs\node.exe

The important results are a v-prefixed Node.js version, a numeric npm version, and a source under C:\Program Files\nodejs\. The Node.js documentation is the correct reference for APIs available in the installed release.

Step 5: Run a local test application

Running a small HTTP server proves that Node.js can execute JavaScript and bind locally without exposing the service to the internet.

Create a test folder and script in PowerShell:

New-Item -ItemType Directory -Path C:\node-test -Force | Out-Null
Set-Content -Path C:\node-test\server.js -Value "const http = require('http'); const server = http.createServer((req, res) => { res.end('Node.js is working on Windows Server 2016'); }); server.listen(3000, '127.0.0.1', () => console.log('Listening on http://127.0.0.1:3000'));"
Set-Location C:\node-test
node .\server.js

Keep that window running. You should see:

Listening on http://127.0.0.1:3000

Open a second PowerShell window and request the page locally:

Invoke-WebRequest http://127.0.0.1:3000 | Select-Object -ExpandProperty Content

Expected output:

Node.js is working on Windows Server 2016

Press Ctrl+C in the server window when the test is complete. For a real application, use a process manager or Windows service plan and bind it to a deliberate interface; do not make a development server public by accident.

Verify Node.js and npm

Run the version checks again from the account that will operate the application, then confirm npm can create and read a local package manifest without requiring global administrator access:

Set-Location C:\node-test
npm init --yes
Get-Content .\package.json

The output should include a JSON object with a "name" field and a "version": "1.0.0" field. At this point, Node.js, npm, the system PATH, and local script execution are all working. The test server only listened on 127.0.0.1, so no firewall change was required.

Troubleshooting

node is not recognized as the name of a cmdlet

The terminal was probably opened before the MSI changed PATH, or the installation did not complete. Close every existing terminal, open a new one, and run Get-Command node. If it still fails, check whether C:\Program Files\nodejs\node.exe exists and repair Node.js from Settings → Apps → Apps & features → Node.js → Modify.

npm works but a package install fails with EACCES or EPERM

The project directory may be protected, or a previous command may have left a locked file. Put the application in a writable directory such as C:\Apps\YOUR_APP, avoid running the application as Administrator, close editors or antivirus scans holding the file, and retry from that project directory. Use npm install locally rather than installing application dependencies globally.

An npm package reports that Python or Visual Studio is missing

That package contains a native addon and must compile code during installation. Install the package’s documented prerequisites, or choose a maintained package version with a prebuilt Windows binary; do not install the full native toolchain merely to run the test in this guide. If you do need it, rerun the Node.js MSI and select Tools for Native Modules, then follow the package’s build instructions.

The application works locally but not from another computer

The test server deliberately listens on 127.0.0.1, which accepts only local requests. For a production service, bind to the required interface, configure the application’s own authentication and TLS strategy, allow only its required TCP port in Server Manager → Tools → Windows Defender Firewall with Advanced Security, and check any VPS-level firewall separately.

Hardening

  • Keep Node.js on an actively supported LTS line and update dependencies with a review of the lockfile. EOL releases no longer receive official security fixes.
  • Run the application with a dedicated, least-privileged Windows account and store secrets outside source files, such as in protected environment variables or a secret manager.
  • Place a public HTTP application behind a TLS-terminating reverse proxy or load balancer, and allow only the proxy’s required backend traffic.
  • Keep Windows Server 2016 patched and limit RDP access to trusted source addresses or a VPN instead of exposing administration broadly.

FAQ

Can Node.js 24 run on Windows Server 2016?

Yes, current official x64 Windows support includes Windows Server 2016 or later. Choose the x64 LTS MSI, and keep the operating system patched; application dependencies may still impose their own minimum Windows version.

Does installing Node.js also install npm?

Yes. The standard Windows MSI includes the npm package manager when its default components are selected. Confirm both tools with node --version and npm --version from a new terminal.

Should I install Node.js for all users or only my account?

Use the default machine-wide installation when multiple administrators or services will run the application, because it places Node.js in C:\Program Files\nodejs\ and updates the system PATH. Keep project dependencies local to each application instead of sharing a writable global package directory.

Do I need to open port 3000 after installing Node.js?

No. Node.js itself is a runtime, not a network service, and the test server above binds only to localhost. Open a Windows Firewall rule only after your application is configured to listen on a deliberate interface and you know which clients should reach it.

Samrat Ghosh
Written by

Samrat Ghosh

Founder & Infrastructure Engineer

Samrat Ghosh is the founder of VPSLake, where he builds and runs the remote desktop and VPS hosting infrastructure the company is built on. He writes hands-on guides about RDP, Windows Server, VPS management and secure remote access - the practical documentation he wishes had…

Previous Article

How to Fix Blocked Downloads on Windows Server 2025

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨