Home Lab 1.0
- Published on
- Author
-
I got into a frivolous hobby over a year ago as an escape from feature flipping and AI goosefeeding at work.
At first I got a Raspberry Pi as a low stakes way to learn Linux things, but one thing led to another, and now I have a NAS, an ad-blocking DNS sinkhole, and a Linux server on my home network.
My Pet NAS
Physical electronics was always intimidating to me, so I set myself the smallest goal of using it for image storage in order to wean off 3+ subscriptions for cloud storage.
Unlike software, hardware choices aren’t easily reversible. There seemed to be 6 times the decisions to make compared to shopping for an ergo keyboard.
I probably spent 6 months reading up on whether to:
- build my own pi nas with 2 hard drives or buy a sexy nas enclosure that would work off the shelf.1
- which RAID configuration to use on the setup
- which filesystem format the hard drives (the moral question of whether to format the nas and storage partitions with btrfs, ext4, or zfs)
- the backup strategy for the setup
The resultant setup:
12 * micro SD cards I initially installed a 32-bit OS (debian-bookworm), which didn’t support Immich, so I had to re-image the other card with a 64-bit one. I’ve also heard that frequently writing to micro SD can cause it to wear out faster so it’s just nice to have a spare.- Raspberry Pi 4 Model B with 4GB RAM
- Western Digital Red Plus Internal NAS HDD 3.5” - 6TB
- Seagate BarraCuda Internal SATA 3.5” - 4TB
- Geekworm NASPi Gemini 3.5 Dual 3.5” SATA HDD NAS Storage Kit as enclosure with a 12 V 5A power supply adapter
Everything cost about ~$1000 CAD and most of it went to hard disks, which I waited til Black Friday to buy from Newegg.
Services I’m running
- Immich for photo and video storage - ufw, ufw-docker and Fail2ban for firewalling and intrusion detection - tailscale as a VPN-of-sorts for remote access from outside the home - hd-idle to spin down hard disks when they’re not in use - Prometheus to monitor system performance - Node Exporter to scrape system performance metrics - Grafana for fancy dashboards
It’s beautiful!
The Great Home Network Upgrade
I’ve been using Bell Fibre 1Gbps plan for a few years since moving to the upper beaches of Toronto. Bell Gigahub is my ISP’s router. I get 800Mbps sitting on the couch next to it.
But I was only getting 15-25 Mbps in my upstairs office with a TP-Link wifi extender.
I was only getting 12Mps in the toilet with the door closed! (╯°□°)╯︵ ┻━┻
A lot of great work happens while ruminating on the can. The speed of internet in my toilet is therefore important.
One of the major mistakes previously was setting up a Wifi extender without using ethernet backhaul to the original ISP router. That would have forwarded more of the bandwidth to the office.
So I wasn’t getting my money’s worth from my connection, and I’m not in a situation where I can run ethernet cables. I wasn’t sure how successful I would be using a powerline adapter in a hundred year old house, so I went with a set of Deco XE75 mesh hubs.
Setup 1: Bell Gigahub as the original router and Deco XE75 in access point mode
I disabled the Wifi part in the Bell Gigahub and logged in with PpPoe.
This was easier than I thought besides finding out the “MyBell” password is not the same as the one you use to log in to your Bell account, and you may have to call Bell to retrieve it.
For separation of concerns, I created a separate 2.5 GHz wifi network only for the IoT and smart home devices and put them on a different SSID and channel.
The two other TP-Link Deco Hubs form a mesh network to boost the connection in my home for future IoT projects or smart home devices.
I initially thought I could replace the Bell Gigahub with a different router I had lying around, but discovered that it has a SFP module baked in for fiber connectivity. There are some userland vlogs explaining how they’ve extracted and replaced it, but I wasn’t about to go down that rabbit hole.
The Bell Gigahub was previously able to be set to bridge mode, but this was disabled over a year ago.
With this meshnet set up, I managed to more than double the download speeds around my home and get rid of deadzones.
Setup 2: Bell Gigahub as an internet gateway and Deco XE75 in router mode
My cousin had a spare Pi 3B lying around, so we set it up to run AdGuard Home to block ads and trackers on a network level.
We changed Bell Gigahub to identify the Pi 3 on a reserved static IP, rebooted the Gigahub, and then all devices on my local network started appearing under its range.
Besides AdGuard Home, I’m running prom/node-exporter on a Docker container and exposing an endpoint to be scraped by prometheus running on the NAS to monitor the system performance.
And now FINALLY… by using Brave or Firefox with uBlock Origin, I’m not getting sponsored links on Google or Amazon, or ads in my browser.
By putting all my devices on Tailscale, I’m able to connect to them remotely on my phone without exposing them to the wider web.
Proxmox 8.4 on Tiny ThinkCentre for distro-hopping
Lenovo Thinkpads and ThinkCentre’s seem to have a loyal following in online communities and I had to find out why.
I had planned on avoiding Proxmox due to the sheer number of options it offered, but I wanted a machine to try different Linux distros on in an inconsequential way. The ability to run VMs of any Linux OS and containers to try different tools seemed to suit my needs.
I got a refurbished Lenovo ThinkCenter M73 with 16G RAM 500GB for $120 CAD off eBay. I used balenoEtcher to save the ubuntu ISO onto a USB key. Between holding down the Esc and F10 with no success, it probably took 10 tries to boot in BIOS so that I could install Proxmox on it. Apparently older machines are set to “legacy mode”. Then I realized I had to hold down the function key to invoke F10.
Sources
Bell.ca. Home Hub modem
Tek4You. Tutorial: Bell Giga Hub: Bridge Mode Setup, PPPOE Configuration with pfSense, and Essential Tips
Footnotes
-
If you spend any amount of time in tech communities, there will always be neckbeards coming out of the woodwork to tell you how stupid it is to use a Raspberry Pi to build a home server when mini PCs give you way more bang for your buck. For the most part they were right after some more months of reading and building, I think having less things to learn than more to configure overall made sticking with the hobby much easier. ↩