Having recently built a new gaming desktop, I still had enough components that weren't reused to decide what to do with them. I'd also been meaning to build some sort of server setup for a while, so it proved a good opportunity to convert my old desktop into a server. In the coming weeks, I'll post a couple more posts detailing my software setup but for now I'll go over my goals and hardware.
So what did I need a home server for anyway?
I've used a number of solutions for this over the years. Dropbox had been my goto but late last year they dropped support for filesystems other than ext4 which was a wake up call to investigate other options. While they've since relented, it was during this time I discovered Syncthing which took my interest. As someone who likes to have control over their data, its nature as a P2P tool appealed to me. This meant that my data no longer had to leave servers I control for sync.
This was especially relevant because of my setup for password management. I've never been entirely happy entrusting my passwords to a third party service like LastPass, but wanted the benefits of a password manager. This meant that I used a keepass database in Dropbox for syncing passwords between devices, on the grounds that someone would have to both breach Dropbox and break KeePass's encryption to obtain my passwords. But I still wasn't entirely happy having my passwords on a cloud service. In addition, the Android experience just was not there, as the best I could do was open the dropbox copy in KeePassDroid which was a one way export and occasionally expired meaning I'd have to log in again to access the passwords again. It also ruled out using a password manager password on Dropbox itself.
Syncthing ended up being a very useful tool to replace Dropbox, and I'd tried it out with a couple of use cases. I moved my password database sync to there, and my RPG rulebook PDFs. However, there was one area it fell down, and that was syncing between my desktop and my tablet for files which both modified, such as my password database.
Because it was P2P and had no persistent host, to sync my password database required my tablet to be awake and my desktop to be on at the same time, which was a rare occurence. As such my password database ended up getting out of sync and having merge conflicts which need to be resolved. I tried using my phone as a always-on sync host for that folder which worked a bit, but it would often take a while to sync because of the phone being asleep or killing the syncthing app when low on resources.
This meant that I needed an always-on host to ensure that all devices had somewhere to sync that would keep changes from getting too divergent. I could just run syncthing on my VPS, but that puts me back with the Dropbox scenario of having to entrust someone else (linode) with my password database. And as my VPS was internet facing, the risk of compromise is much higher.
I have a variety of content I've ripped from physical media or stripped DRM, as well as from sources like Bandcamp artists that simply aren't on streaming services over the years. Sometimes I would like to watch or listen this away from my desktop such as on my tablet which doesn't have the capacity to store much. This meant when I wanted to watch some movies in bed for the evening that were not available on any of my subscribed streaming services, I had to copy them manually onto my device each time. Which usually meant I didn't watch them over whatever was on Netflix at the time.
My backup strategy over the years has been varying levels of existent. Most recently it has consisted of putting code into private gitlab repos and other highly important files into Dropbox. This protected me against hard drive failure for the covered content, but there was other content (Twitch stream archives, aforementioned ripped movies) which was just too large to economically store in Dropbox. Also as people would be rushing to mention on a similar post, Dropbox is not really a backup - it's online and if compromised, someone could encrypt my Dropbox files with ransomware in the event of a breach and the client would dutifully overwrite my local copies.
The other issue was that I wanted something easier to restore. While I could get back to a working system without anything too major lost in the event of a hard drive failure or similar, when actually put to the test it was a painful experience. While I did get back to a working system, the time spent restoring applications, their configs, games with mods etc. left a lot to be desired. All this content could be pulled back from the internet, but I wanted something a bit more "restore from backup, be back like nothing happened".
While this whole project may not be most people's idea of fun, but it'd let me play around with technologies that I didn't often use, which I always find interesting.
As previously mentioned, I had built a new gaming desktop so most of the hardware for this actually are parts from my previous desktop. So my system composed of the i5-4670k, 16gb of DDR3 RAM and gigabyte z87 motherboard used in my old system. In addition, when it was my gaming system, the storage setup was a bit of a mess. It had started out simply enough with a 256GB SSD + 2TB HDD, but as it was serving part time duty as a file server already, it had grown to 2 SSDs (a 256 gb 840 Pro and 1TB 850 Pro). 2x2TB HDDs and 2x4TB HDDs (All WD blue drives). Most of these were formatted with NTFS as that worked best for drives shared between Linux and Windows. Also, when I upgraded my GPU to a GTX 1080, I actually had to remove most of the drive bays to fit the GPU, with the result that one of the SSDs was just loose in the case.
As it turns out, having a wall of HDDs in your gaming desktop is not great for airflow.
So the plan was the new gaming desktop is much simpler from a storage perspective. It has a new 1TB 970 Pro SSD for the Windows/boot drive, as that's where X-Plane 11 lives and is the most IO-heavy use, and the 1TB 850 Pro also went to the new build to be my Linux root drive.
Everything else stayed in the old build. In addition, moving the gtx1080 to my new system let me put the drive trays back in. So now the system has the 840 Pro SSD as the boot/OS drive, and 2x2TB + 2x4TB of hard drives for storage.
While it had been used as my gaming desktop, the i5-4670k had been overclocked up to 4.3ghz, but as part of this setup that was reversed for reasons of heat and power consumption - the server uses weren't demanding enough to require the overclock to stay, as this had mostly been done for the purposes of running X-Plane 11 at an acceptable framerate.