A UPS is not an unlimited alternate power source. In a homelab, its most useful job is to turn an abrupt outage into a controlled sequence: detect failure, preserve data, stop workloads, shut down hosts, and remain off until power is stable.
That sequence needs decisions before the battery alarm starts.
Inventory the power path #
List every device on battery power and why it is there. The Proxmox host and storage may be obvious. The router, switch, and backup server matter because shutdown commands and storage traffic still need a network. A monitor or audio amplifier may consume precious runtime without helping recovery.
Measure real load through the UPS rather than adding power-supply labels. Note runtime at idle and during backup or disk activity. Battery age and temperature change the result, so last year's estimate is not permanent capacity.
Choose triggers with margin #
Shutting down at five percent sounds efficient but leaves almost no room for an old battery, a slow guest, or a second outage during recovery. A time-based trigger—such as a few minutes on battery—can handle brief power flickers, while a conservative remaining-runtime or charge threshold protects the final shutdown.
Use two independent conditions if the UPS software supports them: begin the sequence after sustained battery operation, and force immediate progress when runtime becomes critically low. The thresholds should leave enough measured time for the slowest normal shutdown plus a safety margin.
Define the dependency order #
Stop application writes before storage. Shut down ordinary guests, then databases and shared services, then hypervisors. Keep DNS and networking alive until remote shutdown commands and status reporting finish. The backup server may need to complete or abort a task cleanly before its datastore disappears.
Not every workload deserves a graceful wait. A stuck test VM should not consume the last battery while important storage remains mounted. Define timeouts and an escalation policy, and understand which guests may eventually be forced off.
Decide who owns the signal #
One system should communicate with the UPS and distribute state to the others. Multiple machines independently deciding when to shut down can race or lose the USB connection after the first host powers off. Network UPS Tools and vendor software can both implement a primary-and-client model; use the one supported by the hardware and operating systems.
Protect that control channel. A false shutdown command is a denial of service, while a missed command risks filesystem and application damage. Restrict clients and credentials to the management network and monitor communication failures.
Plan the return of power #
Recovery can be more dangerous than shutdown when power flickers repeatedly. Configure the UPS and hosts to wait for stable utility power and sufficient battery charge before restarting. Decide whether hosts should power on automatically, and start guests in dependency order with delays.
Avoid an immediate “start everything” surge. Storage, network, DNS, and authentication should become healthy before dependent applications. Confirm that a host configured to start after AC recovery also remained off when the UPS was nearly empty.
Test without creating a surprise #
Schedule a controlled test during a maintenance window. Ensure backups are current, observe the system locally, disconnect utility input according to the UPS manufacturer's safe procedure, and time every stage. Do not pull random power cables from running storage to simulate realism.
Record when the alert arrived, when shutdown began, which machine was last, the remaining runtime, and how restart behaved. Repeat after changing batteries, adding hardware, or substantially changing guest shutdown times.
Share the result with anyone likely to respond to an outage. A procedure known only to the person who wrote it is another single point of failure.
The best UPS plan is intentionally uneventful. It spends battery on the actions needed for safe shutdown, preserves the network long enough to coordinate them, and leaves enough margin that five percent remains a warning—not the plan.