Self-host Mastodon
v4.4.28Federated ActivityPub microblogging server
- Stars
- 50 506
- Rating
- 4.0 (1)
- Ports
- 3000 (web process (Puma)), 4000 (streaming API (Node.js))
- Requires
- PostgreSQL, Redis, SMTP email delivery service
ghcr.io/mastodon/mastodonWhat is Mastodon?
Mastodon is the server software that runs Mastodon instances: an ActivityPub-based microblogging platform where every server is an independent community that still talks to all other servers, including software that isn't Mastodon. People post text, links, images, video and audio, follow anyone on other servers from one profile, and get a plain chronological home feed with no algorithmic ranking or ads. Operators get layered safety tooling (private posts, locked accounts, phrase filters, mute, block, reports and domain-level moderation), an admin CLI, optional Elasticsearch full-text search, S3-compatible media storage, delegated login through LDAP, PAM, CAS, SAML or OmniAuth/OIDC providers, and optional DeepL or LibreTranslate post translation. Apps sign in against Mastodon's own OAuth2 layer and use its REST and streaming APIs, which is what supports the wide client ecosystem as well as the first-party phone clients. To run it you need a Ruby on Rails app plus PostgreSQL, Redis and a Node.js streaming process: docker-compose against the published GHCR images, the documented source install behind nginx on Ubuntu 24.04 or Debian 13, or the separate Helm chart repository for Kubernetes. It is AGPLv3 licensed and actively maintained, with the 4.5, 4.6 and 4.7 branches all receiving patch releases.
Mastodon alternatives
KtistecKtistec is a self-hosted, open-source ActivityPub server for individuals and small groups, written in Crystal with SQLite storage and a rich web UI.CompareKtistec with Mastodon
TakahēSelf-hosted open-source ActivityPub server for microblogging with multi-domain and multi-identity support, Mastodon API compatible.CompareTakahē with Mastodon
NeoDBOpen-source, self-hosted media tracker where you log books, films, music, games and podcasts, then share reviews to Mastodon and Bluesky via ActivityPub and ATProto.CompareNeoDB with Mastodon
PostmarksPostmarks is a self-hosted, open-source bookmarking site connecting to the Fediverse via ActivityPub to interact with Mastodon and other platforms.ComparePostmarks with Mastodon
lobsters-rails-projectOpen-source, self-hosted Rails app for running your own link-aggregation and discussion community, with tags, invitations, and public moderation logs.Comparelobsters-rails-project with Mastodon
GrowChiefGrowChief is a self-hosted, open-source social media automation tool for outreach on LinkedIn and X with a REST API for n8n, Make, and Zapier.CompareGrowChief with Mastodon
mattermostMattermost is a self-hosted collaboration platform with channels, threads, file sharing, voice calls and playbooks for DevSecOps, IT service desk and incident response.Comparemattermost with Mastodon
tootiktootik is a self-hosted, open-source federated social network with a Gemini protocol frontend, interoperating with Mastodon, Lemmy, and other ActivityPub platforms.Comparetootik with Mastodon
Should you self-host Mastodon?
Mastodon scores 83/100 on selfhost.directory (how scoring works) and ranks #1 of 75 in Social Networks & Forums. It has 50 506 GitHub stars, +150 in the last 30 days.
It shipped 46 stable releases in the past year. The latest, v4.4.28, came out on 3 November 2026.
Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Ruby.
Its closest alternative on selfhost.directory is Discourse (83/100, 48 073 stars). Mastodon scores higher overall. See Mastodon vs Discourse side by side.
Features
- ActivityPub Federation
- Chronological timeline
- Content warnings
- Custom Emojis
- External authentication (LDAP, PAM, CAS, SAML, OIDC)
- Limited federation mode
- Media attachments
- Moderation and reporting tools
- OAuth2 provider
- Outgoing webhooks
- Polls
- REST and streaming API
- Two-factor authentication
Mastodon README
Note
Want to learn more about Mastodon? Click below to find out more in a video.
Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, and video. All Mastodon servers are interoperable as a federated network (users on one server can seamlessly communicate with users from another one, including non-Mastodon software that implements ActivityPub!)
More in Social Networks & Forums
Masto-FE StandaloneOpen-source, self-hosted fork of the Mastodon web frontend that runs against GoToSocial instances and keeps tokens and passwords only in browser local storage.
mbinSelf-hosted fediverse platform for content aggregation, voting, discussions and microblogging. Replaces Reddit with ActivityPub federation to Mastodon, Lemmy, PeerTube.- Minds Nostr RelayMinds Nostr Relay is a self-hostable Nostr relay server, enabling decentralized social media communication via the Nostr protocol. It supports multiple NIPs and integrates with Redis and MySQL for event storage and rate limiting.
MisagoSelf-hosted, open-source internet forum with nested categories, moderation and permissions, polls, private threads and 50+ social sign-ins.
MisskeyOpen-source ActivityPub software for running your own social network: self-hosted servers with notes, reactions, custom emojis, and roles.
MitraOpen-source, self-hosted ActivityPub micro-blogging server written in Rust, Mastodon-API compatible, with groups, polls and Monero-paid subscriptions.- MobilizonMobilizon is a federated, open-source platform for creating, sharing, and discovering events and activities. It allows communities to organize events, manage groups, and federate with other instances via ActivityPub.
MostrThis open-source, self-hosted bridge runs as an ActivityPub server and Nostr client so Mastodon-side and Nostr users can follow, reply and react across both networks.
MovimOpen-source, self-hosted web front-end for the XMPP network: chat, chatrooms, blogging, communities, stories and video calls in one interface.
MyBBSelf-hosted, open-source forum software with plugins, themes, moderation tools, private messaging and multilingual support on PHP and MySQL, PostgreSQL or SQLite.
NeoDBOpen-source, self-hosted media tracker where you log books, films, music, games and podcasts, then share reviews to Mastodon and Bluesky via ActivityPub and ATProto.
NNostrNNostr is a self-hosted, open-source Nostr relay and client library written in C# that supports paid events via BTCPay Server integration.


0 comments