But nginx doesn't include any built-in scheduling to make it start automatically at boot on Windows.
Someone has to log in to start the program and that can be a problem after an unexpected reboot.
AlwaysUp fixes that issue and more — constantly monitoring nginx to ensure that it's always available for you.
Let's show you how, step-by-step.
-
Download the nginx zip file and extract it to a new directory, if necessary.
For this tutorial, we installed nginx in C:\nginx and the following instructions are based on that location:
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Advisor to launch the Application Advisor:
-
Click Next to move past the welcome screen:
-
Choose nginx from the list of applications and click Next:
-
The Advisor will take a few seconds to examine your computer and gather information about your nginx installation.
After that, it will prompt you to enter the full path to the nginx executable, nginx.exe.
We entered the location where we installed the web server, "C:\nginx\nginx.exe":
Click Next to move on.
-
Here, the Advisor needs to know where your nginx configuration files are located. Please enter the folder and click Next to move on.
-
On this screen, enter the password of your Windows account. Your application will run in this context since nginx is set up correctly there:
Click Next to move on.
-
As the screen says, the Advisor has composed the best settings to run your nginx web server as a Windows Service.
Click Next to open the Add Application window with all the details.
-
At this point, the Add Application window contains all the recommended settings for running your JAR 24x7 after your PC boots.
You can cycle through the tabs and review the options that have been chosen.
And on the General tab, feel free to change the name to something you prefer.
When you're ready, click Save to record your new nginx service:
-
In a couple of seconds, an application called nginx will show up in the AlwaysUp window.
While nginx is now installed as a native Windows Service, it's not yet running and the state will be "Stopped":
-
To start nginx, choose Application > Start "nginx".
The entry's state will transition to "Running" and nginx will start serving your pages in the background (in the
isolated Session 0):
Everything worked well on our server when we opened the nginx URL:
-
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 helpful in your specific situation.
For example, you can: