Hello preppers! As I prepare further and further for the digital and traditional collapse of society (/s), I finally got to the point of building my selfhosted server.

At the moment I have a single bay Synology nas but it will soon find a new home (🗑️). I was thinking that instead of buying new tech I can be a conscious human being and recycle my old laptop.

My old MSI PE60 2QD with i7 5th Gen, its a very capable machine and having the battery, I think, is better for a sudden loss of power. I replaced it because the hinge and screen broke but I never thrown it away.

I wanted to wipe it and install some linux distro for selfhosting with, I think, Tailscale for access it remotely. I use it to store file, photos, music …normal cloud stuff.

Before wasting hours troubleshooting, I’m sure there are brilliant people here that can give me tips or a link to a simple guide to follow. (Please don’t make me ask the bots).

I’m sure this thread is already open somewhere and I’ll be happy to follow that and delete this, if so.

Thank you lemmings.

  • glitching@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 hour ago

    using laptops as a forever-plugged-in device (regardless if workstation or server) isn’t the greatest idea. as an intermediary solution, like until you have something more permanent in place, sure. otherwise, look elsewhere.

    limiting battery charge isn’t available on all laptop models and is aimed at preserving the battery’s functionality; it doesn’t solve the issue of a forever charged and never emptied battery. on the other hand, removing the battery on a lot of models limits their performance, significantly.

    what is a viable solution is if you get a laptop board that runs at full power without battery, you can remove the board from the laptop, retrofit it with better cooling and additional storage (mini-PCI or M.2 to SATA adapters) and you end up with an energy-efficient server. but that requires a lot of work and is not something recommended for non-enthusiasts.

    in short, sell it or swap it for something more adequate.

  • 486@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    15 hours ago

    If you plan on running the laptop all the time on wall power, make sure to limit the battery charge to 80 % or less, otherwise the battery will die pretty quickly.

    • NotKyloRen@lemmy.zip
      link
      fedilink
      English
      arrow-up
      4
      ·
      14 hours ago

      Or remove the battery if you can, to spare it from pillowing. I know it has the benefits of being a “psuedo-UPS”, but unless you also have your modem/router on a UPS, it’s pointless (internet goes out; you can’t access the laptop anyway).

  • oshu@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    19 hours ago

    If you are going to store important data I would get a new drive. Either replace the internal or attach an external.

    Also make backups.

    • dan00@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      17 hours ago

      I’m going to attach some used hard disks and ssds, I have many spare ones. I wanted to set up a RAID2 or 3, so even if some disks dies it’s not the end of the world.

      • Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        16 hours ago

        RAID isn’t backup, or even redundancy, it’s for creating large storage pools. It’s at the mercy of the controller and all the hardware. In fact, the more disks you have, the more likely you are to be impacted by a failure.

        In a typical RAID 5, if one drive fails, the entire array is at risk until the drive can be replaced, and resilvered. During resilvering (rebuilding the drive with all the data it should have, parity, etc), the entire array is at even more risk because of the load on the other disks.

        With dual parity and hot spare (less data storage total), you get a little more security since the parity is doubled and the hot spare will be automatically resilvered if a drive fails, but that’s not without similar risks during that process.

        You still need backup.

        Here’s a real-world example of RAID risks. I have a 5-drive NAS with 5 1TB drives, which gives me roughly 4TB of usable space (1TB parity). It runs software RAID using ZFS (a highly resilient file system, that can build arrays using varying disk sizes, and has some self-healing capability). I’ve had a drive go bad, replacing took 30 hours to rebuild. During that time, the entire array is “degraded”, meaning no parity protecting the data because it’s currently rebuilding the parity. If another drive were to have failed during this read/write intensive period, I would have lost ALL the data.

        To protect against this, I have 2 other large drives which this data is replicated to. And then I use a cloud storage for backup (storj.io).

        This is a modified version of the 3-2-1 method that works for my risk assessment.

        Without offsite backup, you’re always at risk of local issues - fire, flood, etc. Or even just a massive power spike (though that’s not much of a risk, especially if you use a UPS).

        I’m actually building a second NAS to have easier local redundancy, and because I have a bunch of drives sitting around. With TrueNAS or Unraid, it’s pretty easy to repurpose old hardware. Though power is always a concern, so I’m looking for an inexpensive motherboard that has low power draw at idle.

  • qjkxbmwvz@startrek.website
    link
    fedilink
    English
    arrow-up
    3
    ·
    16 hours ago

    Whatever you decide for your laptop, I’m a proponent of a barebones off-site setup if you’re trying for 3-2-1 backup or similar.

    I use a raspberry pi 3 with a single HD (ZFS) retaining some number of daily/weekly/monthly snapshots. Daily rsync, everything over WireGuard+VPS (TailScale would work too).

  • gedaliyah@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    20 hours ago

    From what I gather, most people use a simple Linux distro like Ubuntu or Debian with a large community knowledge base. Then run the pieces you want through Docker. It’s pretty simple once you learn how.

    Your laptop will be perfectly capable.

    • HelloRoot@lemy.lol
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      23 hours ago

      More like build-in UPS that will do the forbidden caprisun and set your house on fire after a year.

      • Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        2
        ·
        16 hours ago

        Never had this happen, and I’ve carried laptops since the mid 90’s, and they’ve always been plugged in most of the time.

        Get to office, plug on, get home, plug in and sit overnight in the charger with no use.

        I’ve seen a few expanded batteries, but that’s across the hundreds of laptops in my support circle. It’s very rare.

        Every laptop I’ve had in the last 5 years has battery protection built in anyway. I’m running 2 laptops from 2019 that have it.

        Though you do make a good point, something to figure out if your laptop does this. And to keep an eye on the batteries anyway (like check battery health quarterly), and replace if it gets down significantly (I replace mine at 70% health).

        • HelloRoot@lemy.lol
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          10 hours ago

          My personal experience with laptop batteries was not as nice as yours, but neither should be blindly trusted.

          Not sure if there is some science on it anywhere but this random search result article https://www.pcmag.com/how-to/help-my-laptop-battery-is-swollen-now-what says:

          most common cause of a swollen battery is overcharging. Keeping your battery at a high state of charge can stress it out, allowing it to degrade faster. “In an application where you have a system plugged in 24/7, after a number of years your likelihood of getting a swollen battery increases,” says Phil Jakes, principal engineer and director of strategic technology at Lenovo. “The other thing that drives it is heat. Batteries don’t like to be hot, and there’s a chemical process that gets kicked off when a battery gets over 100 degrees.”

          Don’t keep your device plugged in all the time. Batteries are cyclical and have to discharge and recharge to work effectively.

          Keep your devices in cool, dry environments. Hot and humid weather conditions put more strain on batteries and can shorten their operating life over time.

          When shopping for a new battery, buy from reputable manufacturers. It’s generally better to buy a replacement from the original laptop maker than the cheapest compatible option from a third party.

          Replace your battery—if you can—if you see its capacity drop too low. Manufacturers test their computer batteries to last up to three to four years, while an iPhone battery is meant to retain up to 80% of its original capacity at 500 charge cycles. If you start to see any warning signs, replace it sooner rather than later.

    • dan00@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      20 hours ago

      Not really a question, just if anyone knows a good trusted guide I can follow to do this or if you have tips and tricks.

      As much as i like to mess around with computer and electronics, i don’t have time for this. I need something that i set up quickly and works well, that’s it.

  • Frank Heijkamp@mastodontech.de
    link
    fedilink
    arrow-up
    2
    ·
    23 hours ago

    @dan00 The specifications of the hardware seems enough to run a couple of VM’s and / or containers. Given you have a reasonable amount of RAM installed.

    The choice of OS and packages depends somewhat on what it is you want to do with it. A headless Debian or Ubuntu install would be an obvious choice. I have Proxmox VE on a little Intel NUC that has some stuff running on it. Other people might choose things like OpenMediaVault, TrueNAS or Unraid.

    Do you already have an idea what you like to do?

    • dan00@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      20 hours ago

      Yes I was thinking something like TrueNas or OMV would do the trick. I feel that a general headless distro could be harder to set up.

      But what about the raid copies for example? Because i need to attach some external storage, is usb okay for this?

      • Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        16 hours ago

        USB isn’t good for RAID, it’s unstable.

        Do you currently have more than 8 or 12TB of data? Because you can buy drives that size today, no need for RAID under those capacities.

        I recently purchased an 8TB drive for ~$100 on Amazon. Yes, it’s used, but comes with a 3 year warranty. I’m fine with that warranty length, as drives don’t last forever, and I’ll be replacing drives due to growth anyway.

        Don’t overlook RAID 1 - mirroring. With large enough drives this is a viable first step to some redundancy (though it’s really intended more for failover). Simply replicating your data locally to multiple drives, and backing it up offsite should give a lot of redundancy.

        The big challenge with local redundancy is that it’s not backup, so replicated bad changes can wreck all local copies. Backup, however, gives you multiple copies of data and incremental changes (if configured that way).