The journey of my HomeLAB
I didn’t know what a HomeLab was before I strumbled upon r/homelab; seeing all that consumer-grade hardware run several services at home, on our drives, without the invasive eyes of the tech giants with their questionable privacy policies made me feel like I needed a one as well.
But first, what do I need?
Before I start messing with computers and cables, what do I need?
A NAS: can we really say a homelab is a homelab without a NAS? A VPN allowing me to access other services without the need to actually expose them over the Internet Home automation and home surveillance services A local DNS which will let me and others access the server without inputing the IP address here and there A blog (this one!). Do I really need it? No. Is it fun? Hell yea. A Netflix-like alternative for streaming movies and TV series wherever I am A privacy-respecting alternative to Google Photos Dynamic DNS service. Like most people I have a dynamic public IP and I need to dynamically link a name to it.
Okay. Seems like a lot of hardware is needed.
One old laptop I already had as the main server and a custom-built NAS is everything I need.
Linux OSs and the other software I installed is really efficient. I have never seen RAM usage exceed 2.5GiB, not even under heavy AI-powered face recognition load, despite having 8GiB at its disposition. CPU-wise, a third generation laptop-grade i5 might not be the fastest CPU, but it’s what I have and to be honest it never disappointed me. Another big advantage of a laptop as a server is that it’s designed to consume very little electricity. The laptop pulls only 20W with two 1080p Jellyfin streams
I also needed a NAS and obviously I couldn’t use the laptop for the four 2,5″ spare disks I wanted to install. I could have bought an off-the-shelf NAS and call it a day, but no, I decided to build one from scratch. A NAS is not more than a computer in a case designed for hot swaps. Often these computers are equipped with low-end smartphone CPUs and not more than a couple of gigabytes of RAM. Why not creating something way more powerful, way more customizable, way more secure with the same price of a entry-level Synology? I documented everything in this video (in Italian). Surprisingly I was able to find a case which can hold up to six 2,5″ or four 2,5″ + one 3,5″. It’s what I needed since I had a lot of spare 2,5″ disks. They are not NAS-grade but I don’t care. They will not be spinning 24/7/365. Time to think about the software
On The server
I installed Ubuntu Server, but any Linux distribution would have been the same, really. I just preferred something headless to save on memory. After installation I gave it a static LAN IP and it’s ready to serve.
For the services I listed above I think there’s nothing better than using containerized applications: they won’t mess with the underlying OS nor with one another and will make backing them up easier. I chose CasaOS as the web-interface for managing Docker applications. Looking back, I’d have chosen something else such as Portainer. CasaOS works well but it’s not as advanced as Portainer. Will make the switch soon.
The Docker applications I installed are:
WireGuard easy for the VPN: it allows to manage the VPN server with a couple of clicks. I just need to install WireGuard on my main computer and on the smartphone, open the port on the router and I can access the homelab remotely! PiHole for the DNS server: not only it allows me to create A Record DNS names (chose server.lan and nas.lan) but it does not resolve URLs associated with ads and malware, essentially creating a network-wide uBlock Origin. JellyFin as my media server. Dumped my Movie collection I definitely bought into a folder on my NAS mounted via NFS on the server and it works flawlessly. I rarely watch something but I just think it’s cool to be a mini Netflix in town. HomeAssistant for home automation tasks. The only smart object I have is a RGB light bulb. It feels lonely in HomeAssistant but I plan to add Zigbee sensors in the future. Frigate NVR in order to be able to access the RTSP stream of the cameras I have at home. Supports AI recognition but I have it disabled: it’s too heavy on any CPU and needs a dedicated NPU processor. Maybe in the future I will buy a Google Coral. WordPress, serving the content you’re seeing here. Immich: a Google Photos alternative. It’s amazing. Its AI performs face recognitions and object detections (I can look for photos of a specific person or search “cat” and the pictures of my cat will show up) which I find really helpful. The Android app automatically backs up my pictures. As the Dynamic DNS service I chose duckdns. It’s just free. It’s not a Docker nor a proper application. I just set up a cronotask updating .duckdns.org every 5 minutes with the public-facing IP address.
On The NAS
Software-wise I’ve been a bit unlucky at the beginning with my NAS. The CPU is a 2016 Celeron (note that I bought it this year, in 2024) and I found out it does not work well with TrueNAS: I first tried TrueNAS Scale but it kept crashing. I am still not sure if it was the lack of sufficient RAM (I have 8GiB, the minimum advised for) or an incompatibility with the CPU. Tried to install TrueNAS Scale but it just won’t install. I tried my luck with OpenMediaVault and it’s perfect, I even like it more than TrueNAS.
I split the space this way:
1x 250GB for the OS 2x 500GB BTRFS Mirror 2x 1TB ZFS Mirror
For a total of a mere 1,5TB usable. I say mere because on the internet people casually have 100TB or 20PB of available storage at home, but I don’t have much to store so it’s okay for me.
Why did I use BTRFS and ZFS? Just for fun. As much as I understood there is no much difference between the two for my use-case.
A WiFi setup
If it’s the first time you read about an entire homelab in WiFi, well, it’s my first time too.
The laptop has WiFi capabilities already so I had no issues with it. Regarding the NAS I have two options:
If I don’t require anything too network-intensive I connect a USB WiFi dongle to it as it’s the fastest way. Had to compile the drivers for it which I found in a random GitHub repo but the chip just isn’t good as it’s very slow. If I need more network bandwidth I connect it, via ethernet, to a FritzBox WiFi extender.
I had no other choice but to use WiFi as the router is in another room and I don’t have a switch either. Well, as I have already said too many times: I don’t care (for now). For backups I use an external hard disk I directly connect the NAS to and 70 Mbit/s is more than enough for a couple of simultaneous 1080p video streams which are the second most network-intensive demand I have for this setup. For now, I have no complaints.