A few notes about self-hosting a fediverse account. I was interested in hosting a single-user instance and it seems like there are more or less three options:
- Honk - written in Go, kinda funky, no dependencies other than SQLite, actively developed, but looks like a mostly solo project. Can support multiple users, but seems to be mostly for a single-user use case.
- microblog.pub - written in Python, also using SQLite, has a bug tracker and a few contributors besides the original author. Single-user instance.
- GoToSocial - written in Go, compatible with Mastodon client API, supports multiple users, but is supposed to be much lighter weight. Doesn't offer its own management interface other than rendering profile web pages.
I went with microblog.pub, since it seemed to fit my needs pretty well and the maintainer was very responsive in the bug tracker (thanks @dev@microblog.pub!). After setting it up, it uses ~200MB of RAM, almost no CPU, and ~30MiB on disk, including the Git repo. Granted, this instance doesn't have much content to store yet. The whole setup process took me a couple of hours, including troubleshooting some chmod mishaps, not counting tweaking CSS to my taste.
The biggest tweak I've done so far is adding EasyMDE for writing. To do that, I had to add the following lines to admin_new.html
template:
<link rel="stylesheet" href="https://unpkg.com/easymde@2.18.0/dist/easymde.min.css">
<script src="https://unpkg.com/easymde@2.18.0/dist/easymde.min.js"></script>
<script>const easyMDE = new EasyMDE();</script>
...and fix CSP in profile.toml: custom_content_security_policy = "default-src 'self'; style-src 'self' 'sha256-{HIGHLIGHT_CSS_HASH}' https://unpkg.com/easymde@2.18.0/ https://maxcdn.bootstrapcdn.com/font-awesome/; script-src 'self' https://unpkg.com/easymde@2.18.0/ 'sha256-x3hT41jvAyXptNPHtcnje3M0xIBPpT+PuS/HVkYn8ac='; img-src m.nevkontakte.com nevkontakte.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; connect-src 'self' https://cdn.jsdelivr.net/codemirror.spell-checker/; font-src 'self' https://maxcdn.bootstrapcdn.com/font-awesome/;"
The only feature I am really missing so far is the ability to edit posts, surely ActivityPub supports that?
#fediverse #self-hosting
@dev@microblog.pub looking forward to it, typos are my worst enemy :) I'm also curious to learn what is tricky about them? Maybe you could point me at some post or article? I won't make any promises, but if I can wrap my head around it, I could attempt to help with the implementation.
@me @dev hm...
What do you think about this article https://fightwithtools.dev/posts/writing/why-you-should-find-a-mastodon-instance
After I migrated to a new instance with the Local feed relevant to me, the whole #mastadon began to look much more interesting.
@msemochkin@pkm.social @dev@microblog.pub
That's a good take, and maybe at some point I'll do just that - who knows! For now (and maybe people will tell me I am holding it wrong), I want my account, which is my identity, to be in my control, that's the main reason for self-hosting. If Mastodon supported hosting custom domains in the same manner that, say, GitHub Pages does, I probably wouldn't have bothered with my own instance.
And I don't see how that prevents me from lurking on other instances local feeds, picking out people I'm interested in and following them so that they appear in my own feed. It's true that I don't really know which instances I am interested in right now, I know a fair few folks I am following on Twitter are @hachyderm.io or @fosstodon.org.
@me@m.nevkontakte.com Thank you! Editing support is planned, but the feature is a bit tricky to implement. It will land at some point!