This is the server which will host all your private services. By private services i mean all the services that are meant to be accessed only from specific users and not by anybody from internet. These services will also need to be accessible from internet, since the same authorized users might need the services even if they are away from home.
Some examples can be:
This server only purpose is to provide those services to the authenticated users. For external access, when the users are not at home, it will be accomplished by using an external server as a reverse-gateway from internet to the home server.
Since you are hosting at home, power consumption is a concern, both for peak requirement and overall energy cost. I have ditched any enterprise-grade specific hardware to keep total power consumption down. Bear in mind that this hardware will be powered up 24/7 all year long. This has some implications:
The basic approach is to choose an old laptop and repurpose it to be a home server. This has some advantages:
But it also have a lot of drawbacks:
There are ways to overcome these drawbacks like using USB external storage or adding more wired ethernet over USB. but it's not really worth it, specially because USB tend to have low reliability. Don't get me wrong, it can be done, and i have done it for over one year and half. But it's a pain and can lead to undesired issues.
So, after spending over one year with a laptop, i upgraded to a desktop PC, midrange and the main drawback is the loss of the conveninence of a battery, which can be mitigated with a nice UPS, one designed for home use. Afterall, all you need is that nick of time required to shut off your server then power goes away.
Which hardware depends on your needs, CPU and RAM? Get as much RAM as you can, as for the CPU, whatever entry level on the market will be more than adeguate for most services. I wouldn't waste money on a GPU unless you plan to to heavy AI stuff. I choose to max out the RAM to 48Gb and stay with an Intel I9 CPU, since that's more than capable to encode on the fly multiple AV1 video streams at 1080p.
While you could buy and deploy a NAS device, i will not cover this specific topic, rather i went trough the route of creating my own NAS leveraging the home server.
First of all you should define how much space you will need. This is not easy, but keep in mind you can always expand your storage later on when the need will arise. After you have defined your storage requirements, you should also consider your budget and your server “storage capacity” because you will definitely want RAID for storage, and that means extra drives to reach your target capacity.
I prefer SSDs to mechanical HDDs due to being so much more quiet, cooler and less power hungry. After i switched off my RADI1 made of 2x6Tb spinning 3.5“ disks and replaced with a RAID5 of 4x4Tb SSDs the difference was astounding and very noticeable also from a power consumption point of view.
You need RAID storage because hardware failure is a thing, and while RAID is no backup, at least it will let you minimize your downtime to basically a simple reboot. Which RAID level to choose from?
For speed concerns, it's better to have the operating system on an SSD or even better on an NVME.
If you choose a desktop or bigger server, then you should plan to host all the disks inside it. This will make for a much more tidy approach. If your case cannot host enough disks, or you are using a laptop, then external is the only way! In this case you need to buy an external device. PCs nowadays come with various USB connectors, so i will not talk about E-SATA or other connection types, but only USB. Those are also the less expensive, and E-SATA anyway always had seriour issues with multi-disks.
A few key concepts to follow for external drives:
As i said above, USB-3 and USB-C are more than capable to sustain disk throughput and network loads, so USB will not be your bottleneck. but USB is quite unreliable, bot the protocol or bus itself, but the USB devices are usually low-quality. To ensure you have no issues over time, buy only reputable brands enclosures, do not save money on this item, and avoid RAID enclosures because i will be showing you how to leverage Linux built-in software raid, and JBOD enclosures have a better quality/price ratio.
Since laptops have limited USB ports, get only one big enclosure to fit all your drives, not many smaller ones. Prefer one which is externally powered, because they are more resilient, and buy a cheaper UPS power strip (anything in the lower end should fit) to keep the disks spinning then the occasional power outage will strike. In fact, having a laptop which will survive a blackout while the disks don't, it's not a good nor safe idea. (remember: UPS batteries will need to be replaced every year or two, do it)
ZFS is all the rage nowadays. It still has issues with Linux kernels and require not only careful approach, but also a lot of study. I prefer to stick with old consolidated Linux Software Raid and BtrFS.
The root filesystem can be left in classic Ext-4, or anything else you fancy.
You server will need to have more than one wired network interfaces (NIC = network interface card). Yes WiFi is all the rage today, but i don't recoment it for backbone critical services.
Your server will need to have:
If you cannot add enough NICs to your server via PCI-Express or similar bus, go for an USB-Ethernet adapter. In my experience, they are of very low quality and tend to bug out and die within one year of continuative usage. You have been warned.
If you need to go the USB networking route, this is where things get a bit complex because USB network cards are quite unreliable. Luckily Linux nowadays support most of existent USB network cards, but in my experience they tend to fail quite easily. Some suggestions: