I have been self hosting since about 2015. It is probably something I could say is a decision that I regret the least and have enjoyed the most. When I say regret the least I mean it has been a rewarding endeavor for me and has given me much value since I started using it. I want to share my history of self hosting, what my setup is now, and my thoughts on why you should do so yourself. If you want to skip the personal stories, you can go here
Where I began
To quickly recap my history prior to self hosting, I started using Ubuntu 13.04 when I started learning more about computers. I started using Linux to prep for my college education, since I found one of my upcoming courses in my first year of my cyber security program I would learn Linux, and I saw it was something I could get a head start on.
What started my desire to self host was a need I found I had with my school work. I would work on my laptops and desktop and wanted easy syncing access between my devices for my school work. I conveniently had a Raspberry Pi 1B at the time and thought to set up Syncthing on it so I could sync my school work. So, I set up Raspbian 7 on it, installed Syncthing and let it do its magic.
That did well for about a year. At that time I began to think "gee, I sure would love to synchronize calendars and contacts between my phone and computers". This was in 2016. I was about to hop onto ownCloud, but around that exact same time that I was playing around with it, the split to Nextcloud happened. I already knew how to do a LAMP stack at the time. I had done it dozens of times to learn how to build simple servers, normally setting up Wordpress and not doing much with it. I had also purchased a Pi 2 around that time, then set up Nextcloud 9 with the Raspberry Pi and had a 32GB flash drive plugged in. I stopped using Syncthing at the time and used Nextcloud’s syncing instead and utilized its WebDAV support to handle syncing calendars and contacts with my iPhone and Thunderbird client.
I had a great time running Nextcloud. In fact, I’m still running the same database that I started out with with Nextcloud 9 in 2016. Eventually, I introduced the idea to my family, and they liked it. So in the nature of me using more files and letting my family use Nextcloud with me, I got the Nextcloud Box that came with a 1TB hard drive. I got an upgrade from my 32GB flash drive then, woohoo!
From Pis to Towers
I ran my Pi server for quite some time. However, I wanted to do more. Just having a Nextcloud box in my house wasn’t enough. I wanted to try out different things. Also the Pi wasn’t keeping up with my use. I actually didn’t stick with the Nextcloud Box too long. After 4 months I got an HP Proliant ML110 G6 off eBay for $110. I upgraded it to 16GB and switched to Ubuntu Server 16.04. I wanted to also increase storage, so I got some refurbished (mistake #1) enterprise HDDs so I could do LXD containers and ZFS to mirror the disks and "jail" off my services.
I set up a bunch of random stuff. I made a website for one of my classes with just HTML, CSS, and a little JS, moved Nextcloud over, got into running Plex, samba server, and some other stuff I forget.
Changing Hardware to Changing Operating Systems
I was really digging my setup. Ubuntu 16.04 was great, I really loved the simple command line interface for LXD, ZFS was running solid and I loved the data protection and easy disk mirroring it offers. However, by July of 2017 I was wanting to switch operating systems. At that time there were murmurs of Canonical starting an IPO. I didn’t like the idea of my OS being dictated by the mandates of meeting quarterly earnings and becoming less and less community focused (granted, it probably wasn’t all that much to begin with). I really liked my LXD/ZFS combo. Nobody in the Linux distro community was quite as bold as Canonical for offering an easy way to run ZFS, and nobody was offering LXD.
At that point, the thought struck me. I had the opportunity to talk with Allan Jude and Rodney Grimes at a Linuxfest a few times. I remembered each time I’d talk to these two gentlemen they’d blow my mind with how much they knew. Clearly they were leagues ahead of me. Being one of the uppermost Linux gurus in my classes (and really, the rest of the Linuxfest folks advertising their stuff on more of a social merit than a technological one), I felt like I had never come by people so smart when it came to operating systems. Sure there were other booths of geniuses, but no one talked tech like these two. At that time, I investigated FreeBSD. I found out pretty quickly that FreeBSD offered better ZFS integration, and iocage was an excellent replacement for LXD. In fact, a lot of the commands were very similar.
Note
|
Don’t use iocage. It’s dead. You can read my older article on how I do FreeBSD jails now |
I put FreeBSD on an extra computer, set up identical jails and tried it out. After a month of playing around, I didn’t feel fully comfortable with FreeBSD yet, but it felt like the replacement for me. It fit my needs exactly. So, I went through the process of reinstalling the OS on my main server and rebuilding everything on the new installation, and restored data from backups to get Nextcloud back and running among my other content.
More New Hardware!
Around 2019 my demands grew larger with my home server. I wanted to start virtualzing operating systems, and for some reason my processor would not virtualize. It was time for an upgrade. I found myself an HP Z440 with a 6 core Xeon and 64GB DDR4 ECC for $300! Wow! I moved my drives over aaaaand failed to boot. My old system was doing a traditional BIOS boot and the new server was an EFI system. So I had to reinstall. I think that time I had used the chance to upgrade to 12.0 or whatever the latest FreeBSD was.
Finally, last year I wanted to upgrade from my 120GB drives to 500GB so I could do more and utilize the speed. I bought new drives and made some big changes.
Rearranging My Jails and Data
In my initial setup, I made the mistake of putting my jails on my hard drives and lumped it in with my data. I found out pretty quick it is not fun to couple jails and data. Sure, you can. But I was starting to like the idea of thin and thick jails and utilizing ZFS mounts better. At the same time I also got 2 more 4TB drives. I was going to take my old 2 and existing 2 and do a striped mirror of sorts, but I don’t have 6 SATA connectors and I wanted my system on the new stuff. So I detached a drive, turned my pool into a raidz1, and built my jails on my SSDs, then copied my data to new datasets on my raidz1 zpool.
When I was done I had my jails on my SSDs, started making VMs to put on the SSDs, and had my data separated on my drives. This made managing much more flexible.
Where Am I At Now?
Now, in the current time I have the same existing setup, however, I moved away from iocage. Like I said earlier in a note, I changed how I did jails and switched to FreeBSD’s built-in management. This works out just fine for my own server use. There are great tools out there such as Bastille BSD, but I wanted basic tooling. Bastille is very advanced for the simple stuff I do.
I also have my network set up with some fun gear. It is still a work in progress though. In January of last year I install OpenBSD 6.8 on my router and made my first OpenBSD router, having switched from pfSense. Today, I have upgraded that router to 7.2 and it has been great. It is running on a PC Engines APUc4. The 3rd port isn’t used. I intend to learn vlans on OpenBSD and FreeBSD and break out my jails and VMs more, since it has too much access to my home network as it is.