Run Nginx as a Windows Service with AlwaysUp

How to Run Nginx as a Windows Service with AlwaysUp

Ensure that Nginx starts immediately when your PC boots and runs with High Priority for Maximum Performance

Nginx is an free, open-source HTTP server characterized by its small footprint, exceptional performance and efficient use of resources. It hosts over 7% of all domains worldwide!

To configure Nginx with AlwaysUp 6.0 and later:

  1. Download and install AlwaysUp, if necessary.

  2. Download the Nginx zip file and extract it to a new directory, if necessary. We have used C:\nginx and the following instructions are based on that setting.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the Nginx executable. Since we placed Nginx in C:\nginx, we have specified:


    • In the Arguments field, enter:

      -p C:\nginx

      This tells Nginx where to find the HTML files, etc. Please consult the Nginx command line specification if you have a non-standard installation and need to tweak the startup for your environment.

    • In the Name field, enter the name that you will call the application in AlwaysUp. We have used Nginx but you can specify virtually anything you like.

    • Since Nginx is all about performance, we suggest that you boost its priority to ensure that Windows will grant it the maximum amount of resources on the host PC. We recommend High (for time critical applications). Note that you can always make this change later once you are satisfied with your setup.

    Nginx Windows Service: General Tab

  6. Click over to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that Nginx needs the TCP/IP networking stack to operate.

    Nginx Windows Service: Startup Tab

  7. Move to the Extras tab and check the Use this special command to stop the application box. Specify the full path to the Nginx executable along with a few arguments:

    C:\nginx\nginx.exe -p c:\nginx -s stop
    The -s stop parameter will do the magic of telling Nginx to stop gracefully when requested, terminating all sub-processes as necessary. See the Nginx.exe command line reference for details.

    Nginx Windows Service: Extras Tab

  8. Click the Save >> button. In a couple of seconds, an application called Nginx will show up in the AlwaysUp window. It is not yet running though.

    Nginx Windows Service: Created

  9. To start Nginx, choose Application > Start "Nginx".

    Nginx Windows Service: Running

  10. That's it! Next time your computer boots, Nginx will start up immediately, before anyone logs on. We encourage you to edit Nginx in AlwaysUp and check out the many other settings that may be appropriate for your environment.

Nginx not working properly as a Windows Service?

  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and Nginx. The AlwaysUp Event Log Messages page explains the more obscure messages.
  • Check the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 9.7 New!

4.6 MB Installer
  • Unrestricted 30-day trial for new users; upgrade for existing users
  • Windows 10/8.1/8/7/XP & Windows Server 2012 R2/2008/2003
  • How to Install | EULA
Our customers include...

Compatible with Windows 10 (32 & 64-bit)

Windows Server 2012 Certified (32 & 64-bit)

Windows 8 Compatible (32 & 64-bit)

Compatible with Windows 7 (32 & 64-bit)

Works with Windows Server 2008 R2 (32 & 64-bit)

Over 68,000 installations, and counting!
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 10+ years!