When you join a small Mastodon instance, the federated timeline may feel empty or slow. Public posts from other servers do not automatically appear on your instance. This happens because your server must first discover and fetch content from remote instances. A federation relay solves this by acting as a central hub that distributes public posts to all subscribed servers. This article explains how relay subscriptions work, how to set one up, and what to watch out for when using relays.
Key Takeaways: Mastodon Federation Relay Subscription
- Preferences > Administration > Relays: Add a relay URL to subscribe your instance to its public post stream.
- Relay auto-federation: Posts from relay-connected servers appear in your federated timeline without manual discovery.
- Moderation and filtering: Relays can bring unwanted content; configure domain blocks and media filters to control what appears.
What Is a Federation Relay and Why Use One
A federation relay is a dedicated Mastodon server that acts as a redistribution point. When a server subscribes to a relay, the relay forwards every public post it receives from its own subscribers to all other subscribed servers. This eliminates the need for each server to discover and establish a direct connection with every other server individually.
Without a relay, a small instance relies on users following specific remote accounts to pull in content from those accounts’ home servers. The federated timeline remains sparse because the instance has not yet connected to many remote servers. A relay subscription fills the federated timeline with a steady stream of public posts from many servers at once.
Relays are especially useful for new or small instances that want to feel connected to the wider Mastodon network. They also help community-focused instances that want to curate a broad but relevant feed. However, relays do not filter content by topic or language, so moderation tools are essential.
How Relay Subscription Works Technically
When an instance admin adds a relay URL in the Mastodon admin panel, the instance sends a subscription request to the relay server. The relay server adds the requesting instance to its subscriber list. From that point on, whenever the relay receives a public post from any of its subscriber instances, it forwards that post to all other subscribers. The forwarded post appears in the federated timeline of each subscriber instance. The process uses the ActivityPub protocol, specifically the Offer and Accept activities. No user action is needed after the subscription is active.
Steps to Subscribe Your Mastodon Instance to a Relay
Only instance administrators can add a relay subscription. You need admin access to the Mastodon web interface or command line. Follow these steps to enable relay federation on your instance.
- Obtain a relay URL
Find a public relay server that accepts subscriptions. Popular options include relay.example.com or relay.joinmastodon.org. Confirm the relay is active and maintained before adding it. - Log in as admin and open Preferences
Click your profile avatar in the top-right corner. Select Preferences from the dropdown menu. - Navigate to the Relays page
In the left sidebar, under the Administration section, click Relays. If you do not see this option, your user account lacks admin privileges. - Add the relay URL
Paste the relay URL into the text field labeled Relay URL. Click the Add relay button. The relay appears in the list below with a status of Pending. - Wait for relay approval
Some relays require manual approval from the relay administrator. Others accept automatically. The status changes to Approved when the connection is established. This may take a few minutes to a few hours. - Verify posts appear in the federated timeline
Open the federated timeline from the Mastodon web interface or any client. You should see public posts from servers you have not previously connected to. If the timeline remains empty, check the relay status and server logs for errors.
Additional Relay Configuration Options
After subscription, you can adjust how your instance handles relayed content. Under the same Relays page, you can enable or disable Enable media attachment forwarding. When enabled, media files from relayed posts are stored locally. When disabled, only text content is forwarded, reducing storage use. You can also remove a relay at any time by clicking the Remove button next to its entry.
Common Issues and Risks With Relay Subscriptions
Relay Overload and Performance Degradation
A relay that serves hundreds of instances can become a bottleneck. If the relay server is slow or overloaded, posts may arrive with significant delay or not at all. Your instance may also experience higher bandwidth usage and storage consumption because of the increased volume of incoming media. To mitigate this, monitor your server resource usage after adding a relay. Consider using a relay with a lower subscriber count or implementing a local media retention policy.
Unwanted or Offensive Content From Relays
Relays forward all public posts from their subscribers, including content that may violate your instance’s moderation policies. This can include spam, hate speech, or adult material. Mastodon provides domain-level blocking to filter out problematic servers. Go to Preferences > Administration > Domain Blocks and add the domain of the offending server. You can also use the Silence or Suspend actions. Additionally, enable the Filter media from unknown accounts setting under Preferences > Administration > Server Settings > Content Retention to hide media from accounts your users have not explicitly followed.
Relay Subscription Not Working After Server Move
If you migrate your Mastodon instance to a new domain or server, existing relay subscriptions do not automatically transfer. You must remove the old relay and add it again from the new server. The relay treats the new server as a new subscriber. Notify the relay administrator if the relay requires manual approval. Posts from the old server will stop being forwarded once the old subscription is removed.
Relay Subscription vs Direct Federation: Key Differences
| Item | Relay Subscription | Direct Federation |
|---|---|---|
| How posts arrive | Relay forwards public posts from all subscriber servers | Posts arrive only from servers that users follow or interact with |
| Setup effort | Admin adds one relay URL | No admin action; happens organically through user follows |
| Content volume | High volume from many servers at once | Low to moderate volume based on user activity |
| Moderation control | Requires proactive domain blocks and media filters | Easier to manage because content comes from known connections |
| Server resource usage | Higher bandwidth and storage due to media forwarding | Lower resource usage per user |
Relay subscriptions are not a replacement for direct federation. Many instances use both: a relay to populate the federated timeline quickly and direct federation for content that users specifically seek out.
Now you can add a relay subscription to your Mastodon instance and see a richer federated timeline. Start by finding a reliable public relay and adding its URL in the Relays admin panel. After subscription, monitor your server performance and apply domain blocks as needed to keep the feed relevant and safe. For advanced control, consider running your own relay server and configuring it to only accept subscriptions from instances you trust.