I’m having trouble finding a proper starting point for self hosting, so I am curious on any resources you’d recommend, or even some build lists / pre-built devices.

What I want to do:

Important

  1. Host some applications like TinyTinyRSS, Jellyfin, GitLab, and Nextcloud which I’d want to be accessible in my home network
  2. Use the computer as a NAS to back data up and have it easily accessible on my desktop and laptop
  3. Have a piHole

Optional

  1. Access my hosted applications from outside of my network
  2. Use tools like Radarr to automatically download things from torrent lists
  3. Use it as a seedbox

The reason the last three are optional is because for that I’d have to expose the computer to the outside network, which has a whole bunch of benefits, but also a whole bunch of risks I am likely neither capable of nor comfortable with working around, so unless there’s an easy fix (number 3 might be able to be handled via a VPN?) they’re a problem for future me. For anything further I think I can just go from here once those requirements develop

I have already skimmed through some articles, watched some build guides for both NAS and home servers and honestly I just don’t know what I need, both in information, hardware, and software.

  • Should I separate the NAS and Home Server, get a separate device for the piHole, or just have all three in one?
  • What hardware would be suitable for this?
  • Should I buy something off the shelf like a mini PC (for instance an Intel NUC) or one of these fancy prebuilt NAS devices where you just need to plug in some drives or build my own?
  • Would it be smarter to go with a Linux distro as the OS, for instance Debian, or should I use something like Unraid or TrueNAS which from what I can gather make setup more convenient and even handle docker images for you?

I am somewhat comfortable with Linux and the command line and have a budget of about 1000€, but if I can get away with less that would be great, and I can also stretch higher if needed for my requirements. I am also very new to self hosting and my networking knowledge is not non-existent, but limited.

I’m just a bit lost and would love some beginner-oriented resources or direct advice, thank you!

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    14
    ·
    7 months ago

    I usually recommend beginners to start with a consumer plastic router and a regular PC as server.

    A consumer router with 16 MB of flash and 128 MB of RAM running OpenWRT will be able to do pretty much everything you need from a router including port forwarding, DNS, DDNS, adblocking (like pihole), traffic shaping etc. They can usually be found super cheap and with even better specs (flash and RAM).

    A regular PC will use off the shelf components that are cheap to buy used and easy to replace. It also lets you use regular 3.5" hdds as well as 2.5" hdds, ssds, nvmes and anything in between, and it doesn’t use USB for that, which is unreliable and prone to a million issues.

    Again you don’t need super specs for the PC either, the smallest NVME you can find for the system drive and 8 GB of RAM plus a gen 6 Intel CPU will get you started and you can probably get this used for $50.

    Use the PC for storage (NAS) and for hosting services, the router for network management, DNS and adblocking. If you know any Linux use it. If you don’t, install a ready-made tool and use that.

    Buying USB enclosures and mini-pcs limits your options and ties you to cramped, unreliable and proprietary hardware.

  • Sips'@slrpnk.net
    link
    fedilink
    English
    arrow-up
    13
    ·
    7 months ago

    I quite liked this website for when I was starting out. Learned a bunch of what was needed and recommended. Author is also host on the podcast show called Selfhosted, truly a great resource for learning too!

    https://perfectmediaserver.com/

  • Thomas@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    7 months ago

    Maybe the first question is what your budget is, both regarding money and time. For example, you could buy a pre-configured NAS from Synology or QNAP, which requires less technical skills but more money, or a home-made solution reusing used components (but fresh disks for reliability). Depending on your electricity costs, you may want to choose a low-power solution or something which you power off when not used. For storage, maybe a three-disk RAID5 is a good compromise. For backups, plain S3 cloud storage encrypted via restic is a good idea.

    • CatLikeLemming@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 months ago

      As I mentioned in the post, my money budget is around 1000€ as a target, but it extends both up and down. I can stretch if needed, but if that’s comically overkill then I’d be happy to go lower. Time budget… not too high, but also not super low. I can certainly spend a day or two setting everything up. Electricity costs are certainly a factor, power prices here were some of the highest globally, even before the extreme increases lately.

      Also thanks for the tip of the S3 backup, it’s probably a good idea to have an extra copy of important data off-site, yeah.

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    7 months ago

    My tip for saving money: buy as much as possible 2nd hand. You do not need the latest of latest gen hardware for a NAS/Homelab. This is excluding storage, and ESPECIALLY hard drives. Those you should absolutely buy new.

    As for setting it up… My recommendation is to use TrueNAS scale with either RAIDz1 or RAIDz2, giving you either 1 or 2 drives of parity, in case something fails…

    As for remote access, you can run a wireguard VPN server in a VM, allowing you to access it from anywhere, as long as you’re connected to said VPN.

    • B0rax@feddit.de
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 months ago

      Ha, interesting. I buy my harddrives second hand. They are backed up. If one fails, I swap in a new one. I don’t care if my server is down for a day. That’s what my backup Pi-hole is for.

      • Presi300@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 months ago

        My hard drives are also 2nd hand and they’ve been reliable so far, I just generally know it’s bad practice…

  • pe1uca@lemmy.pe1uca.dev
    link
    fedilink
    English
    arrow-up
    7
    ·
    7 months ago

    I can share you a bit my journey and setups so maybe you can take a better decision.

    About point 1:

    In vultr with the second smallest shared CPU (1vCPU, 2GB RAM) several of my services have been running fine for years now:
    invidious, squid proxy, TODO app (vikunja), bookmarks (grimoire), key-value storage (kinto), git forge (forgejo) with CI/CD (forgejo actions), freshrss, archival (archive-box), GPS tracker (traccar), notes (trilium), authentication (authelia), monitoring (munin).
    The thing is since I’m the only one using them usually only one or two services receive considerable usage, and I’m kind of patient so if something takes 1 minute instead of 10 seconds I’m fine with it. This is rare to happen, maybe only forgejo actions or the archival.

    In my main pc I was hosting some stuff too: immich, jellyfin, syncthing, and duplicati.

    Just recently bought this minipc https://aoostar.com/products/aoostar-r7-2-bay-nas-amd-ryzen-7-5700u-mini-pc8c-16t-up-to-4-3ghz-with-w11-pro-ddr4-16gb-ram-512gb-nvme-ssd
    (Although I bought it from amazon so I didn’t had to handle the import.)

    Haven’t moved anything off of the VPS, but I think this will be enough for a lot of stuff I have because of the specs of the VPS.
    The ones I’ve moved are the ones from my main PC.
    Transcoding for jellyfin is not an issue since I already preprocessed my library to the formats my devices accept, so only immich could cause issues when uploading my photos.

    Right now the VPS is around 0.3 CPU, 1.1/1.92GB RAM, 2.26/4.8GB swap.
    The minipc is around 2.0CPU (most likely because duplicati is running right now), 3/16GB RAM, no swap.

    There are several options for minipc even with potential to upgrade ram and storage like the one I bought.
    Here’s a spreadsheet I found with very good data on different options so you can easily compare them and find something that matches your needs https://docs.google.com/spreadsheets/d/1SWqLJ6tGmYHzqGaa4RZs54iw7C1uLcTU_rLTRHTOzaA/edit
    (Here’s the original post where I found it https://www.reddit.com/r/MiniPCs/comments/1afzkt5/2024_general_mini_pc_guide_usa/ )

    For storage I don’t have any comments since I’m still using a 512GB nvme and a 1TB external HDD, the minipc is basically my start setup for having a NAS which I plan to fill with drives when I find any in sale (I even bought it without ram and storage since I had spare ones).

    But I do have some huge files around, they are in https://www.idrive.com/s3-storage-e2/
    Using rclone I can easily have it mounted like any other drive and there’s no need to worry of being on the cloud since rclone has an encrypt option.
    Of course this is a temporary solution since it’s cheaper to buy a drive for the long term (I also use it for my backups tho)

    About point 2:

    If you go the route of using only linux sshfs is very easy to use, I can easily connect from the files app or mount it via fstab. And for permissions you can easily manage everything with a new user and ACLs.

    If you need to access it from windows I think your best bet will be to use samba, I think there are several services for this, I was using OpenMediaVault since it was the only one compatible with ARM when I was using a raspberry pi, but when you install it it takes over all your net interfaces and disables wifi, so you have to connect via ethernet to re-enable it.

    About point 3:

    In the VPS I also had pihole and searxng, but I had to move those to a separate instance since if I had something eating up the resources browsing internet was a pain hehe.

    Probably my most critical services will remain in the VPS (like pihole, searxng, authelia, squid proxy, GPS tracker) since I don’t have to worry about my power or internet going down or something that might prevent me from fixing stuff or from my minipc being overloaded with tasks that browsing the internet comes to a crawl (specially since I also ran stuff like whispercpp and llamacpp which basically makes the CPU unusable for a bit :P ).

    About point 4:

    To access everything I use tailscale and I was able to close all my ports while still being able to easily access everything in my main or mini pc without changing anything in my router.

    If you need to give access to someone I’d advice for you to share your pihole node and the machine running the service.
    And in their account a split DNS can be setup to only let them handle your domains by your pihole, everything else can still be with their own DNS.

    If this is not possible and you need your service open on the internet I’d suggest having a VPS with a reverse proxy running tailscale so it can communicate with your service when it receive the requests while still not opening your lan to the internet.
    Another option is tailscale funnel, but I think you’re bound to the domain they give you. I haven’t tried it so you’d need to confirm.

  • snekerpimp@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 months ago

    Just my opinions here:

    • I have essential services running on a separate computer, 8gb pi4 right now. Stuff like NetBoot.xyz, homepage, etc, lightweight and resource low but need to be always up. That way if your main server needs to go down, you still have those services running.

    • I have bought second hand enterprise equipment for most of the hardware I have. Basically anything with ddr4 and pcie 3 or above will crush most things you would like to do. Grabbing an intel with quick sync will help with Jellyfin, but you can add a graphics card for transcoding if you want, a quadro p2000 or higher will be fine. Building is a viable option as well, but you may spend more for less powerful but more efficient hardware.

    • software is probably the most controversial. I went with proxmox on my main server, giving me the ability to run whatever I want whenever I want. It’s not perfect, but gets the job done and has helped me learn A LOT. But flip a coin or roll a dice on what software to run as a newbie, it will all be a learning curve, and everyone will tell you why what they use is superior.

    Whatever you do, you’re not wrong. Run things that tickle your fancy and move at your pace. You’ll mess up, step back and punt a lot. Remember to backup essential data before you wipe. Have fun, and good luck on your travels.

  • acockworkorange@mander.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 months ago

    I am just starting so take this not as a recommendation but as an option. I am familiar with Linux but do not work in IT.

    I got myself a used desktop as a starting point. It can handle 2x 3.5” drives, one 2.5”, plus an NVMe. You could buy an adaptor and change the DVD drive for another 2.5” caddy, but more on that later. It came with 8GB of RAM, but it can handle 64. I spent something like $250 including cables, bolts, caddies, but not drives.

    If you watched the video, you’ll notice the CPU has video transcoding acceleration and encryption acceleration too. It comes out ahead of modern N100 CPUs being widely used for home NAS these days, and draws a minuscule amount of power while idle. Indeed, most of the idle power draw for my machine comes from the drives.

    So pros:

    • can host a decent amount of services
    • upgradable (PCIe slots and up to 4* spindles)
    • the fourth needs you to convert the DVD to a caddy, but then you need to get an expansion card to add another SATA port, but will allow you to go RAID 10 or z2/6.
    • small and mostly silent, low power draw
    • 2x M.2 slots, one for NVMe and the other for an expansion card (like a Coral TPU or Wi-Fi)
    • cheap

    Cons:

    • 3x onboard SATA ports, 3x drive bays means you’re rather stuck with RAID z1/5
    • lower reliability from a used unit
    • 1x 1 Gb Ethernet port onboard only

    For software, I’m using TrueNAS scale. It’s easy to install and configure, there’s good documentation and a support forum, can run docker containers and VMs. Lots of administration quality of life tools built in that you don’t need to build. Plus it’s Linux and I can tinker with it if the need arises.

    To get to what you want, you could install an M.2 A+E to SATA adaptor and a slim DVD to 2.5” caddy to come up to 4 drives, add memory, a multiport multigigabit NIC, an NVMe and 4 drives and you’d be set. VMs for your firewall, VPN, pihole, dockers for the rest.

  • tibi@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 months ago

    Make a plan. Think about how much storage you need, whether you need redundancy and backups, and what server applications you need to run.

    Here you also need to consider how much time you want to spend on maintenance. Premade solutions like Synology are set and forget. Using NAS operating systems mean having to do regular updates. Using just Linux is also an option if you want full control and are confortabile with the command line, but it’s more work.

    Then step 2 is getting the hardware.

    My recommended route, if you want to spend the least amount of money, is to get a 2nd hand PC, preferably not pre-built (dells and hps have proprietary parts like power supplies). A 4 core cpu from the last 10 years should be fine, and 16gb of RAM is more than enough for most applications. SFFs or MiniPCs might be ok for nvme SSDs only, but if you want hard drives, get one that has enough HDD bays. Depending on what you find, you might need to replace a few things, like the power supply or case.

    Servers are good and reliable and have nice features, like network management, redundant NICs, redundant power supplies, but are usually pretty noisy.

  • Synapse@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 months ago

    About the power of the hardware, you don’t need to worry too much. My NAS is a SBC with 6 ARM cores and 4GB or RAM. It run flawlessly all the services you’ve listed and more ! (Also, without transcoding for jellyfin).

    I don’t know if your budget includes Hard disks, but it should be plenty enough to get you an ready made NAS from Synology or other brands, that will give you an easy start with self-hosting.

    If you want to go the DIY route. Then I recommend to build yourself a small computer from a Intel N100 motherboard, or the older J5040. From there you can install Open Media Vault, or otherwise the Linux distribution you are the most familiar with, and install Docker. You can check Linuxserver.io for many guides for spinning up docker containers for all of the services you’ve listed.

  • retrieval4558@mander.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    I think the first decision to make is pre built vs DIY. The most common pre built solution would be something like Synology. You may start researching there and see if that would fit your needs, or what people do as alternatives.

    I personally built one with a similar use case and use Unraid for my OS. The other normal option is TrueNAS.

    With that budget you’ll be able to get a good result.

  • ShepherdPie@midwest.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    You don’t need to expose radarr/sonarr to the internet. Only your torrent client needs external access which would be routed through a VPN that offers port forwarding like AirVPN.

    For hardware, I’m a big proponent of DIY. A NAS is very expensive and limiting since it has a fixed amount of bays. It’s much more econonomial to buy a case that can hold a ton of drives like the Fractal Design Define series and then run your own hardware. I’d suggest 32GB of RAM, a modern i5 CPU with QuickSync (for Jellyfin), and a motherboard that has as many SATA ports as you can get. Check PCPartPicker to compare features and prices.

    To run everything, you might look into using Proxmox and then running all your stuff off that in VMs or containers.

    I’d probably keep PiHole separate since you only need a RPi3 and you don’t want your whole network to go down if you restart the server. The rest can be run off the server.

  • gramathy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    7 months ago

    Starting with a consumer NAS is a good spot, they come with a lot of upfront features that are designed to be easier to use for someone who isn’t already familiar with them. I have a synology and it did all the things you describe without issue (other than struggling with transcoding video in real time) and eventually graduated the heavier tasks like media and proper VM hosting to external secondhand mini PCs while still using the NAS as a network drive to store the data. The NAS itself includes docker and an easy to use repository browser that I use for things like pinhole or WLAN controller software, it has an onboard torrent client (which can use RSS and regex to automate downloads), and it has some other light hosting services, which it’s quite capable of. Starting with “just” the NAS and adding external devices as your use case shifts is always an option. Keep in mind that the best way of upgrading a NAS’ storage is leaving a bay open and upgrading disks one by one without having it do a “hard” rebuild from parity data, so 4 bays at least is a good starting point.

    If you want to start with just an off the shelf NAS as an all in one device I would recommend making sure it either has or can take additional RAM (no such thing as too much), an NVME cache (more optional but nice) and an intel processor (quicksync transcoding, though the low end cpus will definitely still struggle with trying to turn 4K into 1080 for a stream). I’d be willing to bet most of the consumer NAS devices will all support docker at this point and have similar built in feature sets. Some of the newer models will support onboard 2.5gbe which is nice but probably unnecessary for a single user or family.

    External access would be more of a job for your router/firewall which would use PAT to forward connections to your internal network, so that’s outside the scope of your NAS unless you’re building a true all in one box that acts as the central hub of your entire home network.

  • bbuez@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    +1 for Proxmox, has been a fun experience as there are plenty of resources and helper scripts to get you off the ground, jellyfin was the first thing I migrated from my PC, hardware encoding may give you a bit of a tussle but nothing unsolveable. Also note Proxmox is Debian under the hood, so you may find it easy to work with. I looked into unraid, it seems great if all you’re doing for the most part is storage, if you want Linux containers and virtual machines, proxmox js your bet.

    I got a small 4 bay 2U server from a friend on the cheap, 1000$ should get you relatively nice new or slightly older used hardware. Even just a PC with a nice amount of drive bays will get you started. And drives are cheap, a raid 1 setup was one of the things I did.

    In the end I’ll likely get a separate NAS rack server just to segregate functions, but as of now I simply have a Proxmox LXC mounted to my NAS drives and runs samba to expose them.

    Tailscale is a nice set and forget solution for VPN access, I ended up going the route of getting an SSL certified domain and beefing up my firewall a bit. The bit I’ve messed with it it certainly has a learning curve greater than openvpn, but is much more hardened and versatile.

    As for pihole, I’ve found AdGuard Home to be just about a suitable replacement, and can be installed along openwrt, though I have a bit of an unconventional router with 512MB of RAM so YMMV

  • robalees@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    Gonna be following this posts comments for some tips! I’m running Proxmox on an old 2012 Mac Mini which I’ve Frankenstein’d with an SSD and RAM as much as I can, the NIC is dead and I’ve resorted to USB Ethernet. I’ve not messed with exposing my server externally, I’m intrigued but also have a router with OVPN VPN network capability. I use a LXC for Plex (Debian) and a VM (Debian again) with Docker installed. Docker runs Haugene (look it up for VPN torrents), Screeps server and WikiJS. I have a Raspberry Pi 3B running PiHole, might set it up as a backup and use the Proxmox server as the primary. But I’m definitely ready for new hardware soon and I’d like to look into NAS storage, right now I’m using a rather sketch 4TB external USB drive for media (shit I don’t care about).