Skip to content
Runbook

Install Nginx on Windows

High-performance web server, reverse proxy, load balancer and HTTP cache.

Toolweb-serverreverse-proxyload-balancerhttpproxy

Installation

Chocolatey · Chocolatey
choco install nginx

Alternatively, download the official ZIP from nginx.org and unzip it.

Verify the installation

Verify
nginx -v

Important files

TypePathDescription
configC:\tools\nginx\conf\nginx.confMain configuration file (Chocolatey installs under C:\tools\nginx).
dataC:\tools\nginx\htmlDefault document root.
logC:\tools\nginx\logsAccess and error logs.

Default ports

80

Command-line tools

  • nginxRun start nginx to launch; nginx -s stop to stop; nginx -s reload to reload.

Uninstall

Uninstall
nginx -s stop
choco uninstall nginx

Good to know

  • On Windows, Nginx does not register a systemd-style service: start it with start nginx and stop it with nginx -s stop from the install directory.
  • To run it as a true Windows service, use a wrapper such as NSSM or WinSW.
  • The official ZIP from nginx.org unzips to a folder you run from directly; Chocolatey places it under C:\tools\nginx.

Installation on Windows

choco install nginx (Chocolatey) installs Nginx under C:\tools\nginx. Alternatively, download the official ZIP from nginx.org and unzip it anywhere. Verify with nginx -v.

Starting and stopping

Windows Nginx is not a system service. From the install directory, launch it with start nginx, reload the config with nginx -s reload, and stop it with nginx -s stop. To run it as a real Windows service, wrap it with NSSM or WinSW.

Configuration and logs

The configuration is C:\tools\nginx\conf\nginx.conf, the document root C:\tools\nginx\html, and logs are under C:\tools\nginx\logs. Validate changes with nginx -t before reloading.