|
| 1 | +--- |
| 2 | +title: "Refreshing my home server" |
| 3 | +date: 2025-02-30 |
| 4 | +tags: |
| 5 | +- Homelab |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +I have a PC that's always on. It hosts my media, my photos, my videos, my RAW files, my backups, and a few other things. |
| 10 | + |
| 11 | +Some call it a homelab, some call it a server, some call it a NAS. In the end, it's just another PC. |
| 12 | + |
| 13 | +Let's quickly review the hardware, the software, and the services I run on it. |
| 14 | + |
| 15 | +# Hardware |
| 16 | + |
| 17 | +## Processing |
| 18 | + |
| 19 | +Until now, I had two machines. One was dedicated to storage and had a very old Intel dual core CPU, |
| 20 | +the other was dual Xenon 2U server I bought from Yahoo auction for cheap. |
| 21 | + |
| 22 | +When my son was born, I got rid of the 2U server because of the noise and size. |
| 23 | + |
| 24 | +I tried moving all my apps to the storage servers but many died in the process of scaling down. |
| 25 | + |
| 26 | +Then a few months ago, [TrueNAS Scale decided to kill its services stack](https://www.reddit.com/r/truenas/comments/1djk3tb/no_updates_for_truenas_scale_apps_until_q4/) *again*, and I had to re-install everything anyways. |
| 27 | + |
| 28 | +I therefore shunked my old workstation to get a shiny **Ryzen 5800X** out and bought a new motherboard with enough SATA ports for my 6 drives. |
| 29 | + |
| 30 | +Then I discovered that some B550 motherboards don't let you use both NVMe drives *and* all 6 SATA ports. It's usually in the fine prints. |
| 31 | + |
| 32 | +So I spent hours finding another motherboard. I settled on another B550 motherboard as it sucks up 5W compared to the ~15W of the X570. |
| 33 | + |
| 34 | +It had the same issue. Written [*absolutely nowhere in the product page*](https://www.asus.com/uk/motherboards-components/motherboards/tuf-gaming/tuf-gaming-b550-plus/), with not as much as a single asterisk, my second rebuild was a failure. |
| 35 | + |
| 36 | +I got an X570 motherboard. It booted and saw my disks. I was awash with joy. |
| 37 | + |
| 38 | +## Networking |
| 39 | + |
| 40 | +While I was at it, I decided to scale up to 10G networking locally. PCIe 10G SFP+ cards are extremely cheap (<$20) and switches are not that expensive either. |
| 41 | + |
| 42 | +But getting 10G on my Macbook Pro was a pain so I settled on a mixed 2.5G/10G networking setup. |
| 43 | + |
| 44 | +And yes I max out my local network all the time as I take way too many photos of my beautiful son and backup the RAW files. |
| 45 | + |
| 46 | +It only took me 30 hours to select a switch + AP combo and deciding against getting a new router. I listened to my network engineers friends and got a Mikrotik managed switch with a Ubiquiti AP: |
| 47 | + |
| 48 | +- [MikroTik CRS310-8G+2S+IN](https://www.getic.com/product/mikrotik-crs310-8g-2s-in) |
| 49 | +- [Ubiquiti UniFi U7 Pro](https://www.getic.com/product/access-point-u7-pro) |
| 50 | +- [TP Link 2.5 PoE+ Injector](https://www.tp-link.com/jp/business-networking/accessory/tl-poe260s/) |
| 51 | + |
| 52 | +It worked... Except the switch was loud. Very loud. On my desk. In the living room. |
| 53 | + |
| 54 | +I modded it with a Noctua fan. Better. |
| 55 | + |
| 56 | +Then I realized I could have bought a cheap unmanaged switch that also had 10G SFP+ ports and 2.5G ethernet ports, but with integrated PoE and fanless... [For a quarter of the price](https://www.amazon.co.jp/dp/B0D1C5KCGJ?ref=ppx_yo2ov_dt_b_fed_asin_title). Apparently, network engineers don't look at the prices of their equipment. |
| 57 | + |
| 58 | +Networking is funny. When a specific form factor + size gets popular and chinese manufacturers start making it, prices drop like a rock. |
| 59 | + |
| 60 | +So I sold my Mikrotik switch on Mercari. For a profit, because they're very hard to find in Japan. Maybe I should become a reseller? |
| 61 | + |
| 62 | +I was ready to boot. |
| 63 | + |
| 64 | +# OS, storage, and orchestration |
| 65 | + |
| 66 | +## OS |
| 67 | + |
| 68 | +When I had two machines, I used [Proxmox](https://www.proxmox.com/en/products/proxmox-virtual-environment/overview). It worked great. |
| 69 | + |
| 70 | +Scaling down to one machine, I tried TrueNAS Scale. It was a disaster for anything that wasn't storage. |
| 71 | + |
| 72 | +So I'm back on Proxmox. The [Proxmox VE Helper-Scripts](https://community-scripts.github.io/ProxmoxVE/) repo is a big part of it. |
| 73 | + |
| 74 | +Run [PVE Post Install](https://community-scripts.github.io/ProxmoxVE/scripts?id=post-pve-install), [create a Docker LXC](https://community-scripts.github.io/ProxmoxVE/scripts?id=docker), and you're good to go. |
| 75 | + |
| 76 | +## Storage |
| 77 | + |
| 78 | +I use [ZFS](https://en.wikipedia.org/wiki/ZFS). I had to choose between: |
| 79 | + |
| 80 | +- Managing ZFS directly in PVE and bind mounting the datasets to the containers |
| 81 | + - SMB shares and [`rclone`](https://rclone.org/) get their own LXC and manual config |
| 82 | + |
| 83 | +- Using disks passthrough to a TrueNAS Scale VM |
| 84 | + - Great SMB and disk management interface |
| 85 | + - `rclone` integration |
| 86 | + |
| 87 | +I really disliked my experience with TrueNAS Scale so I went with the first option. |
| 88 | + |
| 89 | +Been working fine so far. SMB was a bit of a pain to setup but it's working. |
| 90 | + |
| 91 | +## Orchestration |
| 92 | + |
| 93 | +To manage my apps, over the years I tried: |
| 94 | + |
| 95 | +- Direct docker commands |
| 96 | +- One big docker compose file |
| 97 | +- Multiple stacks |
| 98 | +- Single node kubernetes |
| 99 | +- Actual kubernetes |
| 100 | + |
| 101 | +I knew [Docker Swarm](https://docs.docker.com/engine/swarm/) was pretty good now and I wanted to give it a shot, but then I heard of [komodo](https://komo.do/). |
| 102 | + |
| 103 | +It looked like the right level of abstraction and automation for me, so I gave it a shot. |
| 104 | + |
| 105 | +After a little bit of tweaking I got it to be work and be fully automated. I now have a `kaos-stack` private repo with my apps and any push to the `main` branch triggers a redeploy. |
| 106 | + |
| 107 | +Plus, cool interface: |
| 108 | + |
| 109 | + |
| 110 | +# Services |
| 111 | + |
| 112 | +Finally, the meat of the server. I run a few services: |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | +- [Cloudflare Zero Trust Tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) to give outside access to my apps |
| 117 | + - Setup was painless, it works great with having my DNS there, and it was an order of magnitude simpler than setting up an Nginx reverse proxy with open ports |
| 118 | +- The [`rrr` stack](https://wiki.servarr.com/) to download and manage content I can access legally otherwise |
| 119 | + - Yes I still have a Netflix subscription, I just like to have a local copy like in the good old days |
| 120 | +- [Immich](https://immich.app/) as a Google Photos replacement |
| 121 | + - I could make a full blog post of my hate for Google Photos but it is now in the adversarial design stage: it makes regular choices that makes it *worse* for its users |
| 122 | + - And Immich is great for videos, where I software trancode them to HEVC in the medium profile to take only a few MBs while keeping great visual clarity |
| 123 | +- [Cronicle](https://cronicle.net/) to manage my cron jobs (rclone backups, zfs snapshots, etc) |
| 124 | +- [Resilio Sync](https://www.resilio.com/sync/) to have access to all my files anywhere |
| 125 | + - Not perfect, but still better than Nextcloud Files |
| 126 | + - I'm looking for a better alternative that supports selective sync, is fast, and has a good mobile app. Maybe [SpaceDrive](https://www.spacedrive.com/) one day? |
| 127 | + |
| 128 | +As I'm moving soon, I have not setup Home Assistant again. But it's next. |
0 commit comments