If your Mastodon server is subscribed to a relay, it may pull in public posts from many other instances. This can flood your local timeline with content that is not relevant to your community. A relay subscription is a server-level setting controlled by the instance administrator. This article explains how to unsubscribe from a relay using the Mastodon admin interface and what happens after you disconnect.
Key Takeaways: Removing a Mastodon Relay Subscription
- Administration > Relays > Unsubscribe: The button to sever the relay connection from your instance.
- Relay removal is immediate: Your server stops sending and receiving public posts through that relay within seconds.
- Existing federated posts remain: Unsubscribing does not delete posts already stored on your server from the relay.
What a Mastodon Relay Does and Why You Might Unsubscribe
A Mastodon relay is a service that forwards public posts between multiple instances that subscribe to it. When your server subscribes to a relay, it sends its own public posts to the relay and receives public posts from every other subscribed instance. This can rapidly grow the number of posts in your federated timeline and local database. Administrators often subscribe to relays to quickly populate a new server with content. Over time, the relay may bring in too much noise, irrelevant content, or posts from instances that do not match the server’s rules. Unsubscribing stops this flow immediately. Only server administrators with access to the Mastodon admin panel can perform this action. Regular users cannot unsubscribe from a relay on their own.
Steps to Unsubscribe from a Mastodon Relay
Follow these steps from the Mastodon admin interface. You must be logged in as an administrator with the admin role on the instance.
- Open the Administration panel
Click the Preferences link in the navigation sidebar. Then click Administration in the sub-navigation bar. If you do not see “Administration,” you do not have admin privileges. - Go to the Relays section
In the Administration menu, click Relays. This page lists all relays your instance is currently subscribed to. Each relay entry shows its URL and status. - Locate the relay you want to remove
Find the relay URL that you wish to unsubscribe from. The status will show as “Enabled” or “Pending” if the subscription is active. - Click the Unsubscribe button
Next to the relay entry, click the Unsubscribe button. A confirmation dialog may appear. Confirm the action. The relay status changes to “Disabled” immediately. - Verify the relay is removed
Refresh the Relays page. The relay should no longer appear in the list of active subscriptions. If it still appears with a “Disabled” status, you can safely leave it — no data flows through a disabled relay.
Common Issues After Unsubscribing from a Mastodon Relay
Posts from the relay still appear on the timeline
Unsubscribing stops new posts from coming in through the relay. However, posts that were already fetched and stored in your server’s database remain visible. These posts will slowly disappear as they age out of the timeline or are removed by their original authors. If you want to remove them immediately, you can purge the relay’s cached content using the Mastodon admin tool. Go to Administration > Relays, click Clear data next to the disabled relay. This deletes all posts received through that relay from your instance.
The relay button is grayed out or missing
If the Unsubscribe button is unresponsive, the relay may have been set up using a different method, such as a direct API call or a custom script. In this case, you need to remove the relay using the Mastodon command line tool on the server. Connect to your server via SSH and run: RAILS_ENV=production bin/tootctl relays remove [RELAY_URL]. Replace [RELAY_URL] with the full relay address. This command removes the relay subscription from the database.
Other instances are still receiving my server’s public posts
Unsubscribing from a relay only affects the relay channel. Your server can still federate directly with other instances through regular federation. If you want to stop sending public posts to specific instances, you must block those instances individually using Administration > Domain Blocks. Unsubscribing from a relay does not block any domains.
Mastodon Relay Subscription States: Enabled vs Disabled vs Pending
| State | Meaning | Action Available |
|---|---|---|
| Enabled | Relay is active. Your server sends and receives public posts through it | Unsubscribe |
| Disabled | Relay subscription exists but is paused. No data flows | Re-enable or Clear data |
| Pending | Relay request has been sent but not yet approved by the relay operator | Cancel or wait for approval |
After unsubscribing, the relay status changes to Disabled. You can re-enable it later without re-adding the URL if you change your mind. To permanently remove it, use the Clear data option.
You now know how to unsubscribe from a Mastodon relay using the admin panel or command line. Check your federated timeline a few hours after unsubscribing to confirm the unwanted content has stopped appearing. If you manage a busy server, consider using domain blocks instead of relays to control exactly which instances your server federates with. A useful next step is to review your instance’s domain block list and add any relay-related domains that you want to exclude entirely.