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?

  • Matt The Horwood@lemmy.horwood.cloud
    link
    fedilink
    English
    arrow-up
    71
    ·
    2 months ago

    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
      link
      fedilink
      English
      arrow-up
      9
      ·
      2 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.

  • CarbonatedPastaSauce@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    2 months ago

    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.

  • luciddaemon@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 months ago

    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
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 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.

  • shnizmuffin@lemmy.inbutts.lol
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 months ago

    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.

    • iknowitwheniseeit@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      2 months ago

      Meh. I lose power every 3 or 4 years on average. A UPS just doesn’t make sense for me. (When I lived in Virginia it was once a month on average, so for sure it made sense…)

      • cybersandwich@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 months ago

        Like he was saying, it’s more than just power loss. It’s a way of “sanitizing” the power as it comes in. This is “usually” not a problem. But dirty power is arguably worse than power outages. If the voltages fluctuate or get low for whatever reason that puts a big strain on your power supplies.

        This could happen because you run a vacuum on the same circuit and your house is old, guy down the street electrocutes himself or the power coming in from the electric company is ‘dirty’ because they have an issue with transformers or up stream somewhere. It can be imperceptible to you, but your tech notices.

  • Shimitar@feddit.it
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 months ago

    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???

  • femtech@midwest.social
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 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.

  • Pope-King Joe@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 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.

  • DarkMetatron@feddit.org
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 months ago

    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.

  • Encrypt-Keeper@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    2
    ·
    2 months ago

    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

    • BritishJ@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      3
      ·
      2 months ago

      We power off servers in the enterprise all the time and on schedules 😂. Its called saving money.

        • BritishJ@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          3
          ·
          2 months ago

          In pretty much any enterprise using the public cloud. Everything is auto scaling, so shutdowns when not needed. Dev environments shutdown over night… If you’re not shutting down and scaling in the public cloud, you’re doing it wrong.

            • BritishJ@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              arrow-down
              4
              ·
              edit-2
              2 months ago

              Is it shutting down servers… Yes. it just does it based on parameters and thresholds.

              Then you get things like VDI servers and jump boxes that only need to be on between certain hours, so get shutdown outside them hours.

              • WordBox@lemmy.world
                link
                fedilink
                English
                arrow-up
                2
                ·
                2 months ago

                Right you don’t shut them down, you scale them down. My server also uses less power off peak demand.

                • BritishJ@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  arrow-down
                  1
                  ·
                  2 months ago

                  No we shut them down. They get deallocated the same way as shutting down a virtual server does. They’re not containers, the scaling part just turns them on and off based on workload or schedule

  • NeoNachtwaechter@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 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.

  • thirdBreakfast@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 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.

  • Moonrise2473@feddit.it
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    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…

    • seang96@spgrn.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Are you tunneling for just the 5g connection to expose your services or just tunneling everything?

  • monoboy@lemmy.zip
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 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.