Skip to content

Mastodon

Logo

Description

Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones..

Image

linuxserver/mastodon:latest

Categories

  • Social

Ports

  • 80:80/tcp
  • 443:443/tcp

Volumes

ContainerBind
/config/opt/appdata/mastodon

Environment Variables

NameLabelDefaultDescription
PUIDPUID1024for UserID
PGIDPGID100for GroupID
TZTZEurope/Amsterdamspecify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
LOCAL_DOMAINLOCAL_DOMAINexample.comThis is the unique identifier of your server in the network. It cannot be safely changed later.
REDIS_HOSTREDIS_HOSTredisRedis server hostname
REDIS_PORTREDIS_PORT6379Redis port
DB_HOSTDB_HOSTdbPostgres database hostname
DB_USERDB_USERmastodonPostgres username
DB_NAMEDB_NAMEmastodonPostgres db name
DB_PASSDB_PASSmastodonPostgres password
DB_PORTDB_PORT5432Portgres port
ES_ENABLEDES_ENABLEDfalseEnable or disable Elasticsearch (requires a separate ES instance)
SECRET_KEY_BASESECRET_KEY_BASE``````Browser session secret. Changing it will break all active browser sessions.
OTP_SECRETOTP_SECRET``````MFA secret. Changing it after initial setup will break two-factor authentication.
VAPID_PRIVATE_KEYVAPID_PRIVATE_KEY``````Push notification private key. Changing it after initial setup will break push notifications.
VAPID_PUBLIC_KEYVAPID_PUBLIC_KEY``````Push notification public key. Changing it after initial setup will break push notifications.
SMTP_SERVERSMTP_SERVERmail.example.comSMTP server for email notifications
SMTP_PORTSMTP_PORT25SMTP server port
SMTP_LOGINSMTP_LOGIN``````SMTP username
SMTP_PASSWORDSMTP_PASSWORD``````SMTP password
SMTP_FROM_ADDRESSSMTP_FROM_ADDRESS[email protected]From address for emails send from Mastodon
S3_ENABLEDS3_ENABLEDfalseEnable or disable S3 storage of uploaded files
WEB_DOMAINWEB_DOMAINmastodon.example.comThis can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See [https://docs.joinmastodon.org/admin/config/#basic](https://docs.joinmastodon.org/admin/config/#basic)
ES_HOSTES_HOSTesElasticsearch server hostname
ES_PORTES_PORT9200Elasticsearch port
ES_USERES_USERelasticElasticsearch username
ES_PASSES_PASSelasticElasticsearch password
S3_BUCKETS3_BUCKET``````S3 bucket hostname
AWS_ACCESS_KEY_IDAWS_ACCESS_KEY_ID``````S3 bucket access key ID
AWS_SECRET_ACCESS_KEYAWS_SECRET_ACCESS_KEY``````S3 bucket secret access key
S3_ALIAS_HOSTS3_ALIAS_HOST``````Alternate hostname for object fetching if you are front the S3 connections.
SIDEKIQ_ONLYSIDEKIQ_ONLYfalseOnly run the sidekiq service in this container instance. For large scale instances that need better queue handling.
SIDEKIQ_QUEUESIDEKIQ_QUEUE``````The name of the sidekiq queue to run in this container. See [notes](https://docs.joinmastodon.org/admin/scaling/#sidekiq-queues).
SIDEKIQ_DEFAULTSIDEKIQ_DEFAULTfalseSet to `true` on the main container if you're running additional sidekiq instances. It will run the `default` queue.
SIDEKIQ_THREADSSIDEKIQ_THREADS5The number of threads for sidekiq to use. See [notes](https://docs.joinmastodon.org/admin/scaling/#sidekiq-threads).
DB_POOLDB_POOL5The size of the DB connection pool, must be *at least* the same as `SIDEKIQ_THREADS`. See [notes](https://docs.joinmastodon.org/admin/scaling/#sidekiq-threads).
NO_CHOWNNO_CHOWN``````Set to `true` to skip chown of /config on init. *READ THE APPLICATION NOTES BEFORE SETTING THIS*.

Labels

KeyValue
traefik.enabletrue
traefik.http.routers.mastodon.ruleHost(`mastodon.{$TRAEFIK_INGRESS_DOMAIN}`)
traefik.http.routers.mastodon.entrypointshttps
traefik.http.services.mastodon.loadbalancer.server.port80
traefik.http.routers.mastodon.tlstrue
traefik.http.routers.mastodon.tls.certresolverdefault
traefik.http.routers.mastodon.middlewarestraefik-forward-auth
mafl.enabletrue
mafl.titleMastodon
mafl.descriptionMastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones.
mafl.linkhttps://mastodon.{$TRAEFIK_INGRESS_DOMAIN}
mafl.icon.wraptrue
mafl.icon.color#007acc
mafl.status.enabledtrue
mafl.status.interval60
mafl.groupSocial
mafl.icon.urlhttps://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mastodon-banner.png

Licensed under the MIT License. Free for all use cases. For enterprise or academic support, please reach out to us.