ScriptsApr 14, 2026·3 min read

Mastodon — The Flagship Federated Social Network on the Fediverse

Mastodon is the decentralized Twitter/X alternative powering the Fediverse. Run your own instance, federate with thousands of others, and control your own community without ads, algorithms, or a single corporate owner.

TL;DR
Mastodon lets you run your own social network instance that federates with thousands of others.
§01

What it is

Mastodon is an open-source, decentralized social networking platform. Instead of one company owning the entire network, anyone can run a Mastodon instance (called a server) that federates with every other Mastodon server and ActivityPub-compatible platform. Users on different servers can follow, reply, and share content across the network without a central authority.

Mastodon targets individuals and communities who want social networking without ads, algorithmic feeds, or corporate ownership. It is also used by organizations that need a self-hosted communication platform under their own control.

§02

How it saves time or tokens

For developers and teams building on the Fediverse, Mastodon provides a complete ActivityPub implementation out of the box. Instead of implementing the federation protocol from scratch, you deploy Mastodon and get a fully functional social network with user management, moderation tools, and media handling. The REST API lets you build bots, integrations, and custom clients without touching the server code.

For AI workflows, the Mastodon API is straightforward to automate for posting, scheduling, and monitoring social engagement programmatically.

§03

How to use

  1. Choose a hosting approach: join an existing server at joinmastodon.org, or self-host using Docker or the official installation guide on a VPS.
  2. For self-hosting, deploy with Docker Compose. Configure your domain, email delivery (SMTP), and object storage for media files.
  3. Set up moderation rules, customize your instance branding, and open registration. Your server automatically federates with the rest of the Fediverse.
§04

Example

# Docker Compose deployment (simplified)
git clone https://github.com/mastodon/mastodon.git
cd mastodon

# Copy and edit environment config
cp .env.production.sample .env.production
# Edit: LOCAL_DOMAIN, SMTP settings, S3 storage

# Build and start
docker compose build
docker compose run --rm web rails db:setup
docker compose up -d

After setup, your instance is accessible at your configured domain and federates with the global Fediverse network.

§05

Related on TokRepo

§06

Common pitfalls

  • Self-hosting Mastodon requires ongoing maintenance: database backups, media storage growth, and Ruby/Rails security updates. Budget for operational overhead.
  • Moderation is per-instance. As an instance admin, you are responsible for your users' content and must handle reports, blocks, and federation policy.
  • Email delivery is critical for user signup and notifications. Misconfigured SMTP causes silent failures where users cannot verify their accounts.

Frequently Asked Questions

How much does it cost to self-host Mastodon?+

A small instance for a few hundred users runs on a VPS starting around $10-20/month. The main cost drivers are media storage (S3 or local disk) and database size. Large instances with thousands of users need dedicated database servers and CDN for media delivery.

Can Mastodon users interact with other Fediverse platforms?+

Yes. Mastodon uses the ActivityPub protocol, which means users can follow and interact with accounts on Pixelfed (photos), PeerTube (video), Lemmy (Reddit-like), and any other ActivityPub-compatible platform.

Is there an algorithmic feed on Mastodon?+

No. Mastodon shows posts in chronological order by default. There is no algorithm deciding what you see. You see posts from people you follow, your local instance timeline, and the federated timeline from connected servers.

How does moderation work across federated instances?+

Each instance sets its own moderation rules. Instance admins can block or silence entire other instances (defederation), block individual users, or set content warnings. There is no central moderation authority across the Fediverse.

Can I migrate my account between Mastodon servers?+

Yes. Mastodon supports account migration. You can move your followers to a new server. Your old profile redirects to the new one. However, past posts do not transfer automatically.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets