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.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install 302df9c6-381e-11f1-9bc6-00163e2b0d79 --target codexStages files first; activation requires review of the staged README and plan.
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.
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.
How to use
- Choose a hosting approach: join an existing server at joinmastodon.org, or self-host using Docker or the official installation guide on a VPS.
- For self-hosting, deploy with Docker Compose. Configure your domain, email delivery (SMTP), and object storage for media files.
- Set up moderation rules, customize your instance branding, and open registration. Your server automatically federates with the rest of the Fediverse.
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.
Related on TokRepo
- AI tools for content — Tools for creating and managing social media content
- Self-hosted tools — Other platforms you can run on your own infrastructure
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
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.
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.
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.
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.
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)
- Mastodon GitHub— Mastodon is a decentralized social network using ActivityPub
- Mastodon Documentation— Federation with ActivityPub-compatible platforms
- W3C ActivityPub— ActivityPub is a W3C standard for decentralized social networking
Related on TokRepo
Discussion
Related Assets
Diaspora — Federated Social Network You Own and Control
Privacy-aware decentralized social network built on the federation model. Users choose a pod or host their own, retaining full ownership of their data while communicating across the global Diaspora network.
Lemmy — Federated Link Aggregator for the Fediverse
Self-hosted, federated link aggregation and discussion platform compatible with ActivityPub, offering a decentralized alternative to Reddit.
PeerTube — Federated Video Platform You Control
A decentralized and federated video hosting platform that uses ActivityPub and WebTorrent. PeerTube lets anyone host their own YouTube alternative while connecting to a network of instances.
Misskey — Federated Social Platform with Rich Media and Customization
Feature-rich, ActivityPub-compatible social networking platform with reactions, drive storage, antenna feeds, and extensive theming options.