Hey guys, I’m new to self-hosting; I’m trying to set up cloud storage to store pics and other content. However, I’m unsure whether to use my old computer, Buy NAS or ResberryPie to set up a home server.

Also, what is the best privacy-friendly OS to use with the home server?

Lastly, do’s and don’ts.

Any help would be appreciated (:

  • juli@programming.dev
    link
    fedilink
    English
    arrow-up
    37
    arrow-down
    2
    ·
    1 year ago

    Use docker compose . Like “everyone” uses it. If the service doesn’t have a compose file, request it, or write it yourself as son as you are knowledgable enough.

    Use podman as soon as people and services switch to it (you’ll know when the latest tutorials talk about podman instead of docker).

    Use ngingx proxy manager or another easy to use reverse proxy.

    Don’t think it’s production ready after it was working 2 days. It may be, but it’s unlikely you have enough knowledge how to fix things.

    Automatic updates.

    Don’t install crap on the system.

    • Scrubbles@poptalk.scrubbles.tech
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      1 year ago

      This is a good way to get started.

      Docker and Docker compose on whatever hardware you want to start on.

      Don’t think it’s production ready after it was working 2 days. It may be, but it’s unlikely you have enough knowledge how to fix things.

      Most important there. You aren’t building a production system for corporate clients, you’re doing this for fun. Focus on one thing, try to get that one thing running. Toy with it, make it work. Then start on your next thing. Slowly you’ll build up a large system, but it won’t be immediate.

      I personally have been working on switching from compose to kubernetes, which is way more advanced than a starter needs - but I’ve been slowly migrating for about 4 weeks now, one service at a time. Just how homelabs are done

        • Scrubbles@poptalk.scrubbles.tech
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          For home use? Barely any. You can use multiple computers to spread out your load, which is nice for me because I have about 20ish containers running with differing workloads.

          But I’m also a developer who needs to keep up on devops, so it’s mostly a learning thing for me. But I gotta say it’s real nice having everything laid out in a few yaml files that I can tear down and rebuild on a whim

          • Kaldo@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            having everything laid out in a few yaml files that I can tear down and rebuild on a whim

            Oh absolutely, but for me docker compose already does that. Kubernetes might be a good learning exercise but I don’t think I need load balancing for 1 user, me, on the home network 😅

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

          Some additional benefits also are the management of secrets. In compose you will shove them inside a .ENV file if not directly inside the compose file, while in Kubernetes you can use the secrets resource or even plug in Vault relatively easily. Stateful storage is also better handled. Named volumes are nasty to keep track of, backup and it’s not possible to spread them across multiple devices (as in disks) while bind mounts are insecure in general. Kubernetes provides a storage abstraction which is easier to manage.

          Obviously the big advantage comes when you want to run stuff on multiple devices to spread the load (or because the one box is saturated), since with compose you would need completely custom and independent setups.

          Finally, I would say that running compose makes it much harder to have a monitoring stack supporting your services, since you will need to do all the plumbing for metrics endpoints yourself. And - very last - you can have admission controllers in Kubernetes that prevent certain configuration (e.g. Kyverno with a bunch of default policies), while with compose you need to manually vet every compose file and image (for example, to ensure it doesn’t run as root).

          That said, compose is perfect to get started and to run stuff on one machine.

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

    Start with hardware you have already, its high likely overkill anyway. If you have CPU that supports quicksync (intel 7th gen or newer iirc) you could remove GPU to reduce power consumption. QuickSync will make streaming easy.

    Raspberry pi cant transcode so its not best for media server, but it can direct play so that might not be an issue at all. I upgraded from rpi to desktop PC because I had issues with power on rpi USB ports for storage. Its also impossible to upgrade RAM on rpi. Good thing about rpi is super low power consuption, but some small factor PCs can drain ~10W. My PC was at 22W with 3 SSD. You can get power meter like Shelly plug S to see power consuption yourself.

    Any OS (I use debian) of your choice + docker and docker-compose. Then install portainer and manage all services from there.

    • For pictures try Immich, its amazing.
    • For cloud storage Nextcloud
    • For media streaming consider Jellyfin (much better than Plex IMO)
    • Check wiki.servarr.com if you are downloading content with torrents or usenet. It can automate everything and provide awesome UI for users. Next level torrenting
    • If you have only 1-2 users consider Wireguard or tailscale to connect when not at home.

    I was going this route and Im super happy with everything

    • Appoxo@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Raspberry pi cant transcode so its not best for media server

      To expand on that:
      Kinda right and still wrong.
      You actually can transcode. But the performance wont be great.

      I tried it with Jellyfin by transcoding anime episodes thanks to SSA subs (1080p ~1GB @ 20min episodes). Performance was about 0,7-0,9x

      because I had issues with power on rpi USB ports for storage.

      Corrupted my kernel by having 2 USB powered disks on it (hdd and ssd) and wondered why the write performance sucked so hard if I wrote to both at the same time.
      Then I updated the kernel and corrupted it c:

      Check wiki.servarr.com

      Don’t forget trash guides.

      • hemko@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        The 2 usb ports on RPI share the same usb controller and pcie lines, so you can’t expect max throughput on both ports simultaneously

        • Appoxo@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          Problem was less the throughput and more the power it could provide to supply both a 2.5" hdd and ssd.
          If you connected the monitor your could see a bolt on the monitor probably warbing about undervoltage/power.
          When I upgraded the kernel it went down during the upgrade.

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

            I had an issue with only 1 SSD powered from USB, couldnt even run SMART test. Found that after I got corrupted system. Getting external power supply makes it more bulky and have to be careful with compatibility

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 year ago

    Whatever you do:

    • keep notes
    • consider the 1st build “wrong”
    • “destroy” it (before it’s the only place your data is stored in)
    • build it again

    That means you’ll really understand it and how to maintain it.

    And others have said: 3-2-1 backups

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

    Don’t use Raspberry pi.

    • It is overpriced and slow.
    • SD Card write speeds are low
    • you will need external storage
    • Arm architecture, so some programs might not work
    • power issues
    • slow USB

    A cheap old laptop will work a lot better.

    • it might not have AC wake up (if power goes out, you will need to manually turn it on)
    • it might have always on cooler
    • it supports SATA SSD without adapter

    I think Raspberry pi is only good if you need gpio, otherwise save money and use an old laptop.

    • modcolocko@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      3
      ·
      1 year ago

      Don’t use Raspberry pi.

      Oversimplified and in many cases is not good advice. Raspberry Pis are perfectly capable low cost home servers that absolutely sip power and take up little room.

      Mini pc’s such as dell optiplex micro’s and intel nucs are also a good consideration.

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

        Exactly. Just know the limitations and capabilities of your hardware and implement your system accordingly. My Rpi4 works well for adguard home, wireguard, NPM etc. While my media server and other resource heavy stuff are installed on a Mini PC.

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

        How can you day"low cost home server"? they cost so much and when you need them they are out of stock

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

    Old think pads can be had for dirt cheap on eBay, you’ve essentially got a little server you can hide anywhere, you don’t have the keep the lid open (disable sleep on lid close, you can hide it wherever you want now) , ANDmost importantly it has it’s own little integrated UPS :)

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

    The Raspberry Pi can work if you don’t need a lot of space or high performance. You will need an external drive or two for it. The power consumption will be very low too.

    You can use an old PC if you need more drives. Just don’t use an old gaming PC since the power consumption will be rather high.

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

      You can always just undervolt the cpu and take out the gpu. Sure, a 1000w power supply is going to be inefficient at 20% draw, but if you already have old hardware it isn’t always cost effective to replace it just because of a higher power draw.

      Also the pi is great for stuff like dns and network storage, but it’s going to struggle with transcoding as a media server. I can’t speak for the 5 from personal experience, but the 4 was completely incapable as a jellyfin/plex server. I just use an old stripped down computer for media and the pi is relegated to dns adblocking.

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

            I would still consider an 8 year old CPU to be fairly recent considering performance has only increased a couple percent per generation.
            12 bit video is uncommon, so support for it is not really needed. Intel Skylake or newer will work for 8 bit H.265.
            If you have any video in 10 bit H.265, you will need a Kaby Lake or newer CPU in order to decode it in hardware. Software H.265 decoding will limit it to 1 or 2 streams depending on the CPU and video quality.

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

    Any cheap PC is going to be way better than raspberry Pi.

    Also, may I suggest you to checkout Immich? I am in love with the project and have been using it as Google photos replacement.

    Welcome to selfhosting!

      • DLSantini@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        I switched from Google photos to immich just recently. I’m still looking for a good solution to replace Google’s editing features. I used, and miss, those features a LOT.

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

      i found their site and in confused by this part of their intro page:

      “That was how the idea started to grow in my head. After that, I began to find existing solutions in the self-hosting space with similar backup functionality and the performance level of the App-Which-Must-Not-Be-Named. I found that the current solutions mainly focus on the gallery-type application. However, I want a simple-to-use backup tool with a native mobile app that can view photos and videos efficiently.”

      what is the main thing that separates immich from other “gallery-type applications”? wouldnt all comparable apps have some kind of gallery?

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

        What are you comparing it with? Something like photoprism? If so, then photo prism does not allow you to have multiple users. (Atleast it wasn’t there when I used it last time)

        If you compare it with Lychee, then Lychee does not have facial recognition.

        • Tywèle [she|her]@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          I tried Photoprism a few days ago and it still doesn’t support multiple users. It also doesn’t have an app. The Immich app is really great and it’s stupidly simple to setup auto backup of your phone camera.

  • JASN_DE@feddit.de
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    Always remember: RAID is not a backup.

    Having only one backup and the server dying means you now have no backup, therefore the 3-2-1 scheme for backups is worth looking into.

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

      I wouldnt never do raid with only 2 disks, it doesnt seeem safe tbh, 3 disks min (2 disks as backup)

      • rentar42@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Raid 5 with 3 drives survives one dying disk. Raid 1 (mirroring) with 2 disks survives one dying disk. if either setup loses two disks all the data is gone.

        When you run 3 disks then the odds of two failing are higher than if you run 2 disks.

        So 3 disks are not significantly safer and might even be worse.

        That being said: both setups are fine for home use, because you’ve set up real backups anyway, right?

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

          its little money vs time you spent on it (backups are almost always missing something)

  • Emma_Gold_Man@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 year ago

    For a privacy friendly OS, surprised nobody has mentioned Freedombox

    It’s designed explicitly for your use case, along with an easy path to other self hosted services. When you’re ready for more than it offers through the web interface, it’s a full Debian install under the hood - so you can install whatever you need to. Privacy friendly and super stable, with smooth upgrades to new releases and security updates for old versions several years after the new one is available.

    As far as hardware, your old computer is probably more powerful than a Pi and can support more drives, but the Pi will be more power efficient. As others have mentioned, if you care about your data long term then backups are a must, so a separate NAS or a Pi with a large drive for backup storage is a good idea as well, whatever OS you choose.

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

    If you want something that works without you fretting with the base system too much, and gives you a decent GUI to handle the base: Proxmox. Run VMs, run containers on said VMs, and experiment as much as you would like.

    I will personally not be doing this (I plan to run Alpine as my base instead of Debian, even though I hold the latter in very high regard), automate provisioning with Ansible, and exclusively use Podman instead of Docker. I’m willing to go through the pains of not using Docker directly, but at least I’m not learning how to run everything on k8s (which is not a bad idea at all, but for most homelabs without HA, it’s overkill).

    Learn networking, learn container orchestration, learn GNU/Linux (or in my case, non-GNU/Linux - yes you plebs, musl is good) security, auth basics, UNIX permissions, general automation, and give yourself time.

    Also, do not become the family system-admin without having a fair bit of experience doing this already. You don’t want the homelab becoming a job, which means getting to fix it at your own schedule, not when Jellyfin is broken and Wifey is bearing down on you because you cancelled Netflix in favour of your Linux ISO-powered library.

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

    Micro PC, install Linux. External nas. Or mini-pc with builtin nas.

    Nextcloud is a good platform for hosting self cloud stuff. You might want a fixed ip, or other method to route if wanting to use out of home.

  • space@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 year ago

    Personally I prefer older PCs in standard formfactors. I avoid HP, Dell, Lenovo pre-builts because they use proprietary power supplies and motherboards, making them difficult to upgrade. Laptops aren’t really upgradable, they don’t have enough SATA ports, and USB isn’t reliable enough for storage. Raspberry Pies, while power efficient, are too underpowered. Old server hardware is also an option, but they are generally too noisy.

  • Evil_Shrubbery@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    A cheap used PC with a Ryzen 9 or something? Ez to maintain, very power efficient, especially when idling (compared to servers, not Pi), and you get to choose the important bits (like what new enterprise level disk you gonna buy, etc) as its easier to upgrade.

    And you get a lot faster CPU than duo Xenon builds in the same price range (used ofc). What you don’t get is ECC & more RAM lanes.

    Also much easier to make it inaudible (or like 18~19dB?) compared to servers.

    I do use a Pi-based Proxmox Backup server.

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

        I don’t (and it depends on where you live). But R9s have been around for quite a bit, maybe try looking for a 4~5 year old 3900x (or 5900x), you get 12c/24t.

        But it’s not like 7 (8c/16t) series lacks power for a home lab. Really depends on what you wanna do with it. Even a low powered Celeron is plenty for some cases.

        (I am taking about used PCs)

        • Froyn@kbin.social
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Must not be my neck of the woods (US). You mentioned the Pi, which is in my wheelhouse of “cheap”. Personally I’ve got a couple computers picked up from the local community college for $10 running TrueNAS and Proxmox.

          My Google-Fu couldn’t find an R9 3900X for under $200, just the chip, used. I had hopes you had a better source I was missing out on.

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

            That suxs … but I was thinking 500~700 moneys. And spending some time to look/wait for a good deal. Still I think a Ryzen 3 or 5 (from 22xx onward) is a better investment especially at the beginning when you are perhaps still figuring out what to do with your home lab (and even basic things like not having your HDDs over USB lane). But you have the right idea - opportunities like those 10$ PCs is what I was talking about.

            If I assume RPi 4 or 5 are at about 100 moneys (+ a decent case + maybe with an m.2 hat) - I was just trying to say that a used PC at that price offers much more. RPis are great tho, I’m glad they exist.

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

                My RPi v1.0 (doesn’t even have the mounting holes) is piholing/sinkholing for my parents for about 10 years now.

                It’s getting replaced by two servers soon-ish (main and backup - also as a second location for my servers), but I might just keep it running as a secondary device. Bcs by now it’s tradition.

                Also I never got around to getting it a case so it’s just dangling by the ethernet cable all this time.

  • plague-sapiens@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    For a small pocket and low power consumption but incredible performance I would recommend the Odroid M1. Add a cheap nvme drive for the os (I prefer debian) and a 2,5" hdd. On top of debian you can install OMV for a webui based linux home server control. DietPi is nice for beginners too. And like other ppl already said, you can use docker/podman for running your software.

    Oh and don’t forget the 3-2-1 backup rule. 3 Backups, 2 different media types (ssd, hdd, usb stick, cloud, …) and 1 offsite backup (cloud or hdd at your friend’s house).

    • Fahad@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Thank you for the info. I wasn’t aware of the 3-2-1 backup rule until now.

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

    Go for a used small form factor PC. They usually have a decent amount of house power and can house many drives