Building a computer

2023-06-23

tech dev media

I was a real life, buck-toothed nerd when I was a child. I liked video games, didn’t play outside enough. I spent a lot of time playing around on a computer. But I never built one.

As an adult, I pay for the convenience of not having to be in one place to do computer things. I have been subscribed to Dropbox, iCloud, and many TV and movie streaming services over the years. Those are becoming less and less of a good deal, and the geeky voice at the back of mind is saying louder and louder: why not do it yourself?

For a while I had a second-hand Mac Mini with an external hard drive dangling out the back, and it was my Plex server. It did a passable job at this but there were problems. All the applications except for Plex were running inside Docker Desktop and that would just crash every week or so. I never did figure out why. The other big problem was that that single 4TB hard drive was filling up. and I didn’t really like the idea of building up a big squid of unreliable hard drives attached to an overpriced, ill-suited Mac.

Requirements

I decided that I wanted to collapse a few disparate needs into one home server:

  • Physically un-intrusive and not too loud. I do not want to be a “big server guy”.
  • A media server capable of holding and streaming a big catalog at a high resolution
  • A multi-device file syncing service like Dropbox
  • Network attached storage for large and cumbersome files
  • Backup for important files (primarily photos and documents)

There are a few non-requirements too:

  • A web server. I’ll keep hosting my web stuff on somebody else’s metal, away from my home and my ISP.1
  • An intensive course in sysadmin. I’m not trying to learn BSD from top to bottom with this and spend hours a day keeping it alive and at the cutting edge

Choices

I chose to build a compact Network Access Storage (NAS) box with a good amount of storage expandability. I chose not to buy one of the NAS enclosures from people like Synology because they seemed expensive and also I felt like trying to build something myself. I chose TrueNAS as the operating system because the internet told me it was good and because I was too cheap to pay for Unraid.

Using PC Part Picker (without which I would never have been able to do this) I put together the following list, mostly built around the tidy little Node 304 case.

  • Fractal Designs Node 304
  • ASRock B550M-ITX motherboard
  • AMD Ryzen 5 4600G
  • BeQuiet Pure Rock 2 Black CPU cooler
  • EVGA 500 W1 500W power supply
  • 2 x Corsair 8GB RAM
  • Critical 1TB M2 SSD
  • 4 x 4TB Seagate Barracuda

I decided to go AMD because I heard it was cheap and less difficult to cool. I have since learned that if you want accelerated Plex transcoding, there’s a certain range of Intel processors with integrated graphics that Plex supports to do that. That’s okay though, the CPU-bound transcoding on the AMD CPU hasn’t really struggled. I then just chose a cheap but not the cheapest cooler on PC Part Picker and that’s how I ended up with the BeQuiet. I now use the fan that came with the case, but the big heatsink from BeQuiet is still in use.

I’m still happy with the motherboard but I think I probably could have found one with six SATA connections to max out the case’s capacity for drives. I’ve bought a PCIe to SATA expansion card for another two connectors, so it’s fine. That PCIe lane is available because I’m not bothering with a GPU, by the way. The AMD chip with integrated graphics is fine. I threw a 1TB M2 drive on the board without really thinking about the fact that I should have probably used that high speed storage for some more capacity, but never mind.

Onto the actual storage. What I’ve learned is that making ZFS pool and RAID configuration decisions is really annoying. I think I made the right call for now. I have a RAID Z1 pool of those four 4TB drives for about 10TB usable storage and it’s currently about 40% full. What’s annoying though is how hard it is to expand that. I’m not smart enough to know the reason for this, but if I buy two more 4TB for those other two slots in the case, I can’t just widen the vdev to be six drives. I have to make a new vdev, at which point I may as well just make a new pool. The other upgrade path is to replace the 4TB drives in the current pool with something bigger one-by-one. Once you have all matching capacity the pool magically just increases its capacity.

Anyway, a problem for future Jack. For now, I need to be careful not to start hoarding data to fill up those 10TB just because I can. When the time does come, I’ll open up the case, add the PCIe storage expansion card, and add two drives to the empty drive frame.

Reality

The NAS is built and puttering along quite happily. It’s pretty quiet and it lives inside a well ventilated shelving unit in the living room. I could definitely forget about it 90% of the time, but I have found it very difficult to stop tinkering with it.

The SSD contains folders for syncing mine and Sarah’s important documents between devices with Syncthing. That works well and there’s a periodic job running to replicate those files to the main pool, which has more redundancy. The files are also periodically backed up to Backblaze. I haven’t really used Samba shares yes, though I have sunk some time into figuring out how to get all the file permissions right for when I do want to use some network attached storage.

I use a script called icloudpd, which makes a periodic backup of all my iCloud photos to the main pool. It’s good, but so far it only backs up my photos. I should set it up for Sarah too but I haven’t found any information on how to install the same TrueNAS Scale application twice but with different configurations. Also icloudpd doesn’t bring any nice metadata, it’s just chronologically organised folders.

Other than the media centre applications, which I’m not going to detail here, that’s basically all the box is doing. That is probably a good thing, but it’s very tempting to get it to do more and more. I spent a lot of time making first the TrueNAS admin panel available outside my network with port forwarding, and then some of the internal applications, just so I could check on them, you know? It’s a slippery slope.

I hope I’ll be bored enough of it soon to leave it alone to do its job quietly. I do not enjoy being fascinated by computer things, and luckily I am only ever fascinated by them episodically.


  1. Web hosting has been a long and winding road. I have previously served my website from a droplet on Digital Ocean, Netlify, and it now lives in Cloudflare Pages. ↩︎