I live in a part of the world where powercuts are pretty frequent. 1 per day is normal. They last between 1 and 8 hours. A day without powercuts feels like a special occasion.

My machine is powered by a desktop ups which is terrible. It is only supposed to power everything for a few minutes to shutdown safely. But it is cheap and I don’t know much about other affordable alternatives.

How do you folks who self host at home deal with powercuts? Any recommendations? 8 hours of uptime from a ups sounds almost impossible or totally unaffordable to me.

  • echo64@lemmy.world
    link
    fedilink
    English
    arrow-up
    22
    ·
    1 year ago

    Multiply your server wattage by 8 hours. That’s how much battery you need. It’s probably not going to be a cheap investment.

    The alternative would be to keep your ups and invest in a generator you can kick on if there is a power cut, but if it’s every day, that might get rough. Technology connections figured out a build it yourself solution a few years ago https://youtu.be/1q4dUt1yK0g?si=8WOTue9-zGghWlxY

  • rambos@lemm.ee
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 year ago

    Where are you from my friend? Why do you actually need server running if you have no electricity at home? Your internet is also down right? Dont you need to just find how to shutdown safely when outage happens? Or do you have mobile/sattelite internet as a backup?

    I use candles btw 🕯️

  • Appoxo@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Germany.

    I don’t. Can’t remember a power outage ever except for shorting our connection box :)

    Besides that only some internet outages of our ISP but that is also very rare today.

    Edit: At work we sell 750VAh to our customers which are usually very small in demand and workload

    • Im1Random@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Another German here and yeah I also only had a single power outage (around 1h) in the last 5 or 6 years. Couldn’t even imagine having no power once every day or even every week.

  • bia@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 year ago

    I actually built my own 2 kWh battery setup after finding available commercial UPS overpriced.

    It took some work and cost me about 2000 euro, but now I run everything (including networking, servers and monitor) directly on a battery feed DC net in my house.

    It’s pretty cool too have all IT equipment unaffected by a power outage.

      • bia@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        It’s not very cleanly built, and parts of it are hidden. But this shows the main parts.

        The black UPS on the left is the old one, not in use anymore.

        The silver inverter on the left feed a rail in my server rack.

        On the right is the battery and charger, and in the middle the fuse box and transfomer.

      • bia@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        It’s very homemade, but I believe it’s built like a DC net for a boat. It’s a bluetooth connected lithium battery, boat cabling and fuse boxes and Victron charger and voltage transformers.

        I built it with “subnets” for different voltages. The battery is 24 V which feeds servers and a 34” monitor, then a transformer to 12 V for network gear, and several 5 V (USB) for a rack of raspberry pis. The is also a small 230 V transformer, for some gear that have built in PSU.

        The largest server is fitted with a custom DC PSU I found on e-bay, others are normal external PSU where I cut the cables.

        • stafeel@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          That’s impressive! In your experience, how does the lithium battery compare to a lead acid one?

          • bia@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            I don’t have a good link to share, but from the research I did the difference is huge.

            LiFePO4 batteries have a higher capacity, longer lifetime, safer and higher power to weight density. Many come with built in communication, like my bluetooth connection.

            They are also expensive, but for my use case it’s much cheaper over time. I use about half a charge per day, which this battery should be able to sustain for 5-10 years. A lead acid battery would probably last months.

      • bia@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Forgot to add that a big part of the setup is in the battery controller, which I built on my own. :) That was a very fun project, and now the battery is fully automatic and charging is based on hourly price and the power provided by my solar panels.

    • Jason2357@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      DIY, all DC is often the way to go if you are trying to run for a long period of time. UPSs are really typically designed to run just long enough ride out brown-outs or to shut everything down safely in a total blackout. Some even shut down if they don’t sense a heavy enough load (i.e., designed to assume servers have shut down, and so preserves the battery -I banged my head against that for so long!).

      I have everything on a consumer-grade APC now, and I have it set up to give me about 3 minutes of server, + another half hour of basic networking. I do have some marine deep cycles and an inverter, so I could set up the networking to run longer if cell towers were down and I needed it. But I’d likely use the energy for other things.

  • circuscritic@lemmy.ca
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    1 year ago

    Can you migrate, or setup failovers, to a low powered ARM device? Or one the new Intel N series e.g. N100 low power devices?

    If not, you’re going to need to buy/build a fairly large battery bank.

    • stafeel@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yeah, been looking into Pi’s and its alternatives. But with the external drives I think I’ll need a big powerbank or I’ve to DIY a ups

        • stafeel@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          Not a lot of critical services but I would absolutely need things like pihole.

          Just realized, I can host the critical ones on the ARM device and the services which I can do without for some time can stay on the current server.

          • TheInsane42@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            1 year ago

            Then I’d go that route. Here all is on RPies, alas not the NAS, but those disks are almost always in sleep mode.

            Small tip on the storage, go for a cheap SSD external (alie has a few for next to nothing), get at least 2-4, as reliability issues exists, but will show themselves within days or not. Only use rhe sd card to boot from, mount / from the ssd.

            1 RPi and an ssd can runa while on a small UPS. (Need to get me one as well)

            • 7Sea_Sailor@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 year ago

              Not sure if I’m a fan of the “AliExpress SSD” recommendation. They’re badly built and unreliable, you won’t know what capacity you get, and they can be incredibly slow.

              Regular, known-brand SSDs have dropped so much in price and are very affordable at low capacities. That should be a much safer investment than buying heaps of most likely unusable drives.

              • TheInsane42@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                Depends. I used loads of ‘known brand’ micro SD cards and went trough them one per month. I ordered 2 KingSpec and ‘Kunup’ sticks, just to test. (june '20) Of each, 1 worked perfectly, 1 was not good enough for continuous use. The active Kingspec has been active for years now, but I use less then 20 GB of the 120 GB SSD. (Really need to clean up logs, OS shouldn’t use more then 5G, data is on NAS) The ones that were not reliable enough for continuous use are still in use for transport.

                It worked here and proved a lot cheaper then replacing the SD card every month. As they are Chineese ‘unknown brand’, ymmv hugely. (and don’t buy something that will just fit, as trade GB isn’t IT GB and Chineese GBs vary even more) It however is always a gamble to buy something from the other side of the world. (but hey, every ‘known brand’ is made in China anyway now, so we already are hugely locked into that country)

  • Curious Canid@lemmy.ca
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    1 year ago

    I have a small UPS to keep my fiber and router working for a while and I have a larger UPS for my server. Even the larger UPS will only keep the server going for maybe half-an-hour, but most outages here are short. For me, the most important benefit is that my UPS will tell my server to shutdown when it begins to get short of power. Graceful shutdowns remove the risk of corruption and data loss.

    • vegetaaaaaaa@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Any journaled filesystem is mostly fine (e.g. good old ext4).

      Same as you, if power goes down for a long time I have bigger problems than not being able to access my home server. Guess I could still hook it up to my car battery and DC->AC converter if I really wanted to, and use my phone as 4G modem/backup internet access.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Ext4 can get corrupted in some cases. Its very rare but there is no way of knowing since ext4 doesn’t have file checksums.

  • hexdream@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Are you in South Africa? Personally I migrated to Intel NUCs and run virtualization with them. Power wise I have an Inverter and a solar panel as a backup. Inverter handles all the heavy lifting and switching. This system is purely for my electronics. So laptop, servers etc. There is no “cheap” way to do it, but if you do it in stages it can be affordable. If you can, try not to cheap out on the batteries and Inverter. Lead acid based batteries are OK IF you take care of them. Don’t use the cheapest Inverter. It’s not worth the risk of damage.

    • stafeel@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I agree. Its never worth the risk.

      I think I’ll start with inverter + battery. Then add batteries in the future depending on my power needs.

      • Sleepkever@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        There are inverters that support battery backup, recharging from solar and grid power that are supposed to go between your grid tie-in and the rest of your house. Quite a ways more expensive, but the battery capacity is probably relatively cheap compared to UPS power and is essentially a backup for your entire house.

        The one I read about a while ago was a Growatt that is basically an all in one box. Can provide power from batteries, recharge from solar or grid power, feed back excess solar power to the grid, etc, you name it. And I can imagine other brands producing the same solution.

        I’m lucky enough to live in a country with almost no power cuts though. I think we have at most 1 a year for max 10 minutes. So can’t say I have any experience with it myself.

  • Faceman🇦🇺@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I have 2 UPS’s, a small one that runs the fibre gear and keeps the connection alive and the main one in the rack that keeps the main server running for a couple of hours.

    I’ve only ever had 1 power outage in the last 5 years though and it was scheduled electrical work. couple of brownouts during storms that were just barely deep enough to kick in the UPS boost for a minute but nothing major. nothing else is critical enough to worry about it in my case.

    but if I were in a place where power is patchy, I’d have enough solar+battery for the whole house to last a normal day/night cycle, then a UPS for the rack, then a generator as a last resort only.

  • Doubletwist@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    UPSes aren’t meant to keep things running for long periods of time.

    If you’re trying to keep things on for hours, you need a generator. Then the UPS just needs to keep things running until the generator comes online.

    I suspect it’ll be a lot cheaper to get a small generator than it would be to buy enough UPS and batteries to run things for multiple hours.