Published on 2020-09-05
Edited on 2020-09-06
Categories:
tech
Tags:
selfhosting
100DaysToOffload
The workday today ended with my friend and work buddy telling me it’s about time he own and centralize his data (for him, wife and kids).
I’ve had servers since the 90s, so obviously I had solutions for him :P
Like mine, he and his family use a variety of devices at home, phones, laptop, desktop.
The two obvious choice to self host your data are:
While Syncthing is great for smaller data sets, it requires to share the same data set at least on 2 machines. When you have terabytes of data, it becomes not practical.
So this post is about running your NAS. A NAS offers multiple ways to access your data like NFS, Samba, SSH/SFTP, WebDav and more. How to setup your NAS is beyond this post, and will possibly be the topic of a future post.
There are two main track for running your own NAS at home:
Here are some reasons to choose a store bought NAS appliance:
Some minuses:
Some pros:
Obvious cons:
My family would find it obvious that I suggested my friend to build his own :D
Some things you should plan for:
My setup:
Lets start with some definitions.
RAID is a way to describes different arrays of drives to achieve increased capacity, or redundancy, or both.
Here are some important ones:
My favorite RAID, RAID 10. Cost / Gig is so low these days that it’s less of a problem these days.
I’ve been playing with two main setup:
I won’t into the details of each, both are great and my favorite is ZFS. It’s not more complex than LVM / EXT3/4 and it gives additional features like snapshots, and easy replication.
Here you have plenty of options:
I’ve tried my own, OMV and FreeNAS. With ZFS support, solid feature set, and stability, FreeNAS is my go to OS for my NAS.
To install it, you have to boot the installation image, install the OS on your OS drive, then configure your ZFS pool and data volumes.
When you plan for a NAS you must also consider backup:
You need both local and remote backups to be resilient to lightning, flood, someone stealing, or just your own mistakes.
For local backup, you can setup ZFS snapshots. ZFS snapshots are taking a “picture” of your files at a given time. Some of my ZFS volumes have daily snapshots, some have hourly snapshots and I usually keep them for one month.
ZFS Snapshot + RAID 10 gives me a relatively fast recovery time in case of issues or failures.
You can either buy hosting for your backup, which is relatively slow, could be costly, and could have transfer limits. If you have of data to backup, both speed and possibly cost will become an issue.
The other option is to host a low power machine with enough drives to get your data. I currently have an old core 2 duo running at my parents place. I run daily ZFS snapshot replication which copies my snapshots to the remote server every day. The worst I can loose is one day of data.
Now my friend needs a remote backup solution, so we both agreed to host each other’s backup. For this, he’ll send me a large drive, and I’ll send him one too (and decommission my old server at my parents place). Since I want to keep my data to myself, I will most probably use Borg backup to backup and encrypt my latest ZFS snapshot, and send this over to my friend’s NAS.
You also may have a friend or family member who can host an old server, and maybe share the cost.
Once your NAS is setup, you can add other distribution services, like NextCloud, plex/emby, airsonic (music), or calibre (books). You can run all of these on FreeNAS if you have enough RAM/CPU.
Your NAS does not have to be that powerful, if all you have is documents and some pictures, a raspberry pi or similar is enough. If your NAS has multiple users and server lots of (large) files, it may require a bigger setup like the one describes in this post.
Setting up your own NAS is possibly the first step to own your data.
This is day 15 of my #100DaysToOffload. You can read more about the challenge here: https://100daystooffload.com.
For comments, use email or Mastodon
Don't forget to subscribe to my RSS feed!