8 min read

My Digital Nomad's Toolkit: Portable Homelab Overview

I've finally built my portable home lab to streamline the way I deal with my media data storage, backups, archives, etc. Now I can hardly hold back my excitement about it.
My Digital Nomad's Toolkit: Portable Homelab Overview
Photo by Marc PEZIN / Unsplash

I've finally built my portable home lab to streamline the way I deal with my media data storage, backups, archives, etc.

Why is that important? That's why.

Now I can hardly hold back my excitement about it.

My Homelab Use Case

I don't need a 24/7 running server. I need a thing that would run on schedule and serve my needs for file storage and backups:

  • Media files like photos, footage, etc.
  • MacOS Photos app library
  • Time machine backups
  • iPhone backups storage
  • "Useful" files archived from old laptops

I need multiuser support to be able to separate storages for family members and also some sort of a breakdown into devices, storages, etc.

There are caveats related to the MacOS time machine. It's usually advised to use a clean separate drive and the ability to limit the capacity otherwise the volume would grow insanely large.

My overall amount of data is not too big, just a bit more than 1TB, but it's already getting a bit chunky to manage.

Last but not least. I need a portable solution. Ideally, if it fits in my backpack and doesn't weigh 100kilos.

Homelab Alternatives

The first thing that comes to my mind before the building a homelab is how to avoid building a homelab by all means.

Ridiculously, but if you are passionate enough about...computers (?), there are not so many alternatives.

Data Servers
Photo by imgix / Unsplash

Why Not Just Use a Cloud Storage

First of all the MacOS time machine doesn't back up to a cloud directly.

Period.

It only works with an external drive or a network-attached storage.

iCloud Is Not a Place For Backups

Popular cloud storage like Google Drive, iCloud, Dropbox, etc. are very convenient but are usually limited in capacity to around 2-3TB, and the price per Cloud TB grows ridiculously fast.

It's because they are primarily designed for file sync and sharing. Not exactly for storing loads of data.

It's also pricey. One year of 1-2TB in a cloud is comparable to the price of a hard drive. It feels like a waste of money on data that I don't use 99% of the time. I would prefer the cheapest storage option.

Google Photos Is Not a Place For Photos

I'm not that paranoid, but I don't like the idea that any tech giant would train his neural networks on my photos. In the case of an evil-AI-ruled dystopian future world scenario, I would definitely prefer to be less visible.

Combination of Services Doesn't Work

Why not use Google Photos for photos, iCloud for documents, external drive for time machine, something else for anything else, etc.?

Been there. It's a mess.

Data is constantly changing. In an ideal world, there is only a single source of truth for it.

A copy of it.

A copy of a copy of it.

That's how data can be managed and recovered in case of a disaster.

Safety Concerns

There are 3rd party cloud storages with a backup use case in mind, like backblaze

It's invaluable but only as a part of the backup strategy.
For example: as an additional offsite backup of the main storage.

I would never trust solely all my unrecoverable data to a single cloud storage. Simply because it may shut down one day.

Privacy Concerns

I have concerns about privacy because 3rd party storage is untrusted by definition.

I would prefer to encrypt data and manage the keys myself before sending it to a 3rd party. I need a place where this magic will take place.

I'm not that paranoid (again) but that's how I feel about my personal data. I just don't allow strangers either into my house or in my data.

Why Not Just Use NAS

There is an alternative to a 3rd party cloud storage. When wise guys have plenty of data and don't wanna lose it, they use NAS.

NAS (network attached storage) is a kind of self-managed personal cloud. It's simply a computer that is used for storage purposes and is accessible via the local home network or remotely.

Photo by Claudio Schwarz / Unsplash

The common practice is to use specific enterprise-server-class disks that are capable of spinning 24 * 7 * 365. Disks are arranged in different sorts of RAID arrays with data duplication and other techniques for the sake of redundancy and higher performance.

Serious shit.

I usually try to avoid purchasing things that don't fit into a backpack. Even the most compact NAS devices are bulky and heavy almost like a normal desktop computer.

So for me, NAS simply doesn't work for portability reasons.

My Homelab Configuration

My homelab is filthy portable. Still, it gives a certain level of redundancy and infinite flexibility with simple consumer-level components.

And Yes! I'm still using the duct tape.

Hardware

Choosing between Raspberry PI and anything else I picked a mini pc.
I got a Minisforum GK41 with 4 cores Intel Celeron J4125, 8GB RAM, and 256GB SSD.

For the price of a Raspberry PI, it gives a nice case with an active cooling system, SATA and M2 interfaces, and a bunch of ports like USB, HDMI, LAN, etc.

The silicon with x86 arch also gives a bit more flexibility than ARM in terms of software compatibility. It's a bit less energy efficient than Raspberry, but also a bit more powerful.

For storage purposes, I picked a pair of 4TB external USB HDDs from Seagate.

Host OS, Virtualization, LXC Containers

My pick for the host system is the Proxmox virtualization running Debian under the hood. For the guest homelab instance, I picked one of the available LXC turnkey containers which is also Debian.

For many people including me, the home lab is a playground for experiments.
Virtualization creates an extra abstraction layer between the hardware and the server instance itself giving a lot of room for trials and errors.

It allows me to magically create instances, make snapshots, and restore everything just like it works on a DigitalOcean. I can safely play with different configurations, OS, and anything else without any risk of breaking everything.

For Proxmox host OS I have almost no custom configuration. Almost all is done on the homelab instance level. So if I need to move to another host machine for any reason, I can install it all very quickly and restore my homelab instance entirely from a backup.

Proxmox is incredibly powerful. At the same time visualization overhead with LXC containers is almost unnoticeable and runs smoothly on my minimal hardware.

Filesystem

I consider ZFS to be such an interesting piece of engineering that I couldn't resist picking it for my file storage. ZFS is the default for the Proxmox host so I picked it either.

My external HDD drives make up a ZFS storage pool with mirroring for redundnacy purposes (RAID1). ZFS pool is mounted as an external tank to the host. Then they are passed through the host and mounted right to the homelab guest instance.

ZFS has a list of downsides which is worth a separate post. Nevertheless, in my opinion, the advantages far outweigh the disadvantages.

ZFS takes the best from traditional volume management and filesystem layers. It uses a copy-on-write transactional mechanism which makes it different than traditional filesystems and RAID arrays.

Snapshots

Its copy-on-write magic allows it to make filesystem-level snapshots with checksum and data corruption checks out of the box.

In practice, it's a time machine on a filesystem level.

It's handy to make incremental backups and send them with built-in tools to an external drive or remote server for backup purposes.

Software RAID

ZFS provides redundancy features with different sorts of software RAID configurations.
There is a self-healing toolset that allows it to find and fix the consequences of a bitrot.

Datasets

Another cool feature is ZFS's datasets.

On the one hand, datasets are simply directories. On another hand, they behave like nested filesystems which you can configure separately for your own needs. Set capacity, encryption, compression, etc.

Encryption

Even though ZFS encryption is considered slower than its peers, like LUKS.

Nevertheless, I think it's nice to have native encryption on a filesystem level. ZFS is flexible here and allows to encrypt of only specific datasets with a passphrase or with an encryption key.

ZFS allows one to make encrypted snapshots and send them to the untrusted remote ZFS storage without even a need to load a key on the remote server.

Host Instance Software

Unlike many homelab enthusiasts, I'm not having dozens of software running on my server.

As I've already mentioned I don't need it 24/7 running. I make it run on schedule, typically in the evening when I need to make a backup.

For that purpose, I use a combination of power on by RTC to wake the host up
and a scheduled cron job to shut it down. It suspends containers and VMs gracefully and then shuts down the host itself.

Storage is encrypted with encryption keys automatically mounted from a USB stick. If I suddenly need to secure things up I just pull out the stick.

Homelab Instance Software

Samba

I use Samba that publishes proper directories as network drives for each user in my home network. Some of those drives are simply marked as time machine compatible.

Avahi

I use Avahi which makes the homealb instance with Samba available via .local domains.

Remote Access

Currently, my homelab is accessible only within a local home network. I just don't need remote access with my use case. It's also good from security standpoint.

How Is It Going

Initially, I had a list of concerns.

I wasn't sure that the Photos library would work on a slow external HDD over the network.

It did! Not blazingly fast, but it's ok and usable.

I wasn't sure that the MacOS time machine would work with an external network attached drive with ZFS under the hood.

It works! My biggest surprise about it was that I didn't even notice any slow-downs compared to time machine backups to an external HDD over USB.

My review: 10 out of 10.

It works exactly how I wanted it to:

  • Wakes up in the evening
  • MacBook connects to it and makes a backup in the background
  • Shuts down

I don't even need to push the time machine manually, as it connects to the homelab when it's available and does all the stuff.

Perfecto!

Further Plans

My long-term plan is to set up a proper off-site backup to be one more step further on the way to a 3-2-1 backup strategy.

I will probably run a similar node in a different location or use a 3rd party cloud storage.

I also plan to experiment with homelab instance container OS. Probably will eventually migrate to NixOS or CoreOS. I love the idea of declarative system configuration.