Sign inSign up

readystack/mastodon

By readystack

•Updated 4 days ago

Mastodon: federated social network server (ActivityPub). Signed; SBOM and SLSA v1 provenance.

Image
Content management system
0

651

readystack/mastodon repository overview

⁠Mastodon

Signed: cosign SBOM: SPDX attached Provenance: SLSA v1

readystack/mastodon:v4.7.4-CE-ubuntu24.04-r1

Source, recipe and records

A cosign-signed build of github.com/mastodon/mastodon v4.7.4 (AGPL-3.0), built from source, built clean-room from official upstream source, with the source changes listed below by ReadyStack⁠.

⁠What you get

Signature, user and attestations below were measured on the published digest sha256:2240012a3ee894b955e67b0fa9621183b9974cb1451f68ffbba4b3c062a7a63f on 2026-11-01.

  • Scan scores — we scan every image we publish every day (an SBOM made with syft, vulnerabilities matched with grype, scored with cerodeo-v1, the rubric ce.rodeo published until 2026-10-26) and record each scan with how its score was derived. This release's first and latest scan: https://readystack.dev/products/mastodon⁠
  • ReadyStack release check — passed at release on 2026-11-01: no fixable critical or high vulnerability (Docker Scout and OSV), a non-root user, SBOM and provenance attached. This is ReadyStack's own test, not a Docker grade; vulnerabilities published since then are in today's result at https://readystack.dev/queue⁠.
  • Signed — cosign signature by the ReadyStack release key (fingerprint 04daa92344a52dbc) on this release's index digest sha256:2240012a3ee894b955e67b0fa9621183b9974cb1451f68ffbba4b3c062a7a63f; verify with cosign verify --key https://readystack.dev/keys/cosign.pub readystack/mastodon:v4.7.4-CE-ubuntu24.04-r1.
  • Attestations — An SPDX SBOM and SLSA v1 build provenance are attached to this digest.
  • Runs as a non-root user (mastodon).
  • Built from source by ReadyStack.

⁠Which tag should I pull?

This image follows the ReadyStack release-tag convention:

  • The current release is v4.7.4-CE-ubuntu24.04-r1 — 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.4-CE-ubuntu24.04-r1

# ✗ 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.4-CE-ubuntu24.04-r1 (the signature is recorded in the public Sigstore transparency log). Support: [email protected]⁠, as set out in the ReadyStack Agreement⁠.

⁠Deployment

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 `docker run --rm {image} bin/rails secret` and the three ACTIVE_RECORD_ENCRYPTION_* values with
# `docker run --rm {image} bin/rails db:encryption:init`; 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.4-CE-ubuntu24.04-r1
docker run -d --name mastodon-sidekiq --network mastodon-net --env-file ./mastodon.env -v mastodon-system:/opt/mastodon/public/system readystack/mastodon:v4.7.4-CE-ubuntu24.04-r1 sidekiq
docker run -d --name mastodon-streaming --network mastodon-net -p 4000:4000 --env-file ./mastodon.env readystack/mastodon:v4.7.4-CE-ubuntu24.04-r1 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).

⁠Source changes (AGPL)

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.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.patch⁠

⁠The full ReadyStack Hermetic Build Kit

The complete --network=none build kit for this image — plus admin/DB/API handbooks, the build's validation records, and its build provenance records — is a free download for any registered account at readystack.dev/products/mastodon⁠. A clean-room rebuild from this release's archive on an egress-blocked host reproduced its linux/amd64 digest sha256:426e1abb01de6f2652e23d2d2bdde2df9c24eae4ad2517520c395ba07830a02b on 2026-11-01.

— ReadyStack · readystack.dev

Tag summary

Content type

Image

Digest

sha256:0c47ad5a4…

Size

5.5 MB

Last updated

4 days ago

docker pull readystack/mastodon:sha256-426e1abb01de6f2652e23d2d2bdde2df9c24eae4ad2517520c395ba07830a02b.att