Mastodon (container)
Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones..
Image details
Source details
Configuration
TypeContainerlinuxlinuxserver/mastodon:latest80:80/tcp443:443/tcp9394:9394/tcp/config : /srv/lsio/mastodon/configPUID=1000PGID=1000TZ=Etc/UTCLOCAL_DOMAIN=example.comREDIS_HOST=redisREDIS_PORT=6379DB_HOST=dbDB_USER=mastodonDB_NAME=mastodonDB_PASS=mastodonDB_PORT=5432ES_ENABLED=falseACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=SECRET_KEY_BASE=OTP_SECRET=VAPID_PRIVATE_KEY=VAPID_PUBLIC_KEY=SMTP_SERVER=mail.example.comSMTP_PORT=25SMTP_LOGIN=SMTP_PASSWORD=SMTP_FROM_ADDRESS=notifications@example.comS3_ENABLED=falseWEB_DOMAIN=mastodon.example.comES_HOST=esES_PORT=9200ES_USER=elasticES_PASS=elasticS3_BUCKET=AWS_ACCESS_KEY_ID=AWS_SECRET_ACCESS_KEY=S3_ALIAS_HOST=SIDEKIQ_ONLY=falseSIDEKIQ_QUEUE=SIDEKIQ_DEFAULT=falseSIDEKIQ_THREADS=5DB_POOL=5NO_CHOWN=MASTODON_PROMETHEUS_EXPORTER_ENABLED=unless-stoppedTemplate by technorabilia
Notes
Ensure to create the following volume directories on the host file system, or modify the paths in the volume mapping section under the advanced options below, as needed.
mkdir -p /srv/lsio/mastodon/config
Standalone Install
Select an install method, to see config/commands for deploying Mastodon (container)
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Mastodon (container), fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation, or see mastodon/mastodon for app-specific guidance.

The LinuxServer.io team brings you another container release featuring:
- regular and timely application updates
- easy user mappings (PGID, PUID)
- custom base image with s6 overlay
- weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
- regular security updates
Find us at:
- Blog - all the things you can do with our containers including How-To guides, opinions and much more!
- Discord - realtime support / chat with the community and the team.
- Discourse - post on our community forum.
- GitHub - view the source for all of our repositories.
- Open Collective - please consider helping us by either donating or contributing to our budget
linuxserver/mastodon
Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones..

Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.Simply pulling
lscr.io/linuxserver/mastodon:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.The architectures supported by this image are:
| Architecture | Available | Tag |
|---|---|---|
| x86-64 | ✅ | amd64-\ |
| arm64 | ✅ | arm64v8-\ |
Version Tags
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.| Tag | Available | Description |
|---|---|---|
| latest | ✅ | Stable releases. |
| develop | ✅ | Pre-releases only. |
| glitch | ✅ | glitch-soc fork releases. |
Application Setup
We provide aliases for the common commands that execute in the correct context so that environment variables from secrets are available to them:- To generate keys for
SECRET_KEY_BASE&OTP_SECRETrundocker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:latest generate-secretonce for each.
- To generate keys for
VAPID_PRIVATE_KEY&VAPID_PUBLIC_KEYrundocker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:latest generate-vapid
- To generate keys for
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY,ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT, &ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEYrundocker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:latest generate-active-record
Both of the secret generation aliases above can be run without any other setup having been carried out.
- To use
tootctlyou can run something likedocker exec -it lscr.io/linuxserver/mastodon /tootctl <command>
Using
tootctl requires you to complete the initial Mastodon configuration first.This container requires separate postgres and redis instances to run.
We support all of the official environment variables for configuration. In place of adding them all to your run/compose you can use an env file such as this example from the upstream project.
For more information check out the mastodon documentation.
Running separate sidekiq instances
It is currently only supported to run a single queue per container instance or all queues in a single container instance.All containers must share the same
/config mount and be on a common docker network.NOCHOWN Option
On larger Mastodon instances, our init process to verify that permissions are set correctly can noticeably slow down the container startup. If you are experiencing this, you can setNO_CHOWN to true to skip that step of the init.Do NOT set this on first run of the container. If you enable this option you are taking full responsibility for ensuring that the permissions in your /config mount are correct. If you're even slightly unsure, don't set it.
Strict reverse proxies
This image automatically redirects to https with a self-signed certificate. If you are using a reverse proxy which validates certificates, you need to disable this check for the container.Usage
To help you get started creating a container from this image you can either use docker-compose or the docker cli.>!NOTE >Unless a parameter is flagged as 'optional', it is mandatory and a value must be provided.
docker-compose (recommended, click here for more info)
---
services:
mastodon:
image: lscr.io/linuxserver/mastodon:latest
container_name: mastodon
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- LOCAL_DOMAIN=example.com
- REDIS_HOST=redis
- REDIS_PORT=6379
- DB_HOST=db
- DB_USER=mastodon
- DB_NAME=mastodon
- DB_PASS=mastodon
- DB_PORT=5432
- ES_ENABLED=false
- ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=
- ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=
- ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=
- SECRET_KEY_BASE=
- OTP_SECRET=
- VAPID_PRIVATE_KEY=
- VAPID_PUBLIC_KEY=
- SMTP_SERVER=mail.example.com
- SMTP_PORT=25
- SMTP_LOGIN=
- SMTP_PASSWORD=
- SMTP_FROM_ADDRESS=notifications@example.com
- S3_ENABLED=false
- WEB_DOMAIN=mastodon.example.com #optional
- ES_HOST=es #optional
- ES_PORT=9200 #optional
- ES_USER=elastic #optional
- ES_PASS=elastic #optional
- S3_BUCKET= #optional
- AWS_ACCESS_KEY_ID= #optional
- AWS_SECRET_ACCESS_KEY= #optional
- S3_ALIAS_HOST= #optional
- SIDEKIQ_ONLY=false #optional
- SIDEKIQ_QUEUE= #optional
- SIDEKIQ_DEFAULT=false #optional
- SIDEKIQ_THREADS=5 #optional
- DB_POOL=5 #optional
- NO_CHOWN= #optional
- MASTODON_PROMETHEUS_EXPORTER_ENABLED= #optional
volumes:
- /path/to/mastodon/config:/config
ports:
- 80:80
- 443:443
- 9394:9394 #optional
restart: unless-stoppeddocker cli (click here for more info)
docker run -d \
--name=mastodon \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e LOCAL_DOMAIN=example.com \
-e REDIS_HOST=redis \
-e REDIS_PORT=6379 \
-e DB_HOST=db \
-e DB_USER=mastodon \
-e DB_NAME=mastodon \
-e DB_PASS=mastodon \
-e DB_PORT=5432 \
-e ES_ENABLED=false \
-e ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY= \
-e ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= \
-e ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT= \
-e SECRET_KEY_BASE= \
-e OTP_SECRET= \
-e VAPID_PRIVATE_KEY= \
-e VAPID_PUBLIC_KEY= \
-e SMTP_SERVER=mail.example.com \
-e SMTP_PORT=25 \
-e SMTP_LOGIN= \
-e SMTP_PASSWORD= \
-e SMTP_FROM_ADDRESS=notifications@example.com \
-e S3_ENABLED=false \
-e WEB_DOMAIN=mastodon.example.com `#optional` \
-e ES_HOST=es `#optional` \
-e ES_PORT=9200 `#optional` \
-e ES_USER=elastic `#optional` \
-e ES_PASS=elastic `#optional` \
-e S3_BUCKET= `#optional` \
-e AWS_ACCESS_KEY_ID= `#optional` \
-e AWS_SECRET_ACCESS_KEY= `#optional` \
-e S3_ALIAS_HOST= `#optional` \
-e SIDEKIQ_ONLY=false `#optional` \
-e SIDEKIQ_QUEUE= `#optional` \
-e SIDEKIQ_DEFAULT=false `#optional` \
-e SIDEKIQ_THREADS=5 `#optional` \
-e DB_POOL=5 `#optional` \
-e NO_CHOWN= `#optional` \
-e MASTODON_PROMETHEUS_EXPORTER_ENABLED= `#optional` \
-p 80:80 \
-p 443:443 \
-p 9394:9394 `#optional` \
-v /path/to/mastodon/config:/config \
--restart unless-stopped \
lscr.io/linuxserver/mastodon:latestParameters
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate<external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.| Parameter | Function |
|---|---|
-p 80:80 | Port for web frontend |
-p 443:443 | Port for web frontend |
-p 9394 | Port for Prometheus metrics |
-e PUID=1000 | for UserID - see below for explanation |
-e PGID=1000 | for GroupID - see below for explanation |
-e TZ=Etc/UTC | specify a timezone to use, see this list. |
-e LOCALDOMAIN=example.com | This is the unique identifier of your server in the network. It cannot be safely changed later. |
-e REDISHOST=redis | Redis server hostname |
-e REDISPORT=6379 | Redis port |
-e DBHOST=db | Postgres database hostname |
-e DBUSER=mastodon | Postgres username |
-e DBNAME=mastodon | Postgres db name |
-e DBPASS=mastodon | Postgres password |
-e DBPORT=5432 | Postgres port |
-e ESENABLED=false | Enable or disable Elasticsearch (requires a separate ES instance) |
-e ACTIVERECORDENCRYPTIONPRIMARYKEY= | Primary key for Active Record Encryption. |
-e ACTIVERECORDENCRYPTIONDETERMINISTICKEY= | Deterministic key for Active Record Encryption. |
-e ACTIVERECORDENCRYPTIONKEYDERIVATIONSALT= | Derivation salt for Active Record Encryption. |
-e SECRETKEYBASE= | Browser session secret. Changing it will break all active browser sessions. |
-e OTPSECRET= | MFA secret. Changing it after initial setup will break two-factor authentication. |
-e VAPIDPRIVATEKEY= | Push notification private key. Changing it after initial setup will break push notifications. |
-e VAPIDPUBLICKEY= | Push notification public key. Changing it after initial setup will break push notifications. |
-e SMTPSERVER=mail.example.com | SMTP server for email notifications |
-e SMTPPORT=25 | SMTP server port |
-e SMTPLOGIN= | SMTP username |
-e SMTPPASSWORD= | SMTP password |
-e SMTPFROMADDRESS=notifications@example.com | From address for emails send from Mastodon |
-e S3ENABLED=false | Enable or disable S3 storage of uploaded files |
-e WEBDOMAIN=mastodon.example.com | This 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 |
-e ESHOST=es | Elasticsearch server hostname |
-e ESPORT=9200 | Elasticsearch port |
-e ESUSER=elastic | Elasticsearch username |
-e ESPASS=elastic | Elasticsearch password |
-e S3BUCKET= | S3 bucket hostname |
-e AWSACCESSKEYID= | S3 bucket access key ID |
-e AWSSECRETACCESSKEY= | S3 bucket secret access key |
-e S3ALIASHOST= | Alternate hostname for object fetching if you are front the S3 connections. |
-e SIDEKIQONLY=false | Only run the sidekiq service in this container instance. For large scale instances that need better queue handling. |
-e SIDEKIQQUEUE= | The name of the sidekiq queue to run in this container. See notes. |
-e SIDEKIQDEFAULT=false | Set to true on the main container if you're running additional sidekiq instances. It will run the default queue. |
-e SIDEKIQTHREADS=5 | The number of threads for sidekiq to use. See notes. |
-e DBPOOL=5 | The size of the DB connection pool, must be at least the same as SIDEKIQTHREADS. See notes. |
-e NOCHOWN= | Set to true to skip chown of /config on init. READ THE APPLICATION NOTES BEFORE SETTING THIS. |
-e MASTODONPROMETHEUSEXPORTERENABLED= | If set to true, Mastodon’s Ruby processes (web & Sidekiq) will enable the Prometheus instrumentation. |
-v /config | Contains all relevant configuration files. |
Environment variables from files (Docker secrets)
You can set any environment variable from a file by using a special prependFILE__.As an example:
-e FILE__MYVAR=/run/secrets/mysecretvariableWill set the environment variable
MYVAR based on the contents of the /run/secrets/mysecretvariable file.Umask for running applications
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional-e UMASK=022 setting.
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.User / Group Identifiers
When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance
PUID=1000 and PGID=1000, to find yours use id your_user as below:id your_userExample output:
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)Docker Mods
We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
Support Info
- Shell access whilst the container is running:
```bash
docker exec -it mastodon /bin/bash
```- To monitor the logs of the container in realtime:
```bash
docker logs -f mastodon
```- Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' mastodon
```- Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/mastodon:latest
```Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.Below are the instructions for updating containers:
Via Docker Compose
- Update images:
* All images:
```bash
docker-compose pull
```
* Single image:
```bash
docker-compose pull mastodon
```- Update containers:
* All containers:
```bash
docker-compose up -d
```
* Single container:
```bash
docker-compose up -d mastodon
```- You can also remove the old dangling images:
```bash
docker image prune
```Via Docker Run
- Update the image:
```bash
docker pull lscr.io/linuxserver/mastodon:latest
```- Stop the running container:
```bash
docker stop mastodon
```- Delete the container:
```bash
docker rm mastodon
```- Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your
/configfolder and settings will be preserved) - You can also remove the old dangling images:
```bash
docker image prune
```Image Update Notifications - Diun (Docker Image Update Notifier)
>!TIP >We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:git clone https://github.com/linuxserver/docker-mastodon.git
cd docker-mastodon
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/mastodon:latest .The ARM variants can be built on x8664 hardware and vice versa using
lscr.io/linuxserver/qemu-staticdocker run --rm --privileged lscr.io/linuxserver/qemu-static --resetOnce registered you can define the dockerfile to use with
-f Dockerfile.aarch64.Versions
- 05.07.26: - Rebase to Alpine 3.24.
- 21.10.25: - Add prometheus exporter support.
- 20.10.25: - Add vips-heif.
- 08.07.25: - Rebase to Alpine 3.22.
- 06.06.25: - Rebase to Alpine 3.21, replace deprecated imagemagick with vips.
- 08.10.24: - Rebase to Alpine 3.20, enable Active Record Encryption. Existing users should update their nginx confs to avoid http2 deprecation warnings.
- 21.09.23: - Rebase to Alpine 3.18, migrate to s6v3.
- 25.05.23: - Adjust apk flags.
- 09.02.23: - Add Glitch branch.
- 09.01.23: - Updated nginx conf to fix bring inline with Mastodon configuration (fixes Elk integration).
- 19.12.22: - Support separate sidekiq queue instances.
- 05.11.22: - Initial Release.
Serve Mastodon (container) on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying mastodon-container.example.com to http://Mastodon:80
Add this to your Caddyfile
mastodon-container.example.com {
reverse_proxy http://Mastodon:80
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs Mastodon - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:80 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :80 - Stop the other service, or pick a different host port. In
80:80only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:80. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, Mastodon can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 80
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /srv/lsio/mastodon/config - Or set the
PUIDandPGIDvariables (defaults 1000:1000) to match your own user, found withid $USER
Image won't pull
Test the pull directly on the host: docker pull linuxserver/mastodon:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect Mastodon --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Required settings are blank
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY, ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY, ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT, SECRET_KEY_BASE, OTP_SECRET, VAPID_PRIVATE_KEY, VAPID_PUBLIC_KEY, SMTP_LOGIN, SMTP_PASSWORD, S3_BUCKET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, S3_ALIAS_HOST, SIDEKIQ_QUEUE, NO_CHOWN, MASTODON_PROMETHEUS_EXPORTER_ENABLED have no default value, and Mastodon may crash or misbehave if left empty.
- Fill them in on the deploy screen before hitting deploy.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue on mastodon/mastodon
- Template not working: Open an issue on technorabilia/portainer-templates
- This website not working: Open an issue on lissy93/portainer-templates
A single container
Mastodon (container) runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything Mastodon (container) needs bundled into one download. This template pulls linuxserver/mastodon:latest, which Docker fetches once (about 240 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. Mastodon (container)'s comes from Docker Hub, published by linuxserver.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 4.6.6. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Ports
A port is the door the app answers on. A mapping like 80:80 means it's reachable on port 80 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:80 in a browser. It opens:
80:80, likely the web interface443:443, likely the web interface9394:9394
Volumes
A volume is where Mastodon (container) keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/configfrom/srv/lsio/mastodon/configon the host
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Mastodon (container) takes 41 of them, and 16 need a value before it'll start properly:
PUID, defaults to1000. Run 'id [USER]' for the owner of the host volume directories to get the UID to use here.PGID, defaults to1000. Run 'id [USER]' for the owner of the host volume directories to get the GID to use here.TZ, defaults toEtc/UTC. Specify a timezone to use, see this list.LOCAL_DOMAIN, defaults toexample.com. This is the unique identifier of your server in the network. It cannot be safely changed later.REDIS_HOST, defaults toredis. Redis server hostnameREDIS_PORT, defaults to6379. Redis portDB_HOST, defaults todb. Postgres database hostnameDB_USER, defaults tomastodon. Postgres usernameDB_NAME, defaults tomastodon. Postgres db nameDB_PASS, defaults tomastodon. Postgres passwordDB_PORT, defaults to5432. Postgres portES_ENABLED, defaults tofalse. Enable or disable Elasticsearch (requires a separate ES instance)ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY, needs a value. Primary key for Active Record Encryption.ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY, needs a value. Deterministic key for Active Record Encryption.ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT, needs a value. Derivation salt for Active Record Encryption.SECRET_KEY_BASE, needs a value. Browser session secret. Changing it will break all active browser sessions.OTP_SECRET, needs a value. MFA secret. Changing it after initial setup will break two-factor authentication.VAPID_PRIVATE_KEY, needs a value. Push notification private key. Changing it after initial setup will break push notifications.VAPID_PUBLIC_KEY, needs a value. Push notification public key. Changing it after initial setup will break push notifications.SMTP_SERVER, defaults tomail.example.com. SMTP server for email notificationsSMTP_PORT, defaults to25. SMTP server portSMTP_LOGIN, needs a value. SMTP usernameSMTP_PASSWORD, needs a value. SMTP passwordSMTP_FROM_ADDRESS, defaults tonotifications@example.com. From address for emails send from MastodonS3_ENABLED, defaults tofalse. Enable or disable S3 storage of uploaded filesWEB_DOMAIN, defaults tomastodon.example.com. This 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 [OPTIONAL]ES_HOST, defaults toes. Elasticsearch server hostname [OPTIONAL]ES_PORT, defaults to9200. Elasticsearch port [OPTIONAL]ES_USER, defaults toelastic. Elasticsearch username [OPTIONAL]ES_PASS, defaults toelastic. Elasticsearch password [OPTIONAL]S3_BUCKET, needs a value. S3 bucket hostname [OPTIONAL]AWS_ACCESS_KEY_ID, needs a value. S3 bucket access key ID [OPTIONAL]AWS_SECRET_ACCESS_KEY, needs a value. S3 bucket secret access key [OPTIONAL]S3_ALIAS_HOST, needs a value. Alternate hostname for object fetching if you are front the S3 connections. [OPTIONAL]SIDEKIQ_ONLY, defaults tofalse. Only run the sidekiq service in this container instance. For large scale instances that need better queue handling. [OPTIONAL]SIDEKIQ_QUEUE, needs a value. The name of the sidekiq queue to run in this container. See notes. [OPTIONAL]SIDEKIQ_DEFAULT, defaults tofalse. Set to true on the main container if you're running additional sidekiq instances. It will run the default queue. [OPTIONAL]SIDEKIQ_THREADS, defaults to5. The number of threads for sidekiq to use. See notes. [OPTIONAL]DB_POOL, defaults to5. The size of the DB connection pool, must be at least the same as SIDEKIQTHREADS. See notes. [OPTIONAL]NO_CHOWN, needs a value. Set to true to skip chown of /config on init. READ THE APPLICATION NOTES BEFORE SETTING THIS. [OPTIONAL]MASTODON_PROMETHEUS_EXPORTER_ENABLED, needs a value. If set to true, Mastodon’s Ruby processes (web & Sidekiq) will enable the Prometheus instrumentation. [OPTIONAL]
Restart policy
The restart policy here is unless-stopped, so Docker restarts Mastodon (container) after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Users and permissions
The PUID and PGID settings tell it which user and group to act as on your host. Point them at your own account (find yours with id $USER) so the files it writes into your mounted folders come out owned by you rather than root.
Networking
Nothing custom is set, so Mastodon (container) sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container Mastodon. That's what you'll spot in the containers list and use in commands like docker logs Mastodon.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Open source license
Mastodon (container) is open source, released under the AGPL-3.0 license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Mastodon (container) up. Add the template list to Portainer once, then deploying Mastodon (container) is a click rather than a wall of config.