{"id":837,"date":"2026-10-14T18:00:00","date_gmt":"2026-10-14T18:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=837"},"modified":"2026-10-14T18:00:00","modified_gmt":"2026-10-14T18:00:00","slug":"install-nodejs-windows-server-2022","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/10\/14\/install-nodejs-windows-server-2022\/","title":{"rendered":"How to Install Node.js on Windows Server 2022"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To install nodejs on windows server 2022, download the official x64 LTS MSI and launch it from an Administrator PowerShell session. In about ten minutes, you will have Node.js, npm, a verified system PATH, and a localhost test server running without exposing a new public port.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A patched, 64-bit Windows Server 2022 installation.<\/li>\n\n\n<li>An RDP connection and a local administrator account that can approve User Account Control prompts and run elevated PowerShell.<\/li>\n\n\n<li>At least 2 GB of free disk space for the runtime, npm cache, and a small test project, plus outbound HTTPS access to <code>nodejs.org<\/code>.<\/li>\n\n\n<li>A domain name is not required for this local test. If you will publish an application, prepare the domain, TLS plan, and intended listening port separately.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-windows-rdp\">VPSLake Windows VPS<\/a> with administrator access if you need a Windows Server environment for Node.js.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Check Windows Server 2022 and the CPU architecture<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The current Windows installer is architecture-specific, so confirm that this server is the usual x64 build before downloading anything.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Start \u2192 Windows PowerShell<\/strong>, then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, OSArchitecture<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output resembles:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Caption                         Version        OSArchitecture\n-------                         -------        --------------\nMicrosoft Windows Server 2022  10.0.20348    64-bit<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Continue when <code>OSArchitecture<\/code> is <code>64-bit<\/code>. Do not install the x64 MSI on a 32-bit system; use a 64-bit Windows Server image before deploying a current Node.js release.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Download the official Node.js LTS MSI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Selecting the LTS line gives a maintenance-focused release, while retrieving the file from the Node.js distribution index avoids third-party download sites.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Administrator PowerShell, run this block to select the first current LTS release that publishes a Windows x64 MSI:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n$release = Invoke-RestMethod -Uri 'https:\/\/nodejs.org\/dist\/index.json' | Where-Object { $_.lts -and $_.files -contains 'win-x64-msi' } | Select-Object -First 1\n$version = $release.version\n$installer = Join-Path $env:TEMP \"node-$version-x64.msi\"\nInvoke-WebRequest -Uri \"https:\/\/nodejs.org\/dist\/$version\/node-$version-x64.msi\" -OutFile $installer\nGet-AuthenticodeSignature -FilePath $installer | Select-Object Status\nGet-Item $installer | Select-Object Name, Length<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The signature status should be <code>Valid<\/code>, and the MSI size should be greater than zero:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Status\n------\nValid\nName                    Length\n----                    ------\nnode-vMAJOR.MINOR.PATCH-x64.msi  NNNNNNN<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you prefer the graphical route, open the <a href=\"https:\/\/nodejs.org\/en\/download\/\" target=\"_blank\" rel=\"noopener\">official Node.js download page<\/a> in the RDP session, choose the release marked <strong>LTS<\/strong>, and select <strong>Windows Installer (.msi)<\/strong> for <strong>x64<\/strong>. The download page is also the right place to choose a specific supported LTS version for an application with a fixed compatibility requirement.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Install Node.js and npm<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The MSI installs the runtime and npm together, adds <code>C:\\Program Files\\nodejs\\<\/code> to the machine PATH, and leaves application ports closed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start the downloaded installer from the elevated PowerShell window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Start-Process msiexec.exe -ArgumentList \"\/i `\"$installer`\"\" -Wait -Verb RunAs<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When the setup wizard appears:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Select <strong>Next<\/strong>, accept the license, and keep <code>C:\\Program Files\\nodejs\\<\/code> unless your server has a documented alternate layout.<\/li>\n\n\n<li>Keep <strong>Node.js runtime<\/strong>, <strong>npm package manager<\/strong>, and <strong>Add to PATH<\/strong> selected.<\/li>\n\n\n<li>Leave <strong>Tools for Native Modules<\/strong> clear for now. Select it only when an application specifically needs to compile a native C or C++ addon.<\/li>\n\n\n<li>Select <strong>Install<\/strong>, approve the elevation prompt, and then choose <strong>Finish<\/strong>.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The installer does not start an application service. Close any PowerShell or Command Prompt windows that were open before installation; those sessions retain the old PATH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Verify the runtime, npm, and PATH<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A new terminal session confirms that Windows can find the machine-wide installation rather than an older copy in another folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open a new <strong>Windows PowerShell<\/strong> window and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node --version\nnpm --version\nGet-Command node | Select-Object -ExpandProperty Source<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact release numbers change as Node.js publishes updates. A successful check looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vMAJOR.MINOR.PATCH\nN.N.N\nC:\\Program Files\\nodejs\\node.exe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The first line must begin with <code>v<\/code>, npm must print a numeric version, and the final path should point to <code>C:\\Program Files\\nodejs\\node.exe<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Run a private Node.js test server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A loopback-only HTTP server proves that Node.js can execute code and listen successfully while keeping port 3100 inaccessible from the internet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create the test folder and script in PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>New-Item -ItemType Directory -Path C:\\node-check -Force | Out-Null\n@'\nconst { createServer } = require(\"node:http\");\nconst server = createServer((request, response) =&gt; {\n  response.writeHead(200, { \"Content-Type\": \"text\/plain; charset=utf-8\" });\n  response.end(\"Node.js on Windows Server 2022 is responding\\n\");\n});\nserver.listen(3100, \"127.0.0.1\", () =&gt; {\n  console.log(\"Listening on http:\/\/127.0.0.1:3100\");\n});\n'@ | Set-Content -Path C:\\node-check\\server.js -Encoding utf8\nSet-Location C:\\node-check\nnode .\\server.js<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep that window open. It should print:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Listening on http:\/\/127.0.0.1:3100<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open a second PowerShell window and request the page locally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(Invoke-WebRequest -UseBasicParsing http:\/\/127.0.0.1:3100).Content.Trim()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Node.js on Windows Server 2022 is responding<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Press <code>Ctrl+C<\/code> in the server window when the check is finished. Because the process listens on <code>127.0.0.1<\/code>, you do not need a Windows Firewall exception for this test.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify Node.js on Windows Server 2022<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run a final runtime check from the account that will own the application, then let npm create a local manifest. This checks the platform, architecture, Node.js release, and ordinary project-directory write access in one pass.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -e \"console.log(process.platform); console.log(process.arch); console.log(process.version)\"\nSet-Location C:\\node-check\nnpm init --yes\nGet-Content .\\package.json<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The first three lines should be <code>win32<\/code>, <code>x64<\/code>, and a <code>v<\/code>-prefixed version. The JSON should contain a project <code>name<\/code> and a <code>version<\/code> field. For runtime APIs and supported behavior, use the <a href=\"https:\/\/nodejs.org\/docs\/latest\/api\/\" target=\"_blank\" rel=\"noopener\">official Node.js API documentation<\/a>.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Run Node.js on Windows\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">Windows Server hosting<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Run Node.js on Windows<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Deploy Node.js applications on a Windows VPS with administrator access and full server control.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-windows-rdp\" aria-label=\"View Windows VPS\">View Windows VPS<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>node is not recognized as the name of a cmdlet<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The shell was opened before the MSI updated the machine PATH, or the installation did not finish. Close all existing terminals, open a new PowerShell window, and run <code>Get-Command node<\/code>; if it still fails, check for <code>C:\\Program Files\\nodejs\\node.exe<\/code> and repair Node.js from <strong>Settings \u2192 Apps \u2192 Installed apps \u2192 Node.js \u2192 Modify<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>npm.ps1 cannot be loaded because running scripts is disabled<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PowerShell is blocking npm&#8217;s script shim, not the Node.js executable. Confirm npm with <code>npm.cmd --version<\/code>, or set a user-scoped policy with <code>Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned<\/code>, open a new terminal, and retry <code>npm --version<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>npm ERR! code EACCES<\/code> or <code>EPERM<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The project may be inside a protected folder, or another process may have locked a file. Keep the application under a dedicated path such as <code>C:\\Apps\\YOUR_APP<\/code>, install dependencies locally with <code>npm install<\/code>, close editors that hold files open, and avoid making a global package directory writable by every user.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The test works on the server but not from another computer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The sample intentionally binds to <code>127.0.0.1<\/code>, which accepts only local requests. For a real deployment, bind the application to the required interface, put it behind a TLS-terminating reverse proxy, and create a narrow inbound rule in <strong>Server Manager \u2192 Tools \u2192 Windows Defender Firewall with Advanced Security<\/strong> for only the port and source addresses you need; also check the VPS control-panel firewall.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Keep Windows Server 2022 patched and stay on an actively supported Node.js LTS line; review dependency changes before upgrading production applications.<\/li>\n\n\n<li>Run the application under a dedicated least-privileged Windows account, not Administrator, and keep secrets in protected environment variables or a secret manager.<\/li>\n\n\n<li>Keep project dependencies local and review <code>package-lock.json<\/code> changes before accepting updates.<\/li>\n\n\n<li>Leave port 3100 closed. If a public service is required, expose only the reverse proxy&#8217;s TLS port and restrict backend traffic to that proxy.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Which Node.js release should I use on Windows Server 2022?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the current LTS release for most server applications because it is the maintenance-oriented line. Choose Current only when the application requires a newer feature and its dependency stack explicitly supports it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does the Windows MSI install npm too?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. The standard MSI includes npm when <strong>npm package manager<\/strong> remains selected in the component screen. Check both tools with <code>node --version<\/code> and <code>npm --version<\/code> from a newly opened terminal.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does installing Node.js open port 3000 or 3100?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Node.js is a runtime, and the MSI does not publish an application or create an inbound firewall rule. A port becomes relevant only when your code starts a network listener, so set its bind address and firewall policy deliberately.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need Tools for Native Modules?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Only if an npm dependency has to compile a native addon and does not provide a compatible prebuilt binary. Start with the runtime and npm, then add the toolchain according to that dependency&#8217;s build instructions if an install actually requires it.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Which Node.js release should I use on Windows Server 2022?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Use the current LTS release for most server applications because it is the maintenance-oriented line. Choose Current only when the application requires a newer feature and its dependency stack explicitly supports it.\"}}, {\"@type\": \"Question\", \"name\": \"Does the Windows MSI install npm too?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes. The standard MSI includes npm when **npm package manager** remains selected in the component screen. Check both tools with `node --version` and `npm --version` from a newly opened terminal.\"}}, {\"@type\": \"Question\", \"name\": \"Does installing Node.js open port 3000 or 3100?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Node.js is a runtime, and the MSI does not publish an application or create an inbound firewall rule. A port becomes relevant only when your code starts a network listener, so set its bind address and firewall policy deliberately.\"}}, {\"@type\": \"Question\", \"name\": \"Do I need Tools for Native Modules?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Only if an npm dependency has to compile a native addon and does not provide a compatible prebuilt binary. Start with the runtime and npm, then add the toolchain according to that dependency's build instructions if an install actually requires it.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install nodejs on windows server 2022 with the official LTS MSI, verify npm and PATH, and run a private test app on your server in about ten minutes.","protected":false},"author":1,"featured_media":838,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,11],"tags":[64,65,38,52],"class_list":["post-837","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-windows-server","tag-nodejs","tag-npm","tag-powershell","tag-windows-server-2022","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=837"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/837\/revisions"}],"predecessor-version":[{"id":3410,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/837\/revisions\/3410"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/838"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}