WinNUT is a Windows client for Network UPS Tools (NUT) that allows your computer to monitor an uninterruptible power supply (UPS) connected to a remote server. When a power outage occurs, WinNUT communicates with the NUT server and automatically triggers a safe, graceful shutdown of your Windows machine before the battery drains.
Here is a step-by-step guide to setting up automated safe shutdowns for Windows using WinNUT. 1. Prerequisites and Information Gathering
Before configuring the Windows client, you need a functional NUT server (often running on a Linux machine, NAS device, or Raspberry Pi) that is physically connected to your UPS. Gather the following details from your NUT server configuration:
NUT Server IP Address: The local IP address of the machine hosting the NUT server.
UPS Name: The unique identifier assigned to your UPS in ups.conf.
NUT User Credentials: The username and password configured in upsd.users with monitoring privileges (usually a “monuser”). 2. Download and Install WinNUT
Download the latest release of WinNUT-Client from its official GitHub repository. Run the installer executable on your Windows machine.
Follow the onscreen wizard prompts to complete the installation.
Launch the application. You will see the main interface, which will initially show a disconnected status. 3. Configure the Server Connection Click on Settings or Configuration in the WinNUT menu. In the Connection tab, input your NUT server details: Host: Enter the IP address of your NUT server.
Port: The default port is 3493 (change this only if your server uses a custom port). UPS Name: Type the exact name of your UPS.
In the Authentication section, enter the username and password defined on your NUT server. Click Apply or Save.
Return to the main window and click Connect. If successful, the status bar will change to “OL” (On Line) or “Online,” displaying your current battery percentage and voltage. 4. Set Up the Automatic Shutdown Trigger
To ensure your PC shuts down safely when the power goes out, you must configure the shutdown behavior.
Reopen the Settings menu and navigate to the Shutdown or Behavior tab.
Choose the Trigger: Select when Windows should initiate the shutdown. Common options include: On Battery (OB): Triggers as soon as the main power fails.
Low Battery (LB): Triggers only when the UPS battery drops below a critical threshold.
Timed Delay: Triggers after the UPS has been running on battery for a specific number of seconds (e.g., 300 seconds for 5 minutes).
Configure the Shutdown Command: WinNUT provides a default Windows shutdown command. Ensure it is set to gracefully close applications, such as:shutdown.exe /s /t 60 /c “WinNUT initiated automatic shutdown due to power failure.”(Note: /s triggers a shutdown, and /t 60 gives you a 60-second warning countdown to save work.) 5. Enable WinNUT to Run as a System Service
For automated shutdowns to work reliably, WinNUT must run even if no user is logged into the Windows machine. In the WinNUT settings, look for the Service tab or option.
Click Install Service to register WinNUT as a native Windows Service. Change the startup type to Automatic.
Click Start Service to run it immediately in the background. 6. Test Your Configuration
It is vital to test your setup to ensure your computer actually shuts down during a real emergency.
Save all open work and close unnecessary applications on your Windows PC.
Unplug your UPS from the wall outlet to simulate a power outage.
Watch the WinNUT interface or logs. It should register the status change to “On Battery.”
Wait for your configured time delay or low-battery threshold to hit. Verify that the Windows shutdown countdown timer appears and successfully turns off your PC. Plug the UPS back into the wall and restart your computer. To tailor this guide further, let me know:
Leave a Reply