Node.jsWindowsJavaScript4 min read

Install Node.js on Windows

Install Node.js on Windows Server using the official MSI, winget, or nvm-windows.


Install Node.js on Windows Server

Node.js runs natively on Windows. This guide covers installation and verification on your Windows Server VPS.

Method 1 — Download and install (recommended)

Download the LTS installer:

powershell
# Download Node.js LTS MSI
Invoke-WebRequest -Uri "https://nodejs.org/dist/v20.11.0/node-v20.11.0-x64.msi" -OutFile "C:\temp\nodejs.msi"

# Silent install
msiexec /i "C:\temp\nodejs.msi" /quiet /norestart

Method 2 — Using winget

powershell
winget install OpenJS.NodeJS.LTS

Method 3 — Using Chocolatey

Install Chocolatey first (if not installed):

powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Then install Node.js:

powershell
choco install nodejs-lts -y

Verify the installation

Open a new PowerShell window:

powershell
node --version
npm --version

Update PATH (if needed)

If node is not recognized, add it to PATH:

powershell
$nodePath = "C:\Program Files\nodejs"
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$nodePath", "Machine")

Install global packages

powershell
npm install -g pm2-windows-service
npm install -g yarn
npm install -g typescript

Run a Node.js application

powershell
# Create a test app
New-Item -Path "C:\apps\myapp" -ItemType Directory
Set-Content -Path "C:\apps\myapp\index.js" -Value "const http = require('http'); const server = http.createServer((req, res) => { res.end('Hello from Baires Host!'); }); server.listen(3000, () => console.log('Running on port 3000'));"

# Run it
node C:\apps\myapp\index.js

Run as a Windows Service

To keep Node.js running after you close RDP, use NSSM or pm2-windows-service. See the "Schedule tasks with Task Scheduler" guide for alternatives.

Tip

For production Node.js on Windows, consider using IIS with iisnode module or running behind IIS as a reverse proxy. This gives you SSL termination and process management through IIS on your Baires Host VPS.


Was this guide helpful?