What is the most efficient method to set up a home server?
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?
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.
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
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
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:
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.
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.
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 :)
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.
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?
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.
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.
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.
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?
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.
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.
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.
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 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 personally think a NAS would probably be the easiest option and on top of that they are optimized for low electricity consumption, which a PC, especially when it's older is not. It makes a huge difference because it's running 24/7 for 356 days a year.
I used a PC once and didn't realize that it took always about 300 W so at the end of the year surprisingly the electricity bill was much higher than normally.
It was running https://zoneminder.com/ but idling it used almost the same amount. It was a old PC my dad saved from being thrown out at his company. It must have been from around 2002 or something.
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).
Since you're new, I'd recommend just using the old PC to start and get comfortable. Once you're sure you want to invest some money, you can either build it buy yourself something more energy efficient if you're super concerned about that.
As for the best OS, just any server OS will do. I run Rocky Linux which is a RHEL derivative, but you can also try TrueNas or anything else you want. Even Windows Server would work if you wanted to go that path.
There are many paths you can take, and which you go down depends heavily on personal preference and the desired use of your system.
You might look for a used Optiplex SFF or micro form factor PC. These can be purchased for around $100 in the US and have full fledged PC hardware which is capable of running most things. The downside here is less peripheral support for things like PCIE or internal storage.
I wouldn't recommend Optiplexes... HP, Dell, Lenovo pre-builts use proprietary parts making them a pain in the rear to work with. I recommend getting a PC made with standard parts.
Try the pi for tinkering since it will be cheaper. If you end seeing issues with performance for the usage you need you could start looking up used laptops or optiplexes.
I had some used componentes lying around so I frankesteined a server with used parts after buying some disks
I started with an old computer, then I moved to Raspberry Pi's and now in about to get rid of the last Pi since I'm replacing everting with small Lenovo or Intel PCs.
I can only speak from my personal experience. But I knew nothing about self-hosting and went with a Synology NAS over three years ago and never looked back. I essentially replaced all Google, Dropbox, Microsoft, Evernote, music/video streaming, and per-PC backup services, with one device. LOL
Yes, the initial cost up front was not cheap. Yes, the cost of getting large HDDs is not cheap. But I broke even a while ago, and I'm actually saving money by self-hosting now.
Really depends on what you have, what you're trying to store, etc, etc.
Like we need more info.
I've been running a windows desktop as my "server" for years, with a large data drive, that's backed up by Crashplan.
It stores all our phone stuff - pictures, downloads, app Backups, etc, that get their via Syncthing and Foldersync.
I'm currently in the process of switching to a Raspberry Pi to handle a few things: Tailscale (mesh network), PiHole (for home network), Syncthing. It's data drive (however I decide to do that, direct connected or some kind of NAS) will be backed up to a service like Backblaze B2 or something like it.
The power draw if that desktop is massive compared to the Pi. Granted the Pi lacks horsepower, but it should be fine for what I need it to do.
Sorry for the lack of clarification. I'm mainly into backing up personal and device data and the ability to add media through Plex. I'm also exploring the idea of self-hosting Bitwarden for password management, allowing access to data from anywhere through the internet. Although both Raspberry Pi and NAS are options, privacy concerns lead me to favour Raspberry Pi over NAS.
I think Pi will struggle with Plex. Maybe the latest version does it better, I'm not sure. Hit up a Pi forum or a Plex forum. I've seen it talked about.
There's also mini PCs, that have real graphics, but have idle power draw of maybe 10 watts. More than idle on some Pi's, but I believe RPi 4 idle is like 5 watts? 8 watts? I forget. Those mini PCs start around $100. They can run with a monitor or headless. You'll see them talked about in Plex and Jellyfin forums/communities.
For everything else, you're looking to do what I'm doing.
I just finished PiHole and Tailscale (mesh network, so all my mobile devices can now connect to home from anywhere with a transparent encrypted connection).
Bitwarden and Syncthing are next. And I'm looking to switch to dockers for this stuff.
Whatever you do, make sure you setup firewall properly and enable automatic updates for your software. People say this last part is bad advice, but I'd rather have software break from an update than get ransomware'd.