Skip to content

Node.js Hosting on Windows Server

decerto edited this page Aug 11, 2026 · 1 revision

Node.js hosting on Windows Server

Yes, you can host a Node.js application on Windows Server, and it is not a hack. You do not need IIS, iisnode or a web.config. You need two things Windows does not arrange for you: something to keep the app running, and something to answer the internet on its behalf.

This page is the decision-level answer. The step-by-step walkthrough lives in the repository.


Why the internet says otherwise

Three answers dominate the search results, and all three are out of date:

  1. "You can't — Node is a Linux thing." Node has shipped official Windows builds since 2011. node.exe is an ordinary Windows program.
  2. "Use iisnode." It has not had a release in nine years and still lists Windows Server 2012 as a prerequisite. See iisnode alternatives.
  3. "Just rent a Linux box." Fine advice if you have no reason to be on Windows. Most people asking do — an existing .NET estate, Active Directory, a client's policy, or the server they already pay for.

What is genuinely missing on Windows is the furniture around the runtime, not the runtime. Linux tutorials all assume systemd and nginx. Nobody wrote the Windows chapter.

Linux Windows
systemd unit Windows Service, via WinSW or NSSM
nginx / Caddy Caddy — the same binary, native on Windows
Certbot Caddy again; it issues and renews on its own
ufw Windows Defender Firewall
cPanel / Plesk / aaPanel WinPanel, or Plesk for Windows

The architecture that works

Visitor → :443 Caddy (HTTPS, domains, WebSockets)
            ├── 127.0.0.1:3001  your Node app      (Windows Service)
            ├── 127.0.0.1:3002  another Node app   (Windows Service)
            └── C:\Sites\brochure\public           (static files)

Each app binds to loopback only, so it cannot be reached except through the proxy. Caddy owns 80 and 443, terminates TLS, and routes on the Host header. Every app is a service, so it starts at boot, restarts on failure, and runs with nobody signed in.

This scales to as many sites as the machine has memory for, and it is exactly what a Linux host does.


The four options, ranked

Option Verdict
Windows Service + reverse proxy Recommended. Framework-agnostic, WebSockets work, no IIS involvement.
IIS + HttpPlatformHandler or ARR Works. Sensible only if IIS is already hosting your .NET apps. Means hand-written web.config and application-pool behaviour designed for ASP.NET.
iisnode Unmaintained. Do not start here.
pm2 alone Does not survive a reboot without a service wrapper, and still needs a proxy in front.

What this costs you in effort

Doing it by hand, per site: allocate a port, write a service definition, install and start the service, add a block to the Caddy config, reload it, open the firewall, create the DNS records, and remember all of it next time. Twenty to thirty minutes, and it must be repeated identically for every site and every developer.

That repetition is what a control panel removes. WinPanel allocates the port, registers and supervises the service, writes and reloads the Caddy config, obtains the certificate, publishes the DNS records, and deploys from Git with a rollback if the new build will not start.


Next

Clone this wiki locally