Mastodon: federated social network server (ActivityPub). Signed; SBOM and SLSA v1 provenance.
8.3K
Stable, Open-source Releases, Automated · readystack.dev
readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5
Source, recipe and records
v4.7.6): https://github.com/mastodon/mastodon/tree/a593c9420d2ff4664d448a9cb71bf8ed4ff0c29aA cosign-signed build of github.com/mastodon/mastodon v4.7.6 (AGPL-3.0), built from source, built clean-room from official upstream source, with the source changes listed below by ReadyStack.
Signature, user and attestations below were measured on the published digest sha256:ec07c8ae6e77b29cb2668ddef33bb98d2cda4cddd94fad209ffa1f3ea9f29847 on 2026-12-03.
04daa92344a52dbc) on this release's index digest sha256:ec07c8ae6e77b29cb2668ddef33bb98d2cda4cddd94fad209ffa1f3ea9f29847; verify with cosign verify --key https://readystack.dev/keys/cosign.pub readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5.mastodon).This image follows the ReadyStack release-tag convention:
The current release is v4.7.6-CE-ubuntu24.04-r5 — the release listed at readystack.dev. Release tags use the pattern <upstream-version>-CE-<base-os>-r<N>; the current one is signed, attested (SBOM + provenance), and is provided under the ReadyStack Agreement.
Earlier release tags (an older version or revision in the same pattern) are superseded. They stay pullable so existing deployments can pin them, but they are no longer re-graded, and fixes appear only in newer releases: move to the current release. For a superseded release's build kit, ask support.
Release tags never move, so pulling the same tag again never changes the image. To be offered each new release automatically (a new revision r<N+1>, or a new upstream version), use the ReadyStack Renovate preset: https://readystack.dev/updates.html
Any tag beginning with internal- is an engineering-pipeline artifact published for build observability. It is unsupported, may change or disappear without notice, and must not be used in production.
# ✓ current release
docker pull readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5
# ✗ unsupported (do not pull)
docker pull readystack/mastodon:internal-...
This release is signed; verify it with cosign verify --key https://readystack.dev/keys/cosign.pub readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5 (the signature is recorded in the public Sigstore transparency log). Support: [email protected], as set out in the ReadyStack Agreement.
One image, three processes, each its own container from the same image: web (the default command, puma on port 3000: the web UI and the API; it prepares the database before it starts), sidekiq (the job queue) and streaming (the streaming API on Node, port 4000). They share PostgreSQL and Redis, which you provide, and the uploaded media in /opt/mastodon/public/system (or S3-compatible storage). A TLS reverse proxy in front sends / to port 3000 and /api/v1/streaming to port 4000, as upstream's nginx example does. Runs as the non-root user mastodon (uid 991).
Secrets go in env files that only you can read, not on the command line, and passwords that only set up the first start come out of them after setup. Create each file with install -m 600 /dev/null <file>, then write its lines into it with an editor, with your own values (a value typed into a shell stays in its history). Docker reads each line as written: no quotes around a value, no spaces around =.
mastodon-db.env:
# First start only: the postgres image reads POSTGRES_PASSWORD when it initialises its empty volume.
POSTGRES_PASSWORD=YOUR_POSTGRES_PASSWORD
mastodon.env:
# Your server's domain, which cannot change later.
LOCAL_DOMAIN=YOUR_DOMAIN
# Secrets: generate SECRET_KEY_BASE with `bin/rails secret` and the three ACTIVE_RECORD_ENCRYPTION_* values with
# `bin/rails db:encryption:init`, each run in a throwaway container of this image (`docker run --rm` plus the image you pull); keep them backed up.
SECRET_KEY_BASE=YOUR_SECRET_KEY_BASE
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=YOUR_AR_DETERMINISTIC_KEY
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=YOUR_AR_DERIVATION_SALT
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=YOUR_AR_PRIMARY_KEY
DB_HOST=db
DB_NAME=mastodon
DB_USER=mastodon
# The same password as POSTGRES_PASSWORD.
DB_PASS=YOUR_POSTGRES_PASSWORD
REDIS_HOST=redis
# Optional: Web Push keys (`bin/rails mastodon:webpush:generate_vapid_key`), SMTP_* for mail.
docker network create mastodon-net
docker run -d --name db --network mastodon-net -e POSTGRES_DB=mastodon -e POSTGRES_USER=mastodon --env-file ./mastodon-db.env -v mastodon-db:/var/lib/postgresql/data postgres:16
docker run -d --name redis --network mastodon-net -v mastodon-redis:/data redis:7-alpine
until docker exec db pg_isready -U mastodon -d mastodon; do sleep 2; done
docker run -d --name mastodon-web --network mastodon-net -p 3000:3000 --env-file ./mastodon.env -v mastodon-system:/opt/mastodon/public/system readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5
docker run -d --name mastodon-sidekiq --network mastodon-net --env-file ./mastodon.env -v mastodon-system:/opt/mastodon/public/system readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5 sidekiq
docker run -d --name mastodon-streaming --network mastodon-net -p 4000:4000 --env-file ./mastodon.env readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5 streaming
The web container prepares the database at its first start (schema and seed data) and applies migrations after an upgrade; set MASTODON_SKIP_MIGRATE=1 on any further web containers. Create the first account with docker exec mastodon-web bin/tootctl accounts create alice --email [email protected] --confirmed --role Owner (Mastodon checks that the email's domain receives mail). Put a TLS proxy in front: / to port 3000, /api/v1/streaming to port 4000. Keep the env files private (install -m 600 /dev/null mastodon.env).
This software is licensed under the GNU Affero General Public License, and the releases below are built from a modified copy of its source. Each line names a release, what ReadyStack changed and where the diff is published. From 2026-10-27 a release's diff carries every upstream file its build changes, the dependency manifests and lockfiles included, so its complete corresponding source is the upstream tag with that diff applied; the diff of an earlier release carries the source edits its line names, and the dependency files that release's build changed are in its release archive (vendored/). If you let users interact with the server over a network, AGPL-3.0 section 13 asks you to offer them its source; for a release from 2026-10-27 on, a link to its diff and the upstream tag does that.
v4.7.6-CE-ubuntu24.04-r5 — the build adds Yarn resolutions to package.json that raise five npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2, ws 8.23.0) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.6/mastodon-v4.7.6-readystack.patchv4.7.6-CE-ubuntu24.04-r4 — the build adds Yarn resolutions to package.json that raise five npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2, ws 8.23.0) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.6/mastodon-v4.7.6-readystack.patchv4.7.6-CE-ubuntu24.04-r3 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.6/mastodon-v4.7.6-readystack.patchv4.7.6-CE-ubuntu24.04-r2 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.6/mastodon-v4.7.6-readystack.patchv4.7.6-CE-ubuntu24.04-r1 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.6/mastodon-v4.7.6-readystack.patchv4.7.5-CE-ubuntu24.04-r3 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.5/mastodon-v4.7.5-readystack.patchv4.7.5-CE-ubuntu24.04-r2 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.5/mastodon-v4.7.5-readystack.patchv4.7.5-CE-ubuntu24.04-r1 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.5/mastodon-v4.7.5-readystack.patchv4.7.4-CE-ubuntu24.04-r1 — the build adds Yarn resolutions to package.json that raise four npm dependencies of the streaming server (body-parser 2.4.0, proxy-addr 2.0.8, source-map-js 1.2.2, undici 8.12.2) to fixed, upstream-published releases (security updates; no Mastodon source file is edited); full diff of every upstream file the build changes at https://readystack.dev/source/mastodon/v4.7.4/mastodon-v4.7.4-readystack.patchThe complete --network=none build kit for this image — plus admin/DB/API handbooks, the build's validation records, and its build provenance records — is free to download from GitHub, no account needed, and from readystack.dev/products/mastodon with a free account. A clean-room rebuild from this release's archive on an egress-blocked host reproduced its linux/amd64 digest sha256:b00f5ce210760c1c21c690c69146ecfc7c767516c48cdb511ef2cd62edf55411 on 2026-12-03.
Stable, Open-source Releases, Automated. ReadyStack releases popular open-source apps every week with every available critical and high security fix applied, plus full documentation, reference data, tests and a build recipe that recreates each release bit-for-bit. Each release is rebuilt from its pinned inputs with the network off, checked against its published digest, signed, and scanned and graded again every day. The images and build kits are free, and ReadyStack is soon to be a nonprofit.
readystack.dev · All products · Build kits on GitHub · Defect log · [email protected]
— ReadyStack · readystack.dev
docker pull readystack/mastodon:v4.7.6-CE-ubuntu24.04-r5