I was asked to write a guest post about what it is like operating a Mastodon instance and had been taking me a little while here to come up with what I could contribute back. I say that because I feel like several others could do a much better job talking about many ways of leveraging different tech stacks to run an instance. However, that may be why I want to go into some of the more, not just technical details but some hidden politics.
What is Mastodon
Mastodon is a free and open-source software used for creating self-hosted social networking services. It’s similar to Twitter(or now X), but what makes Mastodon unique is that it consists of many independent nodes or instances, each with its own rules and policies. Users can choose the node they want to join, based on their preferences. These nodes can interact with each other, forming a federated social network, which means users from different instances can still connect with each other. Mastodon is part of the Fediverse, a collection of servers using shared protocols, enabling interactions with other compatible software like PeerTube, Friendica, and Lemmy. Unlike many other social platforms, Mastodon doesn’t have ads and is supported through crowdfunding efforts. It was created by Eugen Rochko and introduced on Hacker News in October 2016.
Choosing A Niche
You could start by being just a general audience instance with no focus or niche, but then you would be just like the hundreds of other servers. So I recommend picking a niche with tons of sub-communities and interests, as your instance niche will have users talk about more than just that niche and will most likely use it as their main account because, typically, people only have one to two accounts. The niche is for helping you and your set of users get a federated timeline of like-minded folks together, as many of the other sub-communities in your niche will have users attracted to each other’s content. This helps make you stand out more, as your federation feeds will not be as much of a toss-up of nonsensical noise from a much wider net of unrelated ideas(though this will still happen over time, especially if you join relays).
Define Your Moderation Stance
One thing you should do before starting to have users join is define how you plan on handling moderation. This is very important, as some instances take on the task of being very heavy-handed with moderating their users to help shelter them from the several bad actors that exist out there. This is a good thing, as sometimes many people don’t want to see a lot of that horrible stuff the internet has to offer, and it sadly does exist on the fediverse.
Some of the other things you want to start considering right away about your moderation stances are what you will require under Content-Warnings and what you will limit being posted. This is very important, as other instances based on just those two things alone may choose to defederate your instance from communicating with its user base. It is prevalent for instances to require or encourage users to put political talk, NSFW, and mental/physical health information behind Content-Warnings. This is because the reason Fediverse so long ago gained a lot of popularity was the ability to opt-in to viewing stuff like that rather than the doom-scrolling people know today when they are not in the right headspace to view that content.
As I pointed out in the first paragraph of this section, some admins being a bit heavy-handed can be a good thing for keeping servers that don’t follow the same moderation practices as their guidelines being something to block. Instance operators have a couple of options at their disposal, which are to Block or Silence. If you are going to be an operator, please keep in mind that the Block button will prevent anyone on your instance from being able to interact with someone on that instance at all, and vice-versa as they are defederated at that point, avoiding that communication from happening. I personally only use the Block button on instances that choose not to moderate at all and allow users to harass and bully or instances that promote or allow the discussion of illegal and morally wrong things I will not speak of.
Understand Your Costs
Hosting a small instance is pretty decent. However, you must understand that your costs are not entirely tied to just how many users you have; it is connected to how active and engaged your users are. By this, I mean if you have 100 active users who follow and are followed by just a handful of users each, your activity queues will not be as busy as the same size instance with those with hundreds of followers. This is because the system is federated, and every time someone makes a post from your instance, your system now has to broadcast that post to each server that person has a follower on, and the same in reverse. You are getting those same messages on the other side as well. When someone they follow posts something new, your server has to take that incoming message and process it.
To explain this a bit better, the more messages coming and going at a time, the more processing your instances workers have to do to keep up and ensure that when that post comes in, it doesn’t get dropped into a long queue waiting to get sent or received. This happened during the massive Twitter migration; a lot of significant instances were not ready for the influx in usage, which caused big servers’ message queues to get majorly backlogged, so people started complaining, “Hey, no one has seen my post yet other than on my server? What is going on!” because they were in the queue to get sent out. The instance operators were scrambling to scale up because it was more than average, and we are not big companies, as most of us are sysadmins doing this because we are passionate about it. So scaling at the tip of a hat isn’t always fast or affordable, for instance operators.
So keeping all of that in mind, you need to make sure that you can account for how big you plan to allow your instance to get and how you plan to fund it. You can get away with running an instance on an affordable VPS from providers like OVH, Hetzner, Linode, RackNerd, etc. Don’t start with less than 2vCPU and 4 GB of Ram, and make sure you have at least 200GB of disk space, especially if you don’t plan on using object-based storage. I suggest using Object Storage for your media, as it will rack up fast as your instance downloads a copy of all attachments from incoming posts as a cache, as the other instance may have an outage or something that would disturb your user’s experience viewing a post that arrived in their feed. For object storage, OVH, Backblaze B2, and iDrive e2 are all low-cost options, but I highly recommend setting up replication to a secondary location. Also, be sure to set up routine offsite backups of your database.
Hidden Politics
The Fediverse is operated by volunteers and objectively communities of diverse people; it means there is an existing set of unspoken presidents some people have about how things should work. That leads to putting people off, and I agree it is a line I suggest treading lightly. However, it is a little bit toxic where people tend to be aggressive towards people who refuse to have similar rules around requiring alt-text on all images or tagging posts precisely how they want them to be. This can lead to some inter-instance drama where you sometimes have to try and strike some happy mediums.
There are also sometimes strong pushes for admins to band together to all block the same lists of instances; this is your choice. However, I advise against this because instances should leverage their policies on how they moderate, as I stated earlier. When groups mindlessly push the same people out, it can be their sense of bullying. I am not saying you shouldn’t block the same bad instances; apply the same scrutiny you would to any other instance rather than mindlessly following the pack. Also, remember that you are an admin over a bunch of users, and it is a good idea to listen to your user base and what they want, as your actions as an admin impact your entire user base.
Closing Remarks
My final thoughts on this are you should think long and hard before becoming an instance admin. Are you diplomatic enough to deal with the drama that can arise, and can you be ready to deal with continued costs and maintenance of keeping users’ data safe and secure? That is because while cheap VPS and some cheap object storage are only part of the equation, you must also be a good SysAdmin and keep things updated regularly for security patches, backups for hardware issues, and increased costs to scale up if you get big. Remember that users will trust you to keep their data safe, online, and reachable. With all that said, if you are going to do this still… I suggest running your instance for yourself first and see if it is for you, as several folks out there do this because they prefer to have complete control over their data. Then the only person you have to answer to is yourself.
This article, with exception of the “What is Mastodon” paragraph, was written by hack13, owner of Cyberfurz.Social