Simplifying

Posted by Thomas Gideon on 6 July 2024

I decided to try to simplify my self hosting, starting with migrating my single user instance of Mastodon to a dedicated hosting provider. I enjoyed running a couple of servers myself but lately am more interested in having my own Mastodon instance rather than spending the time to keep it up and secure. Thankfully, I already use a dedicated hosting provider for a community instance I administer and was able to migrate to it without any problems.

I had been thinking about moving thecommandline.social over to masto.host for a while. I really did enjoy getting Mastodon running under Kubernetes as a learning exercise. Running the service there, however, wasn't very cost effective. I didn't enjoy stay on top of the necessary updates, either.

I run another Mastodon server, mastodon.beer that I set up originally with masto.host. I cannot say enough good things about Hugo. His service simply works and his customer support is fantastic. I knew migrating my single user server that I use to host my main account would be painless. All that being said, until yesterday I hadn't made a decision on when to make the move.

I was doing some unrelated work on my code forge yesterday. I want to rebuild my forge on an updated VPS node since kernel upgrades often don't work very well with VMs. Unlike Mastodon, I am still happy to host my own forge. Forgejo, the software I use, is far more efficient than Mastodon so doesn't cost nearly as much to run. As a programmer, I value running my own forge more than most other services, especially purely social ones like Mastodon.

I realized that to do the work on my forge, I wanted to spin up another VPS in parallel. I am using an older configuration in order to use SSH with my forge, one that relies on some host specific set up. That extra configuration is the one part of my forge I am not currently happy with. When self hosting on VMs I create and run, I prefer the simplest possible code-as-config so that I can easily rebuild anything if needed. I believe Forgejo now has a newer way to support SSH without the additional host configuration. Part of why I want to create the replacement forge in parallel first is to make sure that is right, otherwise I need to reconsider how to keep SSH support and still get everything fully up to date. I at least have been able to keep Forgejo itself on the latest stable with next to no effort thanks to docker compose.

At all events, I realized that I could migrate my Mastodon server then clean up some resources, both saving on my overall monthly hosting costs but also freeing some budget in the short term for the forge work.

I emailed Hugo yesterday simply asking some questions and sharing that I intended to do a migration. Turns out he was online and had some time so we went ahead and started moving the server. Everything went incredibly smoothly except for my poor decision to do more DNS clean up than was wise. I learned that name server records often do not expire for up to 48 hours despite the TTL value on the NS records. Safety tip: Only change your nameservers when you aren't making any other time sensitive DNS changes to make. And certainly make sure that the zones on the old and new nameservers have all the records you care about so they return consistent results for resolvers that may still have cached records longer than you expect.

Despite my misstep, the server was back online less than an hour after we started. Hugo went above and beyond, answering all my questions in addition to doing all the actual heavy lifting in the move. Even though I no longer do the low level work, I still consider working with a small provider like this self hosting. I can migrate again if I find a reason to and have a direct relationship with my provider for support that I know will lead to a better experience than I was able to muster on my own.