this post was submitted on 10 Jul 2024
113 points (92.5% liked)

Selfhosted

40006 readers
718 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 1 year ago
MODERATORS
 

I believe this is a slightly controversial topic, at least from what I have gathered so far. Some say its best to leave the server on to spare the life time of the spinning rust. Other seem to prefer to save power and boot the server off each night. So wanted to chip in and hear what folks here do and why do what you do.

Bonus question; Do you guys have a UPS? Is it a must have for a homelab, or does it just depend on the usecase?

top 50 comments
sorted by: hot top controversial new old
[–] mhzawadi@lemmy.horwood.cloud 99 points 4 months ago (1 children)

I leave my servers running 24/7, thats the point of a server. Also my home automation would be a little pointless if its off.

I did have a UPS, but it died and I have got round to replacing it.

Its all horses for courses, if your homelab is a playground to test things out then turning it off when not is use is fine. But some have live services that you may want at a moments notice and there for having it up all the time is better.

[–] Strit@lemmy.linuxuserspace.show 15 points 4 months ago

I'm in the same boat as you. My server runs 24/7, because I have some services that require close to 100% uptime to function correctly.

My UPS works fine though, and I wouldn't go without it these days. Just because the damage an improper shutdown can cause on data.

[–] spyd4r@lemmy.world 43 points 4 months ago (1 children)
[–] Deepus@lemm.ee 5 points 4 months ago

Im pretty sure OP is just yanking our chain.

[–] CarbonatedPastaSauce@lemmy.world 34 points 4 months ago (1 children)

And ruin my uptime stats? Are you mad?!?!

Among the many things I run are my own email servers so, yeah gotta be up all the time. And yes I have a UPS behind every electronic device in my house except the TV because if that dies I get to buy a new one.

I've probably spent upwards of $2000 on UPSes and replacement batteries over the last 20 years, but if it saved even one of my servers from taking a hit it was worth it. Servers are expensive and my time is valuable to me.

load more comments (1 replies)
[–] DarkMetatron@feddit.org 27 points 4 months ago (2 children)

My home server does all my network related stuff (including DNS and DHCP) turning it off would be a very bad idea due to this.

I don't have a UPS, but it is relatively high on my list.

[–] PeroBasta@lemmy.world 6 points 4 months ago (2 children)

It all depends if you actually nerd those services 24/7

I dont need DHCP or DNS from 1am to 6am for example

[–] halm@leminal.space 12 points 4 months ago (1 children)

"Do I need them? No, but I nerd them, so they stay up!"

A most relevant typo 👍

[–] PeroBasta@lemmy.world 5 points 4 months ago

need them

LOL I do nerd em all as well

[–] computergeek125@lemmy.world 4 points 4 months ago

You may not but your phone will fail over to data if it loses its lease and stuff like background update tasks will cease to function (like Windows Update or dnf cron)

load more comments (1 replies)
[–] MystikIncarnate@lemmy.ca 22 points 4 months ago (1 children)

You can do whatever you want. Don't let anyone tell you it's "wrong". A big part of homelabbing is to try stuff. If it doesn't work, that's fine, you learned something, and that was the point.

For me, I don't see a UPS as essential. It's generally a good idea, but not strictly essential. My servers are on 24/7, because I have services that do things overnight for me. I also know that some people access my lab when I'm not awake, so I just leave it on so it can be ready for anything at any time. It poses some unique challenges sometimes when running stuff that's basically 24/7/365.

Be safe, have fun, learn stuff.

load more comments (1 replies)
[–] Shimitar@feddit.it 20 points 4 months ago (5 children)

24/7 of course, that's the point of it. But I have solar, so I don't mind consuming power, and its not thatuxh a yway, so, anyway...

What's the point in turning it off at all???

load more comments (5 replies)
[–] shnizmuffin@lemmy.inbutts.lol 20 points 4 months ago (3 children)

An UPS is a must for any computer, even if all it's doing is absorbing the shock of a brownout and triggering a graceful shutdown.

I run persistent services that require 24/7 uptime.

load more comments (3 replies)
[–] luciddaemon@lemmy.dbzer0.com 17 points 4 months ago (1 children)

My servers are on 24/7, currently they use about 100watts each (I have 2 running), which adds maybe $20 to my electric bill. I also have stuff such as mailcow, nextcloud, and mattermost running, turning off every night would make those applications useless.

I have a shit APC desktop UPS. It keeps them on for 10-15 minutes at best.

[–] neshura@bookwormstory.social 7 points 4 months ago

Imo you probably save more money keeping the server up 24/7 than constantly shutting it down and starting it up again. Especially once you get a good list of services going.

[–] jjlinux@lemmy.ml 13 points 4 months ago* (last edited 4 months ago) (1 children)

Absolutely not. Ever. It does a parity check monthly and then reboots, that's that.

[–] Codilingus@sh.itjust.works 5 points 4 months ago (1 children)

Sounds familiar. Unraid? 🤠

[–] jjlinux@lemmy.ml 6 points 4 months ago

Yup. Been very happy with it for almost 5 years. 🤓

When my wife sees all my interactions in Lemmy, she says that we're just a bunch of nerds. Of course we are 🤣😂. That's the beauty of this.

[–] BCsven@lemmy.ca 13 points 4 months ago

Nope always on. Also runs homeaasiatant so if it was off I would lose the schedule use for lights, or phone connection for on/off etc. But yes, get a UPS, even ifvyou haven't had a power faikure a good UPS will monitor and correct voltage amd dirty power. It has saved me a couple of times.

[–] EncryptKeeper@lemmy.world 12 points 4 months ago (17 children)

No one should be powering off their servers. Thats really not the way to go about anything. Now there’s nothing stopping you from doing that either if you want to and it makes you happy or your life easier.

But if you want a simple answer to a simple question, no, nobody sane is doing that lol

load more comments (17 replies)
[–] femtech@midwest.social 11 points 4 months ago

24/7 I have home assistant and other things that depend on it being up. It's not a beast but it definitely uses less than my oven. My electric use is big already from my electric car so the small savings wouldn't be noticeable alongside my solar panels.

[–] popekingjoe@lemmy.world 9 points 4 months ago

Server is on 24/7 and it has a UPS for the momentary brown outs I have during heavy winds. It would be silly if it's off for any reason besides maintenance, even more so since it holds multiple game worlds in addition to some web and chat stuff.

[–] rmuk@feddit.uk 9 points 3 months ago

No. Yes. Kind of.

My home setup is three ProLiant towers in a ProxMox cluster. One box handles all-the-time stuff like OpenWRT, file server, email, backups, and - crucially - Home Assistant and is UPS protected because of how important it's jobs are. The other two are powered up based on energy costs; Home Assistant turns them on for the cheapest six hours of the day or when energy costs are negative and they perform intensive things like sailing the high seas, preemptive video transcoding, BOINC workloads and such. The other boxes in the photo are also on all the time basically being used as disk enclosures for the file server and they are full of mismatched hard disks that spend virtually all their time asleep. At rest the whole setup pulls about 35-40W.

[–] MangoPenguin@lemmy.blahaj.zone 9 points 4 months ago

I have low power usage stuff so I just leave it on.

[–] thirdBreakfast@lemmy.world 8 points 4 months ago

My NAS and production server run 24/7, I've got a dev server that I turn off if I'm not expecting to use it for a week or so. Usually when I do that, I immediately need it for something and I'm away from home. I have chosen equipment to try and minimize energy use to allow for constant running.

My view on UPS is it's a crucial part of getting your availability percentage up. As my home lab turned into crucial services I used to replace commercial cloud options, that became more important to me. Whether it is to you will depend on what you're running and why.

I've heard that one of the most likely times for hard drives to fail is on power up, and it also makes sense to me that the heating/cooling cycles would be bad for the magnetic coating, so my NAS is configured to keep them spinning, and it hasn't been turned off since I last did a drive change.

[–] monoboy@lemmy.zip 8 points 4 months ago

I keep mine on 24/7, except I have a cronjob that runs in the early AM to check if it needs a reboot from unattended updates and reboots if needed.

[–] corsicanguppy@lemmy.ca 8 points 4 months ago (1 children)

Is it controversial because of the fact that "power off" is two words?

[–] Cyber@feddit.uk 11 points 4 months ago (2 children)

Yes, because the CLI command is poweroff, so I do agree with you 🙂

(Please Wait... comments about alternative CLI commands will arrive soon...)

load more comments (2 replies)
[–] NeoNachtwaechter@lemmy.world 7 points 4 months ago

My server has 5 harddisks (real spinning ones), and everybody says they live longer when running 24/7, so that's what I do. They are 6 or 7 years old now. S.M.A.R.T says they are clean.

Power outages occur sometimes. Once I had a problem with a file system afterwards. Later I got a small ups (for just 10 or 20min) and no trouble anymore.

[–] h3ndrik@piefed.social 7 points 4 months ago (2 children)

Entirely depends on the usecase. If it's a NAS and you only watch a few movies in the evening: Turn it off.

I bult a fairly power-efficient server. Consumes less than 20W and spins down the harddisks if not in use.

I can't turn it off because none of the lightbulbs in the house would turn on anymore, my website would go down, my Fediverse instance wouldn't pull any posts from American people who are awake during parts of the night. My emails and chat messages wouldn't get delivered.

I don't have a UPS. Also depends on the circumstances. I use ext4 as a filesystem which is kind of robust enough to handle power outages. And they're rare where I live. A UPS would draw additional power and cost money. It's not worth it for me at home.

[–] Scrath@lemmy.dbzer0.com 4 points 4 months ago (5 children)

I can't turn it off because none of the lightbulbs in the house would turn on anymore

Personally I try to avoid making anything in my home actually dependant on my server. I have a single lamp that can only be controlled from my phone and that's only because it's so rarely used that I didn't want to put in the effort. Everything else is local first and only gets extended functionality from my server running.

I've had a couple issues with my zigbee stuff over the years on the server side and I would be really pissed if I wouldn't be able to turn my lights on because I haven't gotten around to fixing my server yet.

load more comments (5 replies)
load more comments (1 replies)
[–] Moonrise2473@feddit.it 7 points 4 months ago (2 children)

when i had only the file server, i turned on via WOL each time i actually needed it and a script shut it down if there was no activity after 11pm

now i host so much stuff and i'm so dependant on it that it requires redundant power and failover WAN via 5g...

load more comments (2 replies)
[–] flop_leash_973@lemmy.world 7 points 4 months ago

Mine stays on 24/7/365 unless I am going to be out of town.

[–] meldrik@lemmy.wtf 5 points 4 months ago

It runs 24/7. My Lemmy instance among other things, is running on the server.

I use a Power Station from Allpower with UPS capabilities.

[–] Nomad@infosec.pub 5 points 4 months ago

Modular solution. Big NAS for backup and file and media serving shuts down when I go to bed automatically or nobody is home. Boots via WOL when needed.

Always on services on a central pi for home automation, phone and internet services, etc.

[–] computergeek125@lemmy.world 4 points 4 months ago

On/off:
I have 5 main chassis excluding desktops. Prod cluster is all flash, standalone host has one flash array, one spinning rust array, NAS is all spinning rust. I have a big enough server disk array that spinning it up is actually a power sink and the Dell firmware takes a looong time to get all the drives up on reboot.

TLDR: Not off as a matter of day/night, off as a matter of summer/winter for heat.

Winter: all on

Summer:

  • prod cluster on (3x vSAN - it gets really angry if it doesn't have cluster consistency)
  • NAS on
  • standalone server off, except to test ESXi patches and when vCenter reboots cause it to be WoL'd (vpxd sends a wake to all stand by hosts on program init)
  • main desktop on
  • alt desktops off

VMs are a different story. Normally I just turn them on and off as needed regardless of season, though I will typically turn off more of my "optional" VMs to reduce summer workload in addition to powering off the one server. Rough goal is to reduce thermal load as to not kill my AC as quickly which is probably running above its duty cycle to keep up. Physical wise, these servers are virtualized so this on/off load doesn't cycle the array.

Because all four of my main servers are the same hypervisor (for now, VMware ESXi), VMs can move among the prod cluster to balance load autonomously, and I can move VMs on or off the standalone host by drag-and-drop. When the standalone host is off, I usually move turn it's VMs off and move them onto the prod cluster so I don't get daily "backup failure" emails from the NAS.

UPS: Power in my area is pretty stable, but has a few phase hiccups in the summer. (I know it's a phase hiccup because I mapped out which wall plus are on which phase, confirmed with a multimeter than I'm on two legs of a 3-phase grid hand-off, and watched which devices blip off during an event) For something like a light that will just flicker or a laptop/phone charger that has a high capacitance, such blips are a non issue. Smaller ones can even be eaten by the massive power supplies my Dell servers have. But, my Cisco switches are a bit sensitive to it and tend to sing me the song of their people when the power flickers - aka fan speed 100% boot up whining. Larger blips will also boop the Dell servers, but I don't usually see breaks more than 3-5m.

Current UPS setup is:

  • rack split into A/B power feeds, with servers plugged into both and every other one flipped A or B as it's primary
  • single plug devices (like NAS) plugged into just one
  • "common purpose" devices on the same power feed (ex: my primary firewall, primary switches, and my NAS for backups are on feed A, but my backup disks and my secondary switches are on feed B)
  • one 1500VA UPS per feed (two total) - aggregate usage is 600-800w
  • one 1500VA desktop UPS handling my main tower, one monitor, and my PS5 (which gets unreasonably upset about losing power, so it gets the battery backup)

With all that setup, the gauges in the front of the 3 UPSes all show roughly 15-20m run time in summer, and 20-25m in winter. I know one may be lower than displayed because it's battery is older, but even if it fails and dumps it's redundant load onto the main newer UPS I'll still have 7-10m of battery at worst case and that's all I really need to weather most power related issues at my location.

[–] spacemanspiffy@lemmy.world 4 points 4 months ago

24/7, no UPS since I am cheap and lazy.

My media center PC has a sleep schedule, though, and goes into suspend in early morning hours. I am sute the power it saves is next to nothing.

I used to do this with my server, too, but scrapped that once I started needing it on randomly at night.

[–] thayer@lemmy.ca 4 points 4 months ago

24/7 here with a NUC 8i5 in a fanless case; all SSD. I use a simple UPS (APC 600VA) to protect the server, modem, router, and main network switch, and it survives outages up to about 30 mins.

[–] Decronym@lemmy.decronym.xyz 4 points 4 months ago* (last edited 3 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DHCP Dynamic Host Configuration Protocol, automates assignment of IPs when connecting to a network
DNS Domain Name Service/System
ESXi VMWare virtual machine hypervisor
NAS Network-Attached Storage
NUC Next Unit of Computing brand of Intel small computers
PiHole Network-wide ad-blocker (DNS sinkhole)
SSD Solid State Drive mass storage
VPS Virtual Private Server (opposed to shared hosting)

[Thread #862 for this sub, first seen 10th Jul 2024, 12:55] [FAQ] [Full list] [Contact] [Source code]

load more comments
view more: next ›