selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Mastodon logo

Self-host Mastodon

v4.4.28

Federated ActivityPub microblogging server

ReleaseOpen SourceAGPL-3.0
Updatedlast week
LanguageRuby
Setup difficultyAdvanced
MobileNative app
ThemeDark mode
Stars
50 506
Rating
4.0 (1)
Ports
3000 (web process (Puma)), 4000 (streaming API (Node.js))
Requires
PostgreSQL, Redis, SMTP email delivery service
Docker
ghcr.io/mastodon/mastodon
A post and its thread in the web timeline, light themeMultiple pinned columns in the advanced web interface

What 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

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 hero image

Release Ruby Testing Crowdin DPG Badge

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!)

How to configure Mastodon

  • LOCAL_DOMAINDomain that identifies your server in the network; not safely changeable afterwards.
  • REDIS_HOSTlocalhostRedis host.
  • REDIS_PORT6379
  • DB_HOST/var/run/postgresqlPostgreSQL
  • DB_USERmastodon

Mastodon releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Social Networks & Forums

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…