Building a Server

Let's start off by going over the thing that led me to starting up my own blog again.

My home server, Tohru

The Build:
Case: Phanteks Enthoo Pro series ATX Full Tower
CPU: Intel Core i5-11400
Cooler: DeepCool GAMMAXX AG620
Motherboard: ASRock Z590 EXTREME
RAM: G.SKILL Ripjaws DDR4 3200 64GB
PSU: CORSAIR CX-M CX750M
SSD: Team Group MP33 M.2 2280 256GB & 512GB
HDD: Seagate IronWolf 4TB x4
GPU 1: PNY Quadro P2000 5GB
GPU 2: PNY GeForce GTX 1650 4GB

While they might not be server grade components they'll do just fine for a small home server. My starting goal for Tohru was media storage, backups, and remote retro gaming, all this made possible with Unraid.

Unraid has been an absolute dream, even for a first time user. There have been a few issues along the way but only due to my own ignorance. I came across Unraid after doing some research on what OS to use for home server use while I knew I wanted to use some sort of Linux distro, I had no idea which to pick. The only thing I knew is that I wanted it to be full headless operation, that's where I found Unraid. It has everything I wanted for my server and more, much more than I imagined really. Their big thing is that it doesn't use any RAID configuration rather a parity drive, so you can have less drives and more storage than you would with a common RAID setup. As I have 4x 4TB HDDs, one is used as a parity drive and the other 3 are storage, giving me 12TB of space. From my understanding (which isn't much) the parity drive has all the information of the storage drives but not the physical files which protects you from one drive loss. Another benefit is that since there is no RAID it doesn't spin up all the drives, just the ones that are needed when files are read or written, so theoretically it should prolong drive life (depending on how you set up your array shares).

Unraid first impressions:
 While I felt like I was thorough with my research into Unraid, there were some mistakes when building Tohru for it. If you look at my build you'll see that I have 2 different size SSDs, that's because I was planning on using the 256GB drive as the OS drive to install Unraid on and the 512GB for cache. I found out when going through the install documentation (after assembling the server) that Unraid doesn't actually install to any internal drive. It boots off of a dedicated USB stick and is then loaded into memory. There was my first issue but I was able to use both SSDs in a RAID 0 setup to use both drives as a single cache pool. You can set it as RAID 1 but your space is limited by the smallest drive (I do plan on upgrading to two 1TB drives in RAID 1 for safety in the future). Once I got around that it was down to setting up the BIOS such as using Intel's iGPU so I could use GPU passthrough with my other two GPUs, as well as making sure IOMMU is enabled. Other than those settings everything else were standard settings.

 Then here came some stupid issues I had while finalizing the setup. At this point I have peripherals connected for the first time set up, everything went well so I moved the tower to it's final home in my house. Ok so first boot as a headless server (which is a new experience for me) seemed to work but as I go to access the WebUI from my main PC, nothing. So I shut it down and tried again, nothing and I mean absolutely nothing. I had no power at all, panic set in, just so you know that at this time it's 2AM on a Tuesday and I wake up for work at 5:30AM. I can't just go to bed thinking that I just ruined my brand new build and I start disassembling to check for any shorts on the backside of the motherboard and any loose cables. Everything looked fine so I reset the CMOS, reconnected the peripherals, and prayed while pressing the power button. POWER! A huge sigh of relief as everything was fine, I reconfigured the BIOS and got it back to headless operation. Ok so second boot as headless again can't access the WebUI from my PC, now it's 4AM and even more determined to get this right. I did some research and not realizing that the motherboard will not fully post without a physical monitor connection (I felt really stupid) but I booted with a monitor connected then unplugged it. We are in full working order now! Finally it's time for sleep at 4:30AM (work was rough). I ordered some dummy HDMI and Displayport plugs which trick the server into thinking that there is a display connected. I also had to add them to each of the GPUs since they go idle without any display input connected.

 Now all that's out of the way it was time to start configuring Unraid to suit my use. The UI is everything you could ever want. All your system information, drive, share, and cache usage are shown and configuring any of the settings are quite straight forward.

Unraid WebUI

 One word I have to say is Docker, wow what an amazing thing this is. Installing Docker containers is so simple and there are so many apps for any type of service you can imagine. Usually with 2 clicks and some data input you're good to go with whatever app you have installed.

Docker Containers/Plugins:

Web Services;
  Cloudflare Tunnel - Allows a way around ports 80 and 443 blocked by ISP
  Cloudflare DDNS - Updates Cloudflare with my IP
  Nginx Proxy - HTTPS/HTTP Proxy Service
  DuckDNS - VPN use for remote access

Database Management;
  Adminer - WebUI for accessing databases

Blog Services;
  Ghost - You're looking at it
  MariaDB - Main container for Ghost databases

Media;
  Plex - Your own home Netflix for Movies, TV, and Music
  Tautulli - Provides stats and information from Plex
  Deluge - Torrent client

ARRs; (Tools for managing and automating media)
  Lidarr - Music
  Sonarr - TV
  Radarr - Movies
  Homarr - UI for ease of access of ARRs
  Prowlarr - Indexer Automation

Plugins;
  Nvidia Driver - Adds GPU passthrough access for containers (Quadro P2000 for Plex Transcoding)
  CA Auto Update - Auto updates containers
  Dynamix System Temp - Adds temperature to Unraid UI

 Those are the containers I've been using so far and I'm sure I'll add more in the future when the need comes along.

 One of the things that have been amazing to me are the use of the ARR containers. They allow me to search for any media and add it to my library. Let's take Lidarr as an example for how they work.

Lidarr UI

 Lidarr is for music, it will scan my current library, show me what I have from my artists, and what I don't have yet. Now if I have an artist being monitored it will automatically download any missing albums or when a new album comes out and once the files are downloaded it imports them directly into my Plex folder. You can do this for searching and adding a new artist to your library. This same thing goes for Radarr and Sonarr. I would recommend only monitoring albums or artists that you really want to keep up with or else it will add every missing file from your library to the download queue, which isn't a good thing. ARRs are great but sometimes it has issues with importing or syncing files that have improper names or files types, they are a little too strict at times but it's not often enough to be a big issue.

 My favorite thing I set up is the LunaSea app on my phone. It allows me to connect to ARRs remotely and manage my library while I'm out. This is my main use for Wireguard VPN. I've used it more than I thought I would and when someone talks about a movie, show, or artist, I just open LunaSea, add it to my library which then just does everything else for me. It's a "Oh let me add said movie to Radarr", then it's already on Plex and I can watch it when I get home. How we've come a long way wading through sketchy download sites or torrents from years past.

 With media management set up and out of the way, my next use for Tohru are virtual machines. Unraid makes this quite simple, sometimes a little extra work is needed but overall it's problem free. Easily set up CPU pinning and RAM allocation and virtual drive space (stored on Unraid cache). As of now I have a plain Ubuntu VM for use on my main PC and a Windows 10 VM for cloud gaming. Setting up Windows was a little more involved than Ubuntu was, as you need VirtIO drivers and GPU BIOS files but again, not hard to set up. The big thing about VMs on Unraid is that they are KVMs (Kernel-based Virtual Machine) which I use for Bare-Metal Hypervisors allowing me to use Tohru's hardware. Which means it can directly use my GPUs as if it's the VM's own hardware, makes it perfect for cloud gaming.

 Cloud gaming is another just insane thing we can do nowadays. My Windows 10 VM is purely just for this. With GPU passthrough allowing the VM to use my GTX 1650 as a dedicated card to run most games wtih no problem. My need for this was that I'd like to play games downstairs from the comfort of my couch but I didn't want to use my main PC for this even though it has higher specs than Tohru does for gaming, it's quite power hungry. I don't play demanding games from the VM anyway. How I have it set up now is through Steam link on my laptop connected to my living room TV and it's absolutely seamless. Now I do play some Steam games from time to time, it's really set up for RetroArch (configuring emulators were a whole issue in its own) for retro gaming. Being able to play old systems like SNES, N64, PS2 is awesome, especially sharing some of my favorite childhood games with my girlfriend and playing together. That alone has made having this server worth it for me.

 After all this we're here, with the latest addition to Tohru being Ghost. Giving me a blog once again. Ghost has so far been very nice, it's open source and they do have a Pro (paid) option for people that don't want or care for selfhosting. A review will be coming in the future once I get more familiar with its environment.

 Being new to home server use I haven't even skimmed the surface of what it can really do. It'll come with time and future needs.

Thanks for reading my brief delve into Unraid!