GW-Blog

Nonsense from the mind of Jeff Armstrong

Previous: My Thoughts on My NetUSBee
Next: Wires

Self-Hosted

Posted May 1, 2020

About a month or so ago, something odd happened. My account at Super Dimensional Fortress, or SDF, suddenly would no longer work. My password was rejected in all cases, and some externally accessible webpages that SDF hosted for me were no longer there. In fairness, I had made fun of the administrators for taking two months to mail someone a pen, and I had bitched on my podcast that they really botched the loss of the lonestar.org domain. I was pretty much done with the server once lonestar.org went dead. I'm guessing someone there got butthurt and deleted my account, a childish move for an organization that purports to support free speech.

This delightful turn of events forced me to rethink my reliance on any computer and/or service that is owned and/or operated by a third party. Horror stories about Google freezing accounts convinced me to move to another paid mail provider, and I'm quite careful about backing up the handful of VPSes upon which my income relies. However, I've been quite lackadaisical concerning my personal sites and accounts.

The easiest part of moving off of SDF to a self-hosted solution was moving my picture gallery. Everything is now hosted on a custom gallery that relies entirely on CGI scripts for everything. The code was meant to host something more closed-off, and I may still pursue that at a later time.

My blog was already self-hosted, and I decided to try cgit for some simple, fun Git hosting. All of the above are now running on a single Raspberry Pi 3 running NetBSD/aarch64.

The hard bit was to move my Mastodon account off SDF. I decided to try self-host Mastodon on yet another Raspberry Pi 3. Initially, I wanted to host everything on the single NetBSD Raspberry Pi 3, but Mastodon is quite complex. Their instructions are Ubuntu-specific, so I decided to try out Ubuntu on a Raspberry Pi 3. Most of the posts concerning hosting Mastodon talk about how it is barely able to run on a Pi 3, so I actually moved all database operations back over to the NetBSD Pi3, leaving the Ubuntu Pi3 to just struggle with the Mastodon services. The NetBSD Pi3 was barely doing anything, so it could take on any excess load.

There were some struggles to configure things. Memory on the Ubuntu Pi3 is pinned around 700MB in use at any given time, entirely consumed by Mastodon services. I had to tweak NetBSD's insanely low database connection limits and system semaphore limits to be able to use it at all (and they were laughably low...). But at this point, my Mastodon instance is chugging along in relatively stable condition. Every night, the web interface goes down, and a cron job does some cleanup because I was filling the 32GB SD card in maybe 4 days or so. Disconnecting from one of the relays I had enabled also helped.

At this point, I have a really nice self-hosted solution for everything. My obnoxious landing page is at https://rainbow-100.com/ so that anyone can navigate to this useless blog like it's 1997.

Previous: My Thoughts on My NetUSBee
Next: Wires