Mastodon
mastodon · Social networks
GitHub stars
50,460Awaiting first sync
No measured star history yet
What is Mastodon?
Mastodon lets you run a social network that you control, instead of relying on one company's platform. Your server still connects to people on other Mastodon servers and other ActivityPub software, so members are not cut off. Timelines are chronological with no ads, and you decide the rules and how they are enforced.
Mastodon is open-source social network server software based on the ActivityPub standard. People post text, links, images, video, audio and polls, follow accounts on any server, and read a chronological timeline without ads or ranking algorithms. Each server sets its own rules and has moderation tools, and apps connect through OAuth2, REST and streaming APIs.
Core capabilities
- Federates over ActivityPub with other Mastodon servers and compatible software.
- Shows posts in chronological order, with media, polls and content warnings.
- Includes reporting, account limits, suspensions and server-wide domain blocks.
Part of the fediverse
Mastodon servers talk to each other over ActivityPub, a W3C standard. A user on one server can follow, mention and reply to users on another, including people on other ActivityPub software such as Pixelfed or PeerTube. There is no single company at the centre of the network and no lock-in to one provider. An organisation can deploy Mastodon on its own infrastructure and still follow and be followed by users elsewhere.
- Fediverse
- ActivityPub
- Federation
- Open standards
Posting, safety and moderation
Posts can carry text, links, images, video and audio, with polls, content warnings and accessibility descriptions. The home timeline updates in real time and in chronological order. Users have private posts, locked accounts, phrase filters, muting and blocking. Moderators can mark media as sensitive, freeze, limit or suspend accounts, block whole domains and set IP rules, and webhooks can tell outside tools about moderation events.
- Timeline
- Polls
- Content warnings
- Moderation
Run it yourself under AGPL-3.0
Mastodon is a Ruby on Rails application that uses PostgreSQL as its database, Redis and Sidekiq for caching and queues, and Node.js for the streaming API. The official guide installs it on Ubuntu 24.04 or Debian 13 behind Nginx, and you need a domain and an SMTP service for email. The repository also includes Docker and docker-compose configurations, and Helm charts are kept in the mastodon/chart repository. Mastodon is released under the AGPL-3.0 licence.
- Self-hosted
- Docker
- PostgreSQL
- AGPL-3.0
Where it fits
Use cases
- 01
Give your organisation its own verified social presence
Set up a Mastodon server on your own domain so staff and official accounts have handles under that domain. Add your website to each profile's metadata fields and link back to the profile with rel="me", and Mastodon shows a verification checkmark next to the link. People on other Mastodon servers and compatible platforms can follow those accounts directly.
- 02
Moderate a community under your own rules
Handle reports from members in the admin area and apply the server's rules. Moderators can mark an account's media as sensitive, or freeze, limit or suspend an account. Domain blocks can limit or suspend whole remote servers, reject their media, and import shared blocklists as CSV files.
- 03
Build tools on the Mastodon API
Register your application with the server, since Mastodon acts as an OAuth2 provider, then use the REST API to post, read timelines and manage accounts. The streaming API pushes new posts in real time. Third-party Mastodon apps are built on the same APIs.