How to block (defederate) a server on Mastodon

Each server on the Fediverse is independent, and can choose to cut off connections to any other server if it wants to do so. This process of blocking other servers on the Fediverse is known as “defederation” or “fediblocking”.

Usually this is done for the sake of user safety, for example if another server is failing to moderate abusive behaviour, but it can be for any reason that the server admin considers important.

If you’re an admin on a Mastodon server, here is how to defederate other servers on the Fediverse:

  1. Log into your admin account on your server’s website
  2. Go to Preferences > Moderation > Federation
  3. Click Add New Domain Block
  4. Enter the domain name of the server you want to block (for example “threads.net”)
  5. From the Severity dropdown menu select Suspend
  6. Optionally add comments if you want to remind yourself why you blocked them, or if you have a public list that explains your server’s blocks
  7. Click Create Block

Once you’ve done this, your server will refuse connections from the blocked server and any follows from those servers will be removed.

These blocks work for any Fediverse server type, so you can block non-Mastodon servers as well.

Do I have to do this for every single server I want to block?

By default, blocks are done one at a time. However, you can also import ready-made blocklists which let you block lots of servers at once.

Is there a less drastic alternative to blocking?

Yes, you can choose Limit from the Severity menu instead of Suspend. Limiting (also known as Silencing) does not cut off connections, and allows follows to carry on, but it hides all posts from that server unless people are following the account that makes them.

What if I change my mind? How do I unblock servers?

To remove a domain block:

  1. Log into your admin account on your server’s website
  2. Go to Preferences > Moderation > Federation
  3. Click on the domain you want to unblock
  4. Click Undo Domain Block

If I unblock a server, will people’s follows be restored?

When an admin defederates a server, that cuts off all the follows between that server and the admin’s server.

Unblocking a server allows people to follow each other again, but it does not automatically restore follows that existed before the defederation happened. This is an important reason to consider carefully before defederating a server.

If you want to distance yourself from a server but don’t want to cut off follows, use the Limit/Silence option instead of Suspend.

↩ Back to the front page

Importing ready-made server blocklists on your own Mastodon server

Mastodon servers can choose to block other servers, and by default this is done manually one at a time. However, this can get cumbersome if there are lots of servers you need to block quickly, especially if you’re running a new server with no blocks at all yet.

To make the process easier, servers admins can import pre-written server-level blocklists from sites such as oliphant.social ⧉. Once you have a blocklist downloaded, here’s how to add it to your own server:

  1. Log in on your server’s website using your admin account.
  2. Go to Preferences > Moderation > Federation
  3. Click the Import button at the top
  4. Browse for the blocklist’s .csv file, then click Upload
  5. You will be presented with a list of servers to block. If there are servers with existing connections to your server, they will be automatically unticked. If you want to include these in the block, tick them.
  6. When you want to implement the blocklist, click Import in the top right corner of the list and click OK to confirm.

Once the list is successfully imported, the blocks will appear alongside your existing blocks. If necessary, you can remove blocks from the list just like any manually added block.

Will it block people that have already followed me, or that I already follow?

Before any blocks happen, the blocklist import process will highlight servers on the list that your server already has connections to. You will be given the option of either going ahead with blocking those servers, or leaving them off the blocklist. By default it will leave them off the blocklist, unless you choose to add them back in.

If you block a particular server, then all the follows and followers from that particular server will lose their connections to your server.

↩ Back to the front page

Using relays and scripts to quickly expand a server’s view of the Fediverse

By default, brand new Mastodon and Fediverse servers will be totally blank, with no users or posts visible at all. Searches will produce no results.

As people start signing up and posting and following accounts from other servers, the timelines and search results will start to fill up as the server starts noticing more of the Fediverse. However, this discovery process can be very slow to begin with, and those on new servers may sometimes be frustrated by the slowness.

Server admins can speed up this process by subscribing to relays which push new content to their server from other servers, or using scripts that fetch missing posts from threads and profiles.

How to subscribe to a relay server on Mastodon

  1. Log into your server’s website using your server’s admin account
  2. Go to ⚙️ Preferences > Administration > Relays
  3. Click Setup A Relay Connection
  4. Paste the URL of the relay into the box and click Save And Enable

⚠️ WARNING: Some relays are better moderated than others. Some relays may contain content that breaks your own server’s rules, or may even be illegal in your country. It’s really important to check what kind of content a relay contains before you connect your own server to it. Relays are usually based on specific servers, so you can see such a relay’s content by browsing its server’s Federated feed and reading that server’s rules.

Also, bear in mind large and general relays may fill your server with content that you mostly aren’t interested in, and use up lots of resources at the same time. Smaller, more specific relays may be much better suited to your server’s resources.

Finding general relays

There’s a list of Fediverse relays at RelayList.com ⧉. Please bear in mind the warnings above before using this list, and check that the content on the relays is suitable for your server.

FediBuzz Relay: Custom relays on specific topics

This is a new service that lets you subscribe to custom relays based on specific hashtags or specific other servers. This can greatly reduce the amount of resources required by relays, as it only sends posts that are relevant to the topics you have selected for your server. You can find out more on its website at relay.fedi.buzz ⧉.

Using scripts to fill in missing posts from profiles and threads

There’s a new tool called FediFetcher ⧉ which can be used to automatically backfill missing posts from profiles and conversation threads. It runs independently of the Fediverse server, but it needs access tokens for every user that it backfills for, so it is generally aimed at single-user servers or servers where the admin knows all the users. It also requires good technical skills for running the tool.

↩ Back to the front page

Recommending accounts to follow for new users on your Mastodon server

When a new user joins your Mastodon server, by default they are shown a list of accounts to follow. This recommendation list is drawn from two different places in the admin settings.

The first place is a manual list of accounts you want to always be recommended, which is always shown at the top of the list.

The other place is an automatic pool of accounts that are randomly recommended to new users. The pool is based on which accounts your existing users are following, but you can edit this pool if you want to remove accounts from it.

Set accounts that your server always recommends to new users:

  1. Log into your server’s website with your admin account
  2. Go to Preferences > Administration > Server Settings > DIscovery > Always recommend these accounts to new users
  3. Paste in the account addresses of the accounts you want to recommend, separated by commas. They can be accounts from your server or from other servers, as long as the account address is written in full.
  4. Click the Save changes button

Edit the random pool of recommended accounts:

  1. Log into your server’s website with your admin account
  2. Go to Moderation > Follow Recommendations
  3. To remove an account from the pool, tick the box next to it and click Suppress follow recommendation
  4. To bring an account back into the pool, click the Suppressed link at the top of the list, then tick the account you want to bring back and click Restore follow recommendation
  5. You can set different recommendation pools for different languages by clicking the For language dropdown menu

↩ Back to the front page

How to add custom emoji to your own Mastodon server

One of the most fun features of running your own Mastodon server is the ability to add custom emoji. All members of your server can use them, and they will be visible in your member’s posts that federate to other servers. You can also clone custom emoji from other servers, or block them if you see something unsuitable.

To access emoji settings, log into your server’s website with your administrator’s account, then go to Preferences > Administration > Custom emoji.

When you first log in, you will see a long list of all the custom emoji visible to your server, including your own and those of all the servers you federate with. To show just your own click the Local tab at the top, to show just those on other servers click Remote.

Adding your own custom emoji

Custom emoji can be PNG or GIF files up to 50kb in size, and can be still or animated. They can also contain transparent backgrounds. (If you want to create your own from scratch, there’s a useful guide by Laura Kalbag here ⧉.)

To add your own custom emoji:

  1. Log in with your admin account on your server’s website
  2. Go to Preferences > Administration > Custom Emojis
  3. Click the Upload button in the top right corner
  4. Add a shortcode, which is a word or words which describes what the emoji looks like. If you use several words, write them as CamelCase or with underscores separating them. Shortcodes are really important as they let blind people hear emoji through screen reader apps.
  5. Browse for the image file and click the Upload button at the bottom

Cloning emoji from other servers

To clone an emoji from another server, tick the box next to it on the custom emoji admin list, and click Copy. If you’re looking for a particular emoji on a long list, use its shortcode in the search box.

Blocking emoji from other servers

To block an emoji from another server, for example if it is offensive, tick the box next to it on the emoji admin list and click Disable or Delete.

↩ Back to the front page

Customising your Mastodon server’s appearance with CSS

You can give your Mastodon server’s website interface a unique appearance by using the Custom CSS feature:

  1. Log into your server’s website using the admin account
  2. Go to Preferences > Administration > Server Settings
  3. Click the Appearance tab and go to the Custom CSS section
  4. Add the CSS code you want in the box, then click Save Changes

If you’re comfortable editing CSS, have a look at this excellent tutorial for customsing a Mastodon server’s colour scheme ⧉.

↩ Back to the front page

What do I call my server? What kind of domain name or subdomain should I use?

When a Fediverse server is created, you have to give it its own name. This can be a domain name (example.com) or subdomain (social.example.com). People can use this server name when signing into their account on an app, or when using the server through a web browser.

The best domain names are usually short, easy to spell and memorable. You may want to avoid offensive words, as they can make it difficult to tell people about your server on other platforms. If you already own a domain, you can use subdomains for your servers.

It’s also probably a good idea to use a name that doesn’t mention the software that it is running. For example, if you were making a Mastodon server you probably shouldn’t mention the word Mastodon in the domain or subdomain. Software projects tend to change over the years, in their content, leadership or maintenance, and it may be that in the future you want to switch to a different kind of software on your server. It could be confusing for your users if your server mentions one kind of software but runs another. Alternatively, software projects sometimes rename themselves, and this too can cause confusion for your server’s users. On top of this, some software projects trademark their names and only let servers use the name if they’re running that specific software. This could make it legally difficult for your server to transition to another kind of software in the future.

↩ Back to the front page

How do I create my own server on Mastodon and the Fediverse?

There are three different ways you can make your own server on the Fediverse:

  • Easiest by far is to use a managed hosting service, where you pay a monthly fee to the hosting company and they do all the technical stuff behind the scenes, including installation, upgrades, maintenance etc. This is so easy that it allows non-technical people to have their own servers. You can find out a lot more about this by visiting my other site Grow Your Own Services, especially the section on growing your own social network ⧉.
  • A medium difficulty option is getting a VPS or home computer and installing special software intended for people who run their own servers, such as YunoHost ⧉, FreedomBox ⧉ or LibreServer ⧉. This requires some technical knowledge, especially to install the software, but after the initial set-up the process the rest is done through a graphical interface and relatively painless.
  • The most difficult option is to install and maintain everything from scratch. This demands the most technical knowledge, but also provides the most flexibility. You can find installation instructions for all Fediverse platforms in their documentation, usually on their official website. For example, Mastodon’s installation instructions are here ⧉.

Some Fediverse server types are available to set up through all three options, others may only be available by manually installing from scratch.

↩ Back to the front page

How can Mastodon server administrators automatically remind their users to add text descriptions?

If you run a Mastodon server, you can add a special chunk of custom CSS to your server which causes image posts without descriptions to have a red border.

To do this, go to Preferences > Administration > Site Settings > Custom CSS and then add the code from here ⧉.

↩ Back to the front page

Creating an isolated server on Mastodon and the Fediverse

Servers on the Fediverse don’t have to communicate with each other. They can be run as totally isolated silos if the owner wants, and some people do this to get an extra layer of user safety.

If you want to do this with Mastodon, there’s a web page with instructions and tips here ⧉ and there’s a technical description of “Limited Federation Mode” ⧉ in the official documentation.

↩ Back to the front page

“Authorized Fetch”

This is a bit technical, but there’s a little-known feature on Mastodon called “Authorized Fetch”, aka “Secure Mode”. By default it is switched off as it uses more resources and can cause compatibility problems with servers running older software.

However, if it is switched on it makes user blocks more effective, as it makes it harder for blocked people on other servers to interact with public posts from people who blocked them. (It only really helps with public posts, private posts are already protected against trolls.)

It can only be activated by your server’s administrator. It might be worth asking them if they have Authorized Fetch switched on in order to better protect their users. There’s a technical description of Authorized Fetch here ⧉ which they might find useful.

Authorized Fetch cannot be switched on from the graphical interface, it requires manually editing a certain file on the server. If a server is on a managed hosting service, the server admin can ask the managed hosting company to switch it on for them.

↩ Back to the front page