By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
softandgadget.comsoftandgadget.comsoftandgadget.com
  • Hardware & PC
    • Processors (CPU)
    • Graphics Cards (GPU)
    • Storage & RAM
  • Software & OS
    • Operating Systems
    • Microsoft Office
    • Useful Utilities
  • Gadgets & AI
    • AI & Neural Networks
    • Smart Home
  • Troubleshooting
    • Network & Remote Access
    • Updates & Patches
    • Windows Errors & BSOD
Reading: Configuring Network UPS Tools (NUT) on Linux and Proxmox: Graceful Shutdowns, USB HID Quirks, and Pure Sine-Wave Sizing
Share
Notification
Font ResizerAa
softandgadget.comsoftandgadget.com
Font ResizerAa
  • Hardware & PC
  • Software & OS
  • Gadgets & AI
  • Troubleshooting
Search...
  • Hardware & PC
    • Processors (CPU)
    • Graphics Cards (GPU)
    • Storage & RAM
  • Software & OS
    • Operating Systems
    • Microsoft Office
    • Useful Utilities
  • Gadgets & AI
    • AI & Neural Networks
    • Smart Home
  • Troubleshooting
    • Network & Remote Access
    • Updates & Patches
    • Windows Errors & BSOD
Useful UtilitiesSoftware & OS

Configuring Network UPS Tools (NUT) on Linux and Proxmox: Graceful Shutdowns, USB HID Quirks, and Pure Sine-Wave Sizing

Last updated: 26.11.2026 17:14
Evgeny Bely
ByEvgeny Bely
Founder of SoftAndGadget.com | Lead Systems Engineer & Tech Analyst
Founder & Editor-in-Chief of SoftAndGadget.com   Systems Architect and IT Specialist with 15+ years of experience in Windows environments, PC hardware, troubleshooting and performance optimization since...
Follow:
- Founder of SoftAndGadget.com | Lead Systems Engineer & Tech Analyst
Share
Network UPS Tools telemetry monitoring and pure sine-wave UPS power protection architecture for Linux and Proxmox servers
SHARE

Deploying Network UPS Tools (NUT) on Linux and Proxmox VE hosts prevents abrupt power-loss corruption across ZFS storage pools, virtual machine disk images, and database journals. While an uninterruptible power supply absorbs brief brownouts, an uncoordinated battery depletion still causes an unsafe hard reset unless the hypervisor receives real-time telemetry and initiates an ordered shutdown sequence before inverter cutoff.

Table of Contents
  • Architecting Network UPS Tools (NUT) Daemon Modes on Proxmox VE
  • Step-by-Step NUT Server and Monitor Configuration on Linux and Proxmox
    • 1. Defining Operating Mode and Driver Polling
    • 2. Configuring Daemon Listeners, Credentials, and Shutdown Triggers
  • Resolving Persistent USB HID Driver Disconnects and Kernel Autosuspend
  • Pure Sine-Wave UPS Sizing and Power Topology Selection
    • Calculating Safe VA/Wattage Headroom and Runtime
  • Frequently Asked Questions
    • Why does NUT report “Data stale” intermittently with CyberPower and APC USB UPS units?
    • Does Proxmox VE shut down VMs gracefully when NUT executes /sbin/shutdown -h +0?
    • Can one USB-connected UPS shut down multiple Linux and Proxmox servers simultaneously?

In enterprise homelabs and small server closets, USB-connected line-interactive UPS units frequently suffer from kernel HID polling disconnects, stale battery runtime estimates, and mismatched shutdown timers between the host hypervisor and guest VMs. This guide details the complete deployment of NUT server and client daemons on Debian-based Linux and Proxmox VE, resolves persistent usbhid-ups driver drops via udev and polling adjustments, and establishes an electrical load-sizing framework for pure sine-wave hardware.

Architecting Network UPS Tools (NUT) Daemon Modes on Proxmox VE

NUT separates hardware communication from shutdown orchestration through three modular processes: the hardware driver (such as usbhid-ups), the data server (upsd), and the monitoring client (upsmon). Selecting the correct operating mode in /etc/nut/nut.conf determines whether a node manages a local serial/USB connection directly or listens over TCP port 3493 for power state transitions from a primary controller.

NUT Mode (MODE=) Active Daemons Network Exposure Recommended Infrastructure Role
standalone Driver, upsd, upsmon (primary) Loopback only (127.0.0.1:3493) Single Proxmox VE host or standalone Linux server with dedicated USB UPS
netserver Driver, upsd, upsmon (primary) LAN interface + Loopback (0.0.0.0:3493) Primary host sharing one high-capacity UPS across multiple hypervisors or NAS nodes
netclient upsmon (secondary) only Outbound TCP client to netserver Secondary Proxmox nodes, TrueNAS boxes, or bare-metal Linux hosts on the same UPS
none None (services disabled) None Default unconfigured package state prior to daemon initialization

For single-node Proxmox hypervisors, standalone minimizes the attack surface by binding upsd strictly to localhost. When a single UPS protects both a Proxmox host and a dedicated storage appliance, configure the Proxmox node as netserver so it orchestrates guest shutdowns last while secondary storage nodes in netclient mode flush caches and power down first.

Step-by-Step NUT Server and Monitor Configuration on Linux and Proxmox

Proxmox VE runs on a standard Debian userland, allowing direct installation of the upstream NUT packages from the default repositories. Install the meta-package and USB utility tools to inspect vendor and product descriptors before writing daemon configurations, following the official Network UPS Tools User Manual for driver compatibility matrices.

apt update && apt install -y nut nut-client nut-server usbutils
lsusb | grep -iE "cyber|apc|eaton|tripp|liebert"

Record the 4-digit hexadecimal idVendor and idProduct values returned by lsusb (for example, 0764:0501 for CyberPower HID devices or 051d:0002 for APC Back-UPS/Smart-UPS units). Next, define the operating mode and hardware driver parameters across the core configuration files under /etc/nut/.

1. Defining Operating Mode and Driver Polling

Set the daemon mode in /etc/nut/nut.conf and configure the UPS hardware profile in /etc/nut/ups.conf. Increasing pollinterval from the default 2 seconds to 15 seconds prevents low-speed USB 1.1 HID controllers inside consumer and prosumer UPS units from saturating their internal microcontrollers and dropping off the bus.

# /etc/nut/nut.conf
MODE=standalone

# /etc/nut/ups.conf
maxretry = 3
pollinterval = 15

[ups01]
    driver = usbhid-ups
    port = auto
    vendorid = 0764
    productid = 0501
    desc = "Proxmox Primary Pure Sine-Wave UPS"
    override.battery.charge.low = 25
    override.battery.runtime.low = 300

Setting override.battery.charge.low = 25 and override.battery.runtime.low = 300 forces NUT to assert the critical LB (Low Battery) flag when remaining capacity hits 25% or runtime drops below 5 minutes, rather than relying on optimistic factory firmware thresholds that often trigger at 10% when lithium or lead-acid voltage sag accelerates.

2. Configuring Daemon Listeners, Credentials, and Shutdown Triggers

Configure /etc/nut/upsd.conf to bind the telemetry daemon, establish authenticated roles in /etc/nut/upsd.users, and define the monitor actions in /etc/nut/upsmon.conf. On Proxmox VE, invoking /sbin/shutdown -h +0 triggers pve-guests.service, which automatically issues ACPI graceful shutdown commands to all running QEMU virtual machines and LXC containers before unmounting ZFS datasets.

# /etc/nut/upsd.conf
LISTEN 127.0.0.1 3493
# Uncomment below if using MODE=netserver for secondary nodes
# LISTEN 10.10.20.10 3493

# /etc/nut/upsd.users
[upsadmin]
    password = ChangeThisStrongAdminPass99
    actions = SET
    instcmds = ALL

[monprimary]
    password = ChangeThisMonitorPass88
    upsmon primary

# /etc/nut/upsmon.conf
MONITOR ups01@localhost 1 monprimary ChangeThisMonitorPass88 primary
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 25
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

Restrict file permissions on the configuration directory so non-privileged local accounts cannot read daemon passwords, then start the driver controller and systemd services:

chown root:nut /etc/nut/*.conf /etc/nut/upsd.users
chmod 640 /etc/nut/*.conf /etc/nut/upsd.users
upsdrvctl start
systemctl enable --now nut-driver.target nut-server nut-monitor
upsc ups01@localhost

Verify that upsc ups01@localhost returns active telemetry fields including ups.status: OL (On Line), battery.charge, battery.runtime, and ups.load. If ups.status reports OB DISCHRG during a simulated wall-plug pull test and cleanly transitions to FSD (Forced Shutdown) at your configured threshold, the software pipeline is operational.

Resolving Persistent USB HID Driver Disconnects and Kernel Autosuspend

A common failure mode in Linux UPS deployments appears in journalctl -u nut-driver@ups01 as libusb1: Could not open any HID devices: insufficient permissions on everything or recurring Data stale alerts every few hours. This occurs when the Linux kernel USB autosuspend subsystem puts the UPS HID interface into a low-power sleep state, causing the UPS microcontroller to reset its USB endpoint and receive a new device bus address without reapplying nut group ownership.

Eliminate USB endpoint drops by creating a dedicated udev rule that disables kernel power-management autosuspend for your specific UPS vendor ID and enforces persistent nut group permissions across hotplug re-enumerations, matching the Linux Kernel USB Power Management specification.

# /etc/udev/rules.d/99-nut-ups.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="0664", GROUP="nut", TEST=="power/control", ATTR{power/control}="on"

Reload the udev subsystem rules and re-trigger the USB bus without rebooting the hypervisor:

udevadm control --reload-rules
udevadm trigger --subsystem-match=usb
systemctl restart nut-driver.target nut-server nut-monitor

Production Verification Note: Never rely solely on a synthetic low-battery flag test without validating guest VM timeout limits. In Proxmox VE, navigate to Datacenter → Options → Start/Shutdown Order and ensure heavy database VMs have explicit shutdown timeouts under 120 seconds so pve-guests.service does not stall past the remaining battery reserve.

Pure Sine-Wave UPS Sizing and Power Topology Selection

Software orchestration fails immediately if the underlying UPS inverter shuts down under transient load spikes or triggers Active Power Factor Correction (APFC) protection faults inside modern server power supplies. Most 80 PLUS Gold and Platinum ATX/EPS power supplies expect a clean sinusoidal AC waveform; stepped-approximation (simulated sine-wave) inverters introduce harmonic distortion during transfer events that can cause APFC circuits to momentarily drop voltage and reboot the host.

Electrical Parameter Simulated Sine-Wave UPS Pure Sine-Wave Line-Interactive UPS Impact on Linux / Proxmox Hardware
Output Waveform Stepped square-wave approximation True sinusoidal AC (< 3% THD) Prevents APFC PSU shutdowns during 4–8 ms transfer to battery
Power Factor Rating Typically 0.50 – 0.60 (e.g., 1000VA = 600W) Typically 0.65 – 0.90 (e.g., 1500VA = 900W–1000W) Higher real wattage headroom for disk spin-up and CPU turbo spikes
Voltage Regulation (AVR) Basic single-stage buck/boost Multi-stage Automatic Voltage Regulation Corrects brownouts without draining battery cycles
USB HID Telemetry Basic status flags (OL/OB/LB) Full load %, input/output voltage, runtime Accurate battery.runtime calculation for NUT shutdown thresholds

Calculating Safe VA/Wattage Headroom and Runtime

Size your UPS unit based on peak continuous wattage rather than idle consumption, keeping steady-state load between 30% and 50% of the inverter’s real watt rating to preserve battery longevity and guarantee a 10–15 minute shutdown window:

  • Measure Peak Draw Under Load: Stress-test the host CPU and disk array simultaneously (for example, during a ZFS scrub across multi-drive pools, as detailed in our Storage & RAM infrastructure guides) and record wall wattage.
  • Apply the 2.0x Safety Multiplier: A hypervisor drawing 180W under full ZFS scrub and VM boot load requires at least a 360W–450W real output capacity, making a 1000VA/600W or CyberPower CP1500PFCLCD (1500VA/1000W) pure sine-wave line-interactive unit the practical baseline for multi-node homelabs and SMB racks.
  • Prioritize Replaceable VRLA or LiFePO4 Batteries: Ensure the chassis supports user-replaceable sealed lead-acid cartridges or lithium iron phosphate packs with standard USB-B HID interfaces natively supported by the usbhid-ups driver without proprietary serial adapters.

For further Linux administrative tools, automation scripts, and system monitoring utilities, explore our Software Utilities documentation hub.

Frequently Asked Questions

Why does NUT report “Data stale” intermittently with CyberPower and APC USB UPS units?

The Data stale warning occurs when upsd fails to receive a status update from usbhid-ups within the MAXAGE window (default 15 seconds). This is caused either by the UPS USB controller dropping packets under the aggressive default 2-second poll rate or by Linux kernel USB autosuspend disconnecting the HID endpoint. Setting pollinterval = 15 in /etc/nut/ups.conf and disabling autosuspend via a udev rule resolves both root causes.

Does Proxmox VE shut down VMs gracefully when NUT executes /sbin/shutdown -h +0?

Yes. When systemd executes /sbin/shutdown -h +0 on Proxmox VE, it stops pve-guests.service before unmounting storage or halting the kernel. Proxmox sends an ACPI power-down signal to every running QEMU virtual machine (utilizing QEMU Guest Agent if installed) and stops LXC containers in reverse startup order before cleanly exporting ZFS pools.

Can one USB-connected UPS shut down multiple Linux and Proxmox servers simultaneously?

Yes. Configure the host physically connected to the UPS via USB with MODE=netserver in /etc/nut/nut.conf and bind LISTEN in /etc/nut/upsd.conf to your management LAN IP. On all secondary servers, install nut-client, set MODE=netclient, and point MONITOR ups01@<primary-ip> 1 monuser password secondary in /etc/nut/upsmon.conf so secondary hosts power down first when low battery is asserted.

Recommended Infrastructure

For homelabs, remote testing, and staging environments, we run NVMe VDS instances on Erahost. Fast provisioning, European routing, and predictable I/O.

View NVMe Plans →
TAGGED:Linux ServerNetwork UPS ToolsProxmox VESystem AdministrationUPS SizingZFS Storage
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Reddit Telegram Copy Link Print
Share
ByEvgeny Bely
Founder of SoftAndGadget.com | Lead Systems Engineer & Tech Analyst
Follow:
Founder & Editor-in-Chief of SoftAndGadget.com   Systems Architect and IT Specialist with 15+ years of experience in Windows environments, PC hardware, troubleshooting and performance optimization since 2007.
Previous Article Diagnosing 2.5GbE and 10GbE NIC packet drops on multi-port PCIe Ethernet controller Fix 2.5GbE and 10GbE NIC Packet Drops: Tuning RSS Queues and Ring Buffers
Next Article KV Cache Quantization FP8 and Q8_0 GPU VRAM memory allocation architecture KV Cache Quantization (FP8 and Q8_0) in Local LLM Inference: VRAM Math, Context Limits, and Perplexity Trade-Offs
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest News

KV Cache Quantization FP8 and Q8_0 GPU VRAM memory allocation architecture
KV Cache Quantization (FP8 and Q8_0) in Local LLM Inference: VRAM Math, Context Limits, and Perplexity Trade-Offs
AI & Neural Networks Gadgets & AI
Diagnosing 2.5GbE and 10GbE NIC packet drops on multi-port PCIe Ethernet controller
Fix 2.5GbE and 10GbE NIC Packet Drops: Tuning RSS Queues and Ring Buffers
Network & Remote Access Troubleshooting
Diagnosing SQL OLE DB connection leaks on Windows Server enterprise database hardware
Windows Server & SQL OLE DB Connection Leaks After November 2026 Updates: Diagnosing Pooled Session Exhaustion
Operating Systems Software & OS
Linux Kernel NoisyTCP CVE-2026-99288 multi-queue network RX race architecture on dark server hardware
Mitigating Linux Kernel NoisyTCP (CVE-2026-99288): Auditing Multi-Queue RX Races and SYN-Cookie Exposure in Production
Network & Remote Access Troubleshooting

You Might Also Like

Windows 11 requirements bypass blocked in 26H2 setup
Operating SystemsSoftware & OS

Windows 11 Requirements Bypass Blocked in 26H2

Evgeny Bely
Firefox 157: enabling Compact Mode and hardware AV1 decoding
Software & OS

Firefox 157: Return of Compact Mode, Hardware AV1, and New Design Without Performance Loss

Evgeny Bely
RustDesk 1.5.0 open source remote desktop interface
Software & OSUseful Utilities

RustDesk 1.5.0: Free Open-Source Replacement for TeamViewer and AnyDesk

Evgeny Bely
© 2026 SoftAndGadget. All Rights Reserved. [email protected]
As an Amazon Associate I earn from qualifying purchases.
  • Contact
  • Site Map
  • Privacy Policy
  • Disclaimer
  • Advertise
  • About Us
Иконка сайта SoftAndGadget — фиолетовый неоновый хайтек-логотип SG
Welcome!

Login to SoftAndGadget

Username or Email Address
Password

Lost your password?