UPS for Linux Server

Running Debian Linux on my server, which consumes ~45W typically, peak is 125W during HDD spinup. It’s the only device I need on the battery, the rest will be on surge protection only. USB connection to UPS seems simplest. I want the behaviour in the event of a power failure or brownout to be as follows:
-runs a bash script (to email me saying there’s a problem)
-Waits for a few minutes in case power comes back
-powers off server
-cuts battery power

The recovery mode would likely be my RPi (powered with normal AC power) hitting the power button for the server when I tell it to, manually. I think it’s fair to assume once the RPi has power that it’s safe to fire up the server, right? I’ve worked in a local repair shop for 4 years and lived here ~15 years and we generally don’t have sustained power issues that kill electronics, it’s usually an instantaneous surge and/or a sustained outage, something a plain standby UPS should be fine for.

What UPS should I buy for Debian Linux compatibility, and to do the things described? apcupsd seems to have all that covered, but I’d like to hear from people who run consumer-ish UPS’.

look at eaton UPS and nutmon

http://networkupstools.org/stable-hcl.html

I've had good luck with the CyberPower consumer UPSes, using their included PowerPanel Business Edition software. The business edition isnt technically supported on their consumer UPSes, but it works fine aside from not showing a graphic outlet diagram...

It has all the features you want accessible from a web UI.

I've been using a PowerWalker Pure Sine Wave UPS and has a USB port that the PC can interface with and it's a java app able to send all kind of informations and shut down the machine if necessary. But I don't know if the same thing can work on Linux. Other than that the UPS is really really good and, even if it's a 1000VA has a really good power conversion that gives it 750W of output.

Any APC SmartUPS (even a 10 year old one) can do exactly what you want with apcupsd.

Apcupsd warns you and shuts down the system when the battery gets low. It can also instruct the UPS to do a full power down just before the system shuts down (with a grace period to allow for a clean shutdown).

You can set the UPS to come back online after the power has been restored (with or without a startup delay), or you can have it stay powered down.

The Raspberry Pi hack is not required to bring the server back up... Just set the "restore on AC power loss" option in the bios of your server and it'll start automatically when power is applied.

I'm using a 10 yr old SmartUPS 750 for my unRAID box, you can get these older units for next to nothing. Just install a new battery pack from a generic brand (APC's own packs are overpriced) and you should be good to go for a while.

1 Like