this post was submitted on 03 Dec 2024
38 points (97.5% liked)

Selfhosted

40487 readers
249 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm down to the last few hours of discounts here. I need to get my NAS and my server onto a UPS months ago. Both are already set to come back on when power restores. We rarely have power outages and have solar panels (no house battery though), so a full outage is even rarer.

I understand that a UPS can send a shutdown signal when power is lost. Is this a universal standard or format for this? If so, what keywords should i use when searching for compatible products? My father told me to look for one with Ethernet ports. I just want to make sure everything is compatible. I go out of town occasionally and as well as preventing data loss, I also need everything to go down and come back up automatically so I don't have to call a friend, neighbor, or my spouse to go mess with stuff for me.

UPS brands considered (alternatives welcome): APC, Cyberpower

Systems protected, Synology DS 220+ & BeeLink MiniPC running Debian 12.


Also, for anyone who has helped me out previously in my self-hosted journey, thank you! Things are going great and I have a few useful docker images running various services and have set up grub btrfs snapshots to easily fix my screwups. This community has been incredibly helpful.

all 20 comments
sorted by: hot top controversial new old
[–] kalleboo@lemmy.world 40 points 1 day ago* (last edited 1 day ago)

There isn't a standard that is broadly-adopted, but NUT (https://networkupstools.org/) has reverse-engineered drivers for nearly every UPS out there, usually each brand has their standard so as long as the brand is supported it will work. (NUT is also what TrueNAS, Synology, QNAP, etc use internally for their UPS support)

I've had good luck with using NUT with APC UPSes (both consumer models and buying used enterprise rack-mount models).

One cool thing you can do with NUT is share the UPS state over the network, so that multiple machines can respond to the power state instead of just the machine that is plugged in via USB directly.

[–] 4am@lemm.ee 26 points 1 day ago

NUT works with many UPS models and provides monitoring and control

https://networkupstools.org/

[–] ThorrJo@lemmy.sdf.org 7 points 1 day ago (1 children)

If for some reason you don't like the look of NUT, and you get an APC UPS (and maybe some others?), there is always apcupsd. It will run shell scripts upon certain events, etc. Old, simple, works.

[–] RubberElectrons@lemmy.world 1 points 22 hours ago* (last edited 22 hours ago)

I'm using apcupsd for my server, even wrote a little script to pull wattage off the apc and report it in byobu's status bar. Anytime I ssh into my server I can see current wattage (usually about 55W for 4 spinning rust drives, 2 SSDs plus the router).

[–] april@lemmy.world 4 points 1 day ago

I use a USB connection to my UPS for the shutdown signal not Ethernet

[–] adarza@lemmy.ca 6 points 1 day ago (1 children)

cyberpower ups has their own utility on their website called powerpanel. versions exist for windows, linux and macos.

apcupsd for apc units is found in many distributions, including debian. for synology, this might lead you in the right direction: https://old.reddit.com/r/synology/comments/gtkjam/use_synology_nas_as_ups_server_to_safely_power/

[–] Artyom@lemm.ee 2 points 1 day ago (1 children)

The Linux one only works on some architectures. Notably, you can't run it on a raspberry pi.

You can run it on a Pi via Box64. Source: I did it.

[–] Iheartcheese@lemmy.world 4 points 1 day ago
[–] jeena@piefed.jeena.net 3 points 1 day ago (1 children)

I just bought a random UPS at MediaMarkt back in the day in Poland and calculated that it would be able to power all the CCTV cams, the CCTV recorder, a raspberry pi and the modem which is connected to a long range WiFi antenna for at least half an hour. This worked very well for a couple of years until the battery gave up. The one I had had a ethernet port but I never bothered to set it up to send the signal.

Mine was running at my parents summer house in Poland while my parents live in Germany and I in Sweden and now in Korea, so if something breaks down it's down for up to a year until someone goes there to fix it.

Right now everything is down, my dad was there a couple of month ago and said that a marten chew up the Ethernet cables. Sadly my dad couldn't fix it so now I hope I will be able to get there during Christmas.

[–] catloaf@lemm.ee 3 points 1 day ago

Yup, batteries need to be replaced every 3-5 years. Make sure you account for that cost when purchasing.

[–] waspentalive@lemmy.one 2 points 1 day ago (4 children)

In an area power outage, if one keeps the router alive via UPS does the router have anything to talk to? In my case I am "Fiber to the node", there is a box on the sidewalk at the other end of the block that receives the fiber, then copper to my house.

Not really, under an area blackout the fiberoptic transmitters will stop working, so you won't be able to reach other areas/nodes even if your equipment has UPS power.

But, in general, the idea of a UPS is to provide enough supply to allow for an orderly shutdown, preventing equipment damage or data loss. Its not meant for long term operations.

For infrastructure and other critical applications, the UPS is designed to give you enough time to go start the diesel generator, and continue the operations.

As a bonus, some UPS have filters to ensure that delicate electronics get a nice, clean power wave. This is usually the case in UPS for data centres.

Btw, how are you liking down under's "revolutionary" idea of Fibre + Copper? Is it as bad as it sounds?

[–] ThorrJo@lemmy.sdf.org 2 points 1 day ago

I've lived in areas where Comcast stayed up during long outages and areas where it didn't. Not sure about FTTN, but I don't think consumer broadband services are required to stay up during an outage like copper phone service is.

[–] BennyInc@feddit.org 1 points 1 day ago

For me it does work that way. We have fiber as well. There’s a big box for our block, which connects all homes to individual fiber lines. The next active part is apparently some kilometers away, so even a larger outage for our area might leave my internet up and running. Had it happen twice this year, and still could use the internet fine.

When my internet goes down, my devices can still talk to each other. So while I can't use the internet, I can still stream my shows and access my files and whatnot.

That's not what a UPS is for though. If everything between you and the ISP had a UPS (including all the infra under the roads and whatnot), you could probably keep the internet going in a power outage. But that's incredibly unlikely.

[–] Static_Rocket@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

Eaton is your best bet for compatibility in the consumer market.

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

[–] etchinghillside@reddthat.com 1 points 1 day ago

Was very confused why this was being asked. Was not aware there was a mechanism to send a shutdown signal. Thanks.

[–] SnotFlickerman@lemmy.blahaj.zone 1 points 1 day ago* (last edited 1 day ago)

I've been able to control a consumer-grade CyberPower UPS for just my modem/router via a Raspberry Pi using Box64 to emulate the linux command line software for communicating with the UPS. I've never had any issues, and it had pretty okay documentation. You just connect it to a host PC via USB.

https://www.cyberpowersystems.com/product/ups/standby/st625u/

This is the one, nothing special.

As you can see though, source, rpm, and deb versions are available. If a low-power consumer grade one like this has Linux support, I'd daresay most of them do. Like I said, I never had trouble.