Photo by Christian Wiediger / Unsplash

DIY fileserver with UnRaid

DIY Jul 22, 2022

Quite a few years ago now, I was getting sick of running out of space on my computer. I'd had enough of portable hard drives, and my photo library, which included a lot of wedding photography, was growing and not having a reliable backup was becoming a concern.

I really liked the Drobo products, but they were out of my price range. Synology and Netgear were also an option, but I'm a notorious cheapskate, and while reliable storage was the goal, I was equally interested in building something myself.

The first server I built mainly was a proof of concept to see if I could actually do it and if it would be reliable. I cobbled together a bunch of old parts in a very beige box with a couple of 500GB hard drives and booted FreeNas from a USB stick.

Photo by Zane Lee / Unsplash

FreeNAS is now known as TrueNAS, and at the time, it was one of the only products that supported the ZFS file system, which meant it had some impressive redundancy features when multiple dives were installed. Also, being free made it fit my budget perfectly.

This first test server ran really well for a couple of months, which gave me the confidence to bite the bullet and buy some better parts and build a decent-sized array.

My first real build consisted of a slick-looking mini-itx case with a Supermicro motherboard. I loaded it up with four 1TB drives, giving me the equivalent of about 3TB of space with redundancy. I chose the Supermicro board because it had 6 SATA ports on board.

Lian Li Q58 – similar to the case I used

I used it for years, and it was super reliable. I had a couple of drives fail (they were salvaged for older machines), but replacing drives was a relatively easy and quick process and resulted in no loss of data. Eventually, I started running out of space, and the limited amount of RAM was impacting performance. I decided in 2016 to build a new server, and this time I wanted to take advantage of some new technologies like docker and virtual machines to run additional services, not just a basic file server.

At this time, FreeNAS had a plugin system that made it possible to install other apps (I was particularly interested in Plex), but it looked complicated, and I wanted something that looked a little more polished.

I discovered UnRaid while watching LinusTechTips videos on Youtube.

I think this was the video, demonstrating how to set up UnRaid with a VM running windows using a discrete graphics card.

UnRaid

"Unraid OS allows sophisticated media aficionados, gamers, and other intensive data-users to have ultimate control over their data, media, applications, and desktops, using just about any combination of hardware."

While not free, it is pretty affordable, and by this stage, I was more comfortable spending a little more money on the project.

unraid.net/pricing

I'd got my hands on an oldish desktop that had been used as a workstation for an animation school. It included a Gigabyte motherboard, a Core i7-3770, and 16GB of RAM. I also picked up an extra 16GB of RAM for a total of 32GBs.

I bought a new case, a Fractal Design, Define R5, a full tower case with eight easy-to-access, slide-in drive bays.

Fractal Design, Define R5

I'd acquired four 3TB drives that had previously been redundant in some other school computers, so they hadn't had much use. I also purchased an additional 4TB drive to use as a parity drive.

Unraid uses a pretty unique parity and redundancy system.

A traditional RAID5 array stripes data and parity information across a number of disks. With a single drive failure, it is possible to replace the failed drive and rebuild the array without data loss. if two drives fail, the array will likely be unrecoverable, and all data will be lost.

An UnRaid array is a group of drives (JBOD) protected by a dedicated parity drive. This configuration allows for a single drive failure to be rebuilt with a replacement drive of equal or greater size. It also means that if more than one drive fails, only the data on the failed drives is lost.

Another neat trick that this type of array has is that as long as the parity drive is the same size or larger than any of the other drives in the array, the other drives can be a combination of different sizes, and you get the benefit of the whole disk. with RAID5, all drives should be of equal size, or you only get an array that is the equivalent size of an array made up of the smallest drive.

Once created, an UnRaid array can be divided into Shares. Each share can use all of or any combination of the drives in the array. The shares can be made accessible to a network with NFS, SMB, and FTP. I had previously been using AFP, which is now deprecated.

There are lots of great tutorials online that cover installing UnRaid. Spaceinvader One's youtube channel has a lot of great content dedicated to unraid.

Apps

As I mentioned previously, I was interested in running some additional apps.

UnRaid includes Docker, a containerisation technology that makes it possible to deploy apps and server technologies in a sandboxed environment.

Once the Community Applications plugin is installed, the apps tab in the UnRaid interface provides access to hundreds of additional plugins and curated Docker containerised servers and applications.

Plex

I'd been using Plex for years, running its server on my desktops and using a RaspberryPi as a client on a TV. Plex is a free solution for organising and playing movies and TV shows stored on a network. Over the years, it has evolved into a very slick piece of software, with a mobile app and web interface that makes your media stored locally accessible remotely from anywhere. It's like a personal Netflix, with your own content on it.

Plex screenshot

I purchased a lifetime Plex Pass subscription so that I could gain access to some additional features, including TV & DVR and Chromecast support.

Installation was very easy, just click install and specify where on the server you're storing the media you want Plex to serve. All other configuration is done in the Plex web interface once you're logged in.

Nextcloud

"The self-hosted productivity platform that keeps you in control."

Nextcloud is a self-hosted productivity platform that includes file and document sharing. It's like a self-hosted google drive.

There's a web interface and a mobile app that allows for auto image uploading from your camera roll.

Nextcloud screenshot

With Onlyoffice installed, you get a very capable suite of office and productivity apps that are accessible from anywhere, very similar to Google docs or Microsoft Office 365.

You can create additional users to give your friends and family access to their own private storage space. The platform can also be integrated with other apps like Joplin, a markup-based note-taking app.

I mostly use it to create and share documents, sync my phone's camera roll and manually back up documents I don't need to always have on my laptop.

I discovered Nextcloud by watching another of Spaceinvader One's videos.

This video is the first in a series that covers the setup and installation of Nexcloud, with a reverse proxy (to access it outside your home network) and Onlyoffice.

Bookstack

"BookStack is a simple, self-hosted, easy-to-use platform for organising and storing information"

I think Bookstack is awesome! It's simple and free wiki software. It's probably not something everybody needs, but I found it a really useful alternative to the nightmare of maintaining endless piles of pdfs that people always wanted.

Bookstack screenshot

I was working in education and had been asked to create documentation for a new attendance system that had been deployed. Bookstack allowed me to create tidy, accessible, searchable and maintainable documentation.

The platform has an incredibly simple WYSIWYG text editor with basic heading levels and the usual formatting options. It now includes a bunch of embedding features for video and other media. I particularly liked the ability to paste screenshots directly into the editor, no mucking around saving and uploading.

Moodle

"Moodle LMS has a new personality and a redefined user experience that improves online teaching and learning for educators, learners and administrators."

Moodle is a Learning Management System (LMS), another app that not everyone is going to need however, in my role as a learning designer, familiarity with a range of platforms and tools is an advantage. Having my own installation means I can experiment with new integration and test delivery, instruction, activity and assessment ideas.


There are heaps of other apps available, including game servers, media applications, home automation, and a bunch of productivity and network apps and services. For the more technically minded, if something isn't available in Community Application, it might be available in docker hub, and with a bit of command-line magic, you could have it running anyway.

Key takeaways

I love mucking about with technology, and Unraid is an awesome, reliable, and affordable alternative to an off-the-shelf NAS solution. If you're comfortable putting computer hardware together or want to learn to, UnRaid is relatively quick and easy to get up and running. With plenty of tutorials to be found on youtube or in the community pages on the UnRaid website, any issues you do run into will likely have been solved and the solution provided.

I eventually repurposed the original hardware from my FreeNAS server as an UnRaid server for my dad, whose been running it for Apple Time Machine backups, and it's been running for a couple of years now with no issues.

Tags