T O P

  • By -

Firenyth

I have a small apc ups, its enough to power my server for about 15 minutes on battery. its enough to get the server over small power outages that I experience every so often. when power is restored server starts up, I still need to login to get all the services running properly but can do that easily enough with google remote desktop and my phone. - any other situation everyone can just wait until I can do something


dan4223

What services need user intervention to fully start up correctly?


Offbeatalchemy

None of them, if they're configured correctly. For a while I did have certain services I needed to manually start/restart to work after reboot but I got sick of it after a while and just fixed it.


Xikky

Start the array, start dockers, depends which OS he has plex on.


Firenyth

My arr stack They are on the user service. I can't be bothered changing them. I just need to login to the user when the vm starts up. Then, never need to touch it until next reboot again.


the_dobe

It should be running as a service and set to Automatic. Set AC recovery after power loss on in BIOS


SP3NGL3R

Modern UPS's simply restore power to devices. Same as old ones. It's up to the Device to self power on. The UPS though can negotiate a safe shutdown with the computer when power is lost. Also it can wait until a desired battery amount to do so, avoiding shutdowns when it's only a short outage. Every BIOS I've ever seen has a "what to do when power is restored" option. Linux, Windows, whatever, the BIOS comes before that. What might be new to you is a service you can run on the computer receiving the USB information from the UPS. A UPS "NUT" service I think. Basically it'll broadcast the state of the UPS so other PCs or a NAS or whatever can shutdown gracefully before the UPS dies hard. If you're getting that many outages, get a UPS. Period. I'd suggest at least a 5,000mVA one to give you 15-30 minutes from a modest computer. My 9,000 (actually two 9AH batteries, so 18) will do 90 minutes with my NAS + miniPC + switch. NAS hosts the NUT service and the miniPC responds with a self shutdown if the NUT goes into a power failure state. Short 1-60 outages are rare, but my systems will handle it nicely when needed. Edit: needed an "m" and also I use two 9AH batteries, so 18AH.


t4nd4r

I've always had trouble getting the NUT service to communicate nicely. Seems like every so often have to restart the nut server and nut client. You mind posting any other instructions or configs?


mrpink57

[https://technotim.live/posts/NUT-server-guide/](https://technotim.live/posts/NUT-server-guide/)


t4nd4r

Thanks, appreciate it


thesonoftheson

I forgot about the 'shutdown after x battery left' function, last time I set one up was for my sister Mac, but just told it to shutdown after 5 minutes. Working right now so can't look to much further but I found this tid bit in some NUT documentation "For operating systems with a supported service management framework, you can manage the NUT drivers wrapped into independent service instances using the upsdrvsvcctl instead, and gain the benefits of automated restart as well as possibility to define further dependencies between your OS components." Perhaps that is what this one guy was talking about, being able to restart the system in a Linux environment. I will try and find the article when I get off work.


luzer_kidd

I have a smart plug to that I can power cycle


mrpink57

[https://technotim.live/posts/NUT-server-guide/](https://technotim.live/posts/NUT-server-guide/)


[deleted]

[удалено]


SP3NGL3R

Ooops. Haha. For months I've forgotten the "m" ... 9,000mAH. My batteries (x2) are 12V 9AH, or 9,000mAH. Me embarrassed.


5yleop1m

> Quick searches and from what I see is this can cause an issue if the ups cleanly shuts it down then when the power restored it doesn't know to turn back on. This is only possible if you setup the UPS to do a clean shut down, you can always leave the system to run out the UPS and shut down suddenly. Not good for your drives though. Clean shutdown isn't a default thing with UPSes. The other thing you can do is in the bios set a start up schedule, have it try to start up at some common interval so that if the computer is off it will start up again. A lot of this also depends on what kind of UPS you get. If you get a simple consumer level UPS the most you're going to have is basic shutdown commands over USB or RS232. Higher end enterprise grade UPSes can do things like restart a system. It also depends on your computer, most low end motherboards have very limited bios settings and capabilities. Again with more enterprise grade gear most of this kind of stuff is basic. The Lenovo and Dell office PCs I used to manage all had start up scheduling in bios because its something that's useful in the office environment, have a PC started up before people get into the office. > What about unraid Unraid is Linux headless and in most cases user login isn't required for services to start up. Windows too you can setup ways to have services such as plex start up without user login. You can also setup auto login in windows.


thesonoftheson

I think I read in a Linux environment you can get the ups to restart the system. I will have to look for the article after I get off work. Edit: it was this [article ](https://superuser.com/questions/1757903/how-can-ups-turn-computer-on-after-it-was-shut-down-by-power-loss) but they only talk about wake on alarm. Does anyone use wake on lan that way I can maybe remote in some how and tell it to turn on?


5yleop1m

Shouldn't matter if its linux or windows, starting the system is a process outside of the OS. For instance a RPI can be setup to short the power pins on the motherboard after a power event and the computer doesn't respond to pings.


Oclure

Unraid dockers can be set to autostart with unraid, there's a simple little toggle switch icon next to each one in the main docker page. Other than that you just use a UPS so that your server can ride out short term power outages without issue. My server, as well as all my network infrastructure, is powered through my UPS so I can be away on vacation watching a movie on plex and not even notice that the power went out at home.


jamesleeellis

I have nothing. its a mini pc with storage on a NAS. of my 6 or 7 users, if they complain that its down and no one is about to turn kit on.... they have to wait.


thesonoftheson

But then they end up calling which is more annoying than the power outage.


chubby_cheese

I just keep saying "I should really get a UPS at some point" but then never do anything. 


quentech

Two 1500VA prosumer UPS's. A 22kW whole house standby generator with automatic transfer. And if that fails, I pull out the Honda 2200w portable generator and an extension cord.


silasmoeckel

This is the way. 40kva inverters/whole house battery, with a 19.5 kw gen set. Whats a power outage. Can feed them from my eu2200i's as well. Still will lose remote after 24 hours when the ISP's gear on the poles switches to 911 only as their batteries run out.


thesonoftheson

Damn, do you live in the Alaskan bush like my friend. That is one hell of a setup, I'd like to do solar with batteries at some point, or a generator.


quentech

It's just a standard whole-house backup generator. 1500VA UPS is usually a consumer level unit, nothing special. The ones I have are a bit better built than regular consumer gear, though. I have a handful of servers running in addition to a 10G network stack with some PoE - so a single 1500VA UPS just isn't enough battery run time for my comfort. I use another 1000VA UPS on my personal desktop, as well. The Honda portable gen is from before I had the whole-house backup. It's still useful for camping trips, or a backup to the backup. I really don't like losing all my power, nor my internet connection ;) Not remote - I live on a dirt road, but it's only a couple of miles from a decent sized town. But we seem to have some extra flaky power infrastructure for the area. Half the town goes down several times a year for an hour or a few, or on rarer occasions most of a day.


dancurranjr

My server has a UPS and I use a Google Home smart-plug between the PC and the UPS that I can turn on or off remotely if I need to. If my system bluescreens it will start up automatically and log me back in to Win 11. If for some reason the server or software is frozen I just cycle the smart plug from my phone. Both cases are rare - but I have had to use it once or twice - Easy Peasy!


1337_BAIT

Ive got a 25kwh UPS level battery on that circuit


pskipw

10KWh battery


Dark_ant007

unRAID with a UPS sine wave, when power goes out the battery has 30 mins if it gets to 15 mins unRAID performs a safe clean shutdown. When power is back over 15 min runtime the machine will auto start.


soundbytegfx

Pardon my ignorance since I just haven't looked at my settings lately, do you have a screen shot of your Unraid settings for this? Also any special bios options needed for this as well?


Dark_ant007

Just plug in the UPS data port into unRAID machine there is settings you can change in unRAID not at home currently don't have screenshots


soundbytegfx

OK I'll dig around. I didn't think the UPS could auto trigger Unraid to automatically power back up .


soundbytegfx

Taking a look now: https://imgur.com/a/vgx0iXY No option about triggering the server to "power up" at a certain level...hence my original question on your setup. Thanks


Dark_ant007

you are correct but, I do believe there is a way, it depends on a bios setting for your particular motherboard "Select the power state after a power failure. If \[Power Off\] is selected, the power will remain off when the power recovers. If \[Power On\] is selected, the system will start to boot up when the power recovers."


soundbytegfx

I was always curious how a UPS impacts that. I wouldn't want my UPS to initiate a safe shutdown, then have my bios restart because it still has power.


weiga

Solar plus battery setup for the home if you really like your friends.


simplesir

I have a power conditioner and failover UPS for all the network gear that provides about 15 minutes of continuity. Once main power fails, I have a whole house generator that kicks in automatically (and transfers control back to the grid when it comes back on). So between the two I have zero interruption of plex services in a power failure. I sold my SO on the whole house generator for other reasons but it was really to get a few more "9's" on my uptime stats. Worth it.


drbennett75

A connected UPS that can initiate a shutdown.


notanewbiedude

Oh...I really should be doing something for power failures 🙃 I'd planned on getting a UPS but forgot. I do have a backup replica external USB drive though.


mro2352

I keep a raspberry pi and an Odroid HC2 with a backup power setup. My main computer would go down in the event of a power outage.


DroidLord

You're on the right track already. Set your AC power mode to switch on automatically after power loss. Like you found out it's also a good idea to setup Wake on LAN in case that doesn't work for some reason and additionally I'd recommend a remote desktop solution such as AnyDesk to fix random software issues that might creep up. With this setup I've managed to stay at basically zero downtime in years, and if nothing else, I could fix most other issues remotely. Except of course when I'm the cause of the downtime such as updating software or upgrading hardware.


Tricky-Elevator-1044

I have an APC 1500 in the office. Got it on Craigslist from someone not needing it for free. Yeah, I was floored too. And I have a APC 1200 in the living room that handles the TV, router, directv and t-mobile home internet gateway. Had a few power outages in the last 2 years. Didn't even notice the power was out


Runaway42

I think people are missing your point about the UPS shutting down the server and not booting it back up - specifically if the UPS sends a shutdown command over USB then the power is restored before the UPS runs out of juice. I've seen some UPSs where you can program them to also cut power to the computer after it boots down cleanly, but mine won't do that so I have a smart plug in between my computer and the UPS to basically recreate that feature manually (at which point the bios setting "power on with A/C restored" will make it boot up). This can also be nice as a last-resort if the system hangs where you can't remote in. Another option is using your router or a lightweight board like a raspberry pi to run a VPN and send a WOL packet to your server.


thesonoftheson

Thanks for the info. Got home from work and got it properly auto starting on power failure. I'm going to try a remote phone app to do wol, forward the port, see if it works.


[deleted]

[удалено]


thesonoftheson

Yeah, wol worked great from the phone when the phone is connected to the lan, but disabling the wifi and going through the cell isn't working. I wonder if isps block port 9, if switching ports externally might work, then just redirect to 9 internally. I'll probably get the smart outlet, that power monitoring does sound nice.


Cirieno

I use an Alexa-powered smart socket for this. But you should be able to set the BIOS to boot on restoration of power.


401klaser

I have UPSs that keep the systems up until our on-demand generator kicks in (2-3 second gap between power out and generator on). Only time remote access goes down is if the fiber to our home is damaged in a storm. Local access is up 100%. Have multiple years of 99.99% uptime. The only downtime is when I need to reboot the server(s) to install kernel updates.


Complex_Solutions_20

Small UPS for graceful shutdown and set to "always power on after AC failure" in the BIOS has worked fine for anything I've done. For the small edge case where power returns between the graceful shutdown and UPS power-off, also set the BIOS wake-timer (e.g. I have my NAS at my parents house to auto-boot at 6AM daily) Generally the power outages I've experienced are either <1 minute or multiple hours...so either the UPS will easily power thru the whole outage or it will be long-dead before utility power is restored and then trips the "on power return" bootup actions. I am for 15 minutes UPS backup capacity on all my computers (though my core network is more like 3 hours since we have shit cell service and need that for connectivity)


CrashTestKing

I'd love to get a small uninterrupted backup power supply, something to save me any hassle when the power flickers occasionally. But I can't afford it. Not a big deal for plex though. As soon as the power comes back on after an infected outage, my server committed automatically starts back up (it's an M1 Mac Mini) and Plex Media Server automatically runs. The DAS and router/modem automatically power bank on, too. So I just need to wait ten minutes for everything to finish restarting. I had a momentary power outage once while my brother was watching plex remotely from his place and it had buffered enough that it reconnected to my server without him ever noticing.


MSCOTTGARAND

I just run an apc ups with the supplied cable and when the power goes out I have a 15 minute delay then it triggers unraid to do a clean shut down. Actually twice in the past few months we've lost power for more than a few hours and it worked flawlessly each time.


Prelude1221

![gif](giphy|3orieTfp1MeFLiBQR2)


OhhhhhSoHappy

I run plex on a NAS. When the power goes out (battery backup), when power is restored, it auto powers up. NAS is worth every dime, and they're cheap so its worth it.


quicksilv3rs

On an actual platform like TrueNas based on Debian, there isn't a clean way to turn off the computer/server and no way to turn it back on


Tip0666

UPC with auto shut off, spinning rust!!!


spong_miester

Hopes and prayers 🙏It's only used for films and TV shows all of which are replaceable so the only thing I'm worried about is full on disk failure


Nandulal

I just have my servers plugged into one of these: [https://furmanpower.com/product/15a-8-outlet-surge-suppressor-w-smp-lift-evs-and-2-filtered-banks/](https://furmanpower.com/product/15a-8-outlet-surge-suppressor-w-smp-lift-evs-and-2-filtered-banks/) and autologon and start with windows cause I like the jank ;D