The Joys of Self-Hosting
To the surprise of probably nobody, I am not a huge fan of corporations, especially when it comes to the internet. For decades I have been self-hosting - first on my own dsl line, then by renting one in a small server farm. This allowed me to own my email, webpages, network file storage and many other things.
I am also not a huge fan of social networks, with twitter being probably the only one I really *use* (as in: I am there from time to time). Recent advancements on the matter (i.e. the acquisition of the platform by a certain billionaire) made me look for an alternative - and that is how I rediscovered Mastodon. To little surprise, the technology has matured in the past years, so I decided to host my own instance of it and become part of the *fediverse*.
I used Ubuntu 20.04 and followed the online documentation, with small tweaks here and there:
- sadly Ruby 3.1 did not work, so I had to install recommended 3.0 locally with `rbenv`
- Mastodon 4.0.2 ditches `live` directory, so paths in the startup scripts needed to be changed
- I installed it outside of `/home`, so paths in default startup scripts were incorrect
- because of node 18 and its issues with old versions of open ssl, an extra parameter must be provided: `RAILS_ENV=production NODE_OPTIONS=--openssl-legacy-provider bundle exec rake mastodon:setup`
- I use Apache, so the default `ngix` setup was useless - setting up proxy to puma worked
- all hosts are blocked by default in Rails, hence I needed to add `config.hosts << "localhost"`
- static files are served by Rails, but the config says otherwise, so I needed to set `config.public_file_server.enabled = true`