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.

Do I need to defederate subdomains separately too?

No. If you block the main domain, this automatically also defederates all subdomains of that domain.

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 this block accounts that already have follows or followers with my server?

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.

How reliable are ready-made blocklists?

Different blocklists have different methods for compiling them, which are usually stated next to their download links. You as admin need to judge which blocklist best suits your server. The blocklist links at oliphant.social ⧉ are a good starting point for discovering ready-made blocklists.

Typically a ready-made blocklist might be compiled through some sort of vote by a pool of admins trusted by the blocklist compiler. Minimal blocklists might demand a very high number of admin votes before adding a server to the blocklist, while broad lists might block servers even after just a few votes.

If a blocklist doesn’t state any methodology, it might not be the most reliable blocklist.

How do I keep up to date with the latest version of a pre-made list?

At the moment you have to manually upload the latest version of a pre-made list to get the updated version. However, the official Mastodon roadmap ⧉ mentions plans for an optional blocklist subscription system (MAS-139) so that this would happen automatically if you want it to.

↩ Back to the front page

Using relays, groups, directories 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 on the server 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. This discovery process on its own can be very slow to begin with, and those on new servers may sometimes be frustrated by the slowness.

However, there are many additional things that can be done to quickly build up a server’s connections to the rest of the Fediverse:

Subscribing to Fediverse groups

Fediverse groups federate content very effectively, sending everything in the group to everyone who is following the group, no matter how small their server is.

Groups can be followed by anyone, and it takes just one user following a group for that group’s entire content to be actively sent to the user’s entire server. Groups also have the benefit of being devoted to particular topics, so they will tend to only send stuff that at least someone on your server is interested in.

For lots more info on how to do this, click here to see the guide to Fediverse groups.

Following accounts from directories

There are Fediverse directory websites which list accounts on many different topics. You can use directories to discover accounts that haven’t federated with your server yet, and once you follow them their content (and all the content they share from others) will start appearing on your server.

If you’re an admin running a server on a particular topic, you could also create a special account to just follow all accounts on that topic from directories. This will pull all those accounts’ content to your server, and make it visible to everyone else on your server too.

Subscribing to relay servers on Mastodon

Server admins can speed up the process of discovering the Fediverse by subscribing to relays which push new content to their server from other servers. Once you have the address of the relay you want to use, here is how to subscribe to it:

  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.

⚠️ ANOTHER WARNING: Bear in mind 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. See the FediBuzz section below for subscribing to topic-specific relays.

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 ⧉.

Finding general relays

If you want more content pushed to your server and don’t care about the topic, there’s a list of general 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.

Hypebot

If you’re technically skilled, you can install a tool called Hypebot ⧉ which lets your server subscribe to trending topics on other servers. This means even the smallest server will see the most popular posts of the moment.

FediFetcher

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, then click the Discovery tab
  3. Scroll down to the section marked Always recommend these accounts to new users
  4. 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.
  5. 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 Preferences > Recommendations & Trends > 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

I can’t find the Follow Recommendations section!

Servers running older versions of Mastodon may have the pool editing and follow suppression at Preferences > Moderation > Follow Recommendations

It’s the same feature, it’s just been moved to a new location on newer versions of the server software.

↩ 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 want to search for a particular emoji, type a keyword or part of a keyword into the box marked Shortcode and then click the search button.

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 how your Mastodon server’s website looks using CSS

If you’re familiar with using CSS, or if you have access to ready-made CSS code, you can give your Mastodon server’s website interface a new look through 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

⚠️ Using custom CSS prevents your server’s users setting their own theme when logging in through your server’s website. In the worst cases this may cause accessibility issues, as some users rely on being able to choose either light or dark or high contrast themes. If you’re going to use the Custom CSS feature, check your users are okay with it before permanently making changes.

Is there any ready-made CSS code available?

Yes, there are pre-existing themes which can be installed through Custom CSS if you prefer. For example, there’s the lovely Tangerine theme ⧉ or the Twitter-style Bird UI ⧉.

Can I add custom CSS as a theme option from the Themes dropdown menu, so that users on my server can choose which theme they want?

Yes you can, but it’s a lot more complicated. Third party themes include instructions for this on their websites, for example the Tangerine theme has a section on how to install it as an optional custom theme ⧉. You will need more technical skills to do this and access to your server’s files. If you’re on managed hosting, ask the hosting provider if it is possible to install custom themes.

↩ 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 which filter such words automatically.

Do I need to buy a new domain if I already have one?

If you already own a domain, you can use subdomains for all of your servers. Many people put their Mastodon server on the subdomain social.example.com, their PeerTube server on video.example.com etc.

Avoid mentioning the name of the software in your domain

It’s also probably a good idea to avoid mentioning your server’s software in its domain name. For example, if you were making a Mastodon server you probably shouldn’t mention the word Mastodon in the domain or subdomain. There are many reasons why:

  • Software projects tend to change over the years, in their content, leadership or maintenance, and at some point you may prefer to switch your server to different software. It could be confusing for your users if your server mentions one kind of software but runs another.
  • Software projects sometimes rename themselves, and this too can cause confusion if your domain refers to the old name.
  • Software projects often trademark their names to prevent misuse, 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. (This isn’t a theoretical risk, this has actually happened in some cases.)

Can you provide a more detailed guide to choosing a domain name? Especially for non-technical people who haven’t done this before?

Yes, you can have a look at the Beginner’s Guide to Creating a Domain Name ⧉ over on Fedi.Tips’ sister site GrowYourOwn.Services

↩ 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 easily add a special bit of custom CSS to your server which causes image, video and audio posts without descriptions to have a red border. Here’s how to do it:

  1. Log onto your server’s website with your admin account
  2. Go to ⚙️ Preferences
  3. Go to Administration
  4. Go to Site Settings
  5. Click the Appearance tab at the top
  6. Copy the code from here ⧉ and paste it into the box marked Custom CSS
  7. Click the Save Changes button

This will still allow users to post without descriptions, but the post will have a red border if there’s no alt text.

↩ Back to the front page

Creating an isolated Mastodon server

Mastodon servers don’t have to communicate with other servers. They can be run in “Limited Federation” mode, where all other servers are blocked by default. This can be left as it is for a totally isolated community, or an “allowlist” can be introduced which allows specifically selected servers to communicate.

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

Allowlists vs Blocklists: How do they differ?

In normal mode, Mastodon servers can communicate with other servers unless the server admin blocks them. This is known as a “blocklist” system, because it depends on the admin telling their server which other servers to block.

In Limited Federation mode, it’s the opposite way around. No servers can communicate with the server unless the server admin specifically allows them. This is known as an “allowlist” system, because it depends on the admin telling their server which other servers to allow connections with.

How do I set my server to Limited Federation mode?

You’ll need to be a server admin to change your server’s federation.

If the server is on a managed hosting company, the admin will need to ask the hosting company to switch the server over to Limited Federation mode.

If the server has been set up manually by the admin, they will need to make the adjustments manually by consulting the official Mastodon documentation on federation ⧉.

Will the apps work with a server in Limited Federation mode?

The server’s website and the web apps should work fine.

There may be problems with some app store apps working with servers in Limited Federation mode. You might want to have a look at the guide linked to above ⧉ for more info on which apps work.

↩ Back to the front page

Adding user safety through Authorized Fetch on Mastodon

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.

When it is switched on, it makes all blocks more effective, including both server-level and user-level blocks. This empowers users to fight abusers and trolls more effectively, and makes the server’s own blocks more powerful too.

Which kind of posts does this affect? Can abusers see followers-only or mentions-only posts?

Posts using follower-only or mentions-only visibilities are already protected from unauthorised interaction. Authorized Fetch only makes a difference on public or unlisted posts. If you never use public or unlisted posts, you don’t need Authorized Fetch.

Please see the post visibility guide for all the kinds of visibilities that a post can be, and how to set your defaults.

I am a server admin, how do I find out more about this?

There’s an official technical description of Authorized Fetch here ⧉ and a detailed unofficial article here ⧉ which might be useful.

How to activate Authorized Fetch on Mastodon

Only server admins can activate it, so if you’re not an admin you’ll need to contact your server’s admin and ask them to do this.

The latest version of Mastodon includes controls in the graphical interface for activating it:

  1. The admin should sign onto the Mastodon server’s website or web app using their admin account
  2. Click ⚙️ Preferences
  3. Click Administration (on the left of the screen or in ☰ on the mobile site)
  4. Click Server Settings
  5. Click the Discovery tab at the top
  6. Tick the box marked Require authentication from federated servers
  7. Click Save changes

On some managed hosting services this option may be greyed out. If so, ask the managed hosting company to switch it on for you.

Why isn’t this on by default?

Authorized Fetch uses more server resources as the server has to do a lot more checks for each post to prevent unauthorised interactions. However, the costs of these extra resources may be worth it for the extra level of user safety the feature brings.

I heard this causes compatibility problems and consumes massive amounts of resources?

No, not nowadays. It consumes more resources, but not a huge amount more. There also don’t seem to be compatibility problems any more, as software has been updated to take account of servers with this option activated.

Does this stop website scraping?

No, nothing can stop scraping of public posts on a public website. However, scraping a website and copying its contents is not the same thing as interacting directly with a thread on a social network.

Compatibility with other Fediverse servers

Authorized Fetch is an official feature of Mastodon and it should work fine when federating with servers that are running Mastodon 3.0.0 or higher. It should also work with GoToSocial (which uses Authorized Fetch by default), Pixelfed, PeerTube and most other Fediverse server types.

↩ Back to the front page