HUB
Sign inSign up
mastodon-plus logo

richarvey/mastodon-plus

By richarvey

•Updated about 3 hours ago

Mastodon with rolle's Bird UI theme, plus optional GIF picker and longer posts. Multi-arch.

Image
0

489

richarvey/mastodon-plus repository overview

⁠ mastodon-plus

Mastodon, plus a few extras. mastodon-plus is a ready-to-run Docker image of Mastodon⁠ with @rolle⁠'s Mastodon Bird UI⁠ theme built in, and a small set of our own patches that you switch on in .env.production.

  • Drop-in replacement for the official ghcr.io/mastodon/mastodon image
  • Bird UI built in as a theme option, with stock Mastodon as the default
  • Optional extras: a configurable post length and a GIPHY GIF picker
  • Multi-arch: linux/amd64 and linux/arm64, both built natively
  • Always current: new Mastodon and Bird UI releases are built automatically

⁠Contents

⁠Quick start

docker pull richarvey/mastodon-plus:latest
TagWhat you get
latestThe newest Mastodon release with the newest Bird UI release
v5.0.0That Mastodon version, rebuilt whenever Bird UI or our patches change
v5.0.0-birdui-5.0.0-2026-12-02That Mastodon and Bird UI pair

Every tag is multi-arch: Docker pulls the right architecture automatically.

Moving from richarvey/mastodon-bird-ui? That image is no longer updated. Change the image name to richarvey/mastodon-plus. One difference: stock Mastodon is now the default theme, so anyone who used Bird UI picks "Mastodon Bird UI" once in Preferences > Appearance, or you make it the server default (see Choosing the default theme⁠ below).

⁠What's included

The image is Mastodon's own Dockerfile, built from the upstream release source, with two kinds of change on top.

⁠Mastodon Bird UI, by rolle

Mastodon Bird UI on desktop and mobile, the desktop view split between dark and light mode

Screenshot from rollecode/mastodon-bird-ui⁠, MIT licensed.

Installed with rolle's own install-to-mastodon.sh⁠, at each Bird UI release. Stock Mastodon stays the default theme, and Bird UI is there for anyone who wants it. Users pick a theme in Preferences > Appearance:

ThemeNotes
MastodonThe default. Stock Mastodon 5, including its highlight colours
Mastodon Bird UIFollows each user's light or dark mode
Mastodon Bird UI (Ultra accessible)Built for people with serious vision impairment
Mastodon Bird UI (Ultra accessible Plus+)As above, with even larger text

rolle's script names the themes in English and Finnish. The build gives every other language the English names too, so no language ends up with two themes both called "Mastodon".

⁠Changing your theme

Each user picks their own theme, and it applies straight away:

  1. Log in and open Preferences (from the menu, or go to /settings/preferences/appearance on your server), then Appearance.
  2. Choose a theme from the Site theme list: Mastodon, Mastodon Bird UI, or one of the Ultra accessible versions.
  3. Optionally set Mode to light, dark or automatic. Bird UI follows it too; Theme color is only offered for stock Mastodon.
  4. Click Save changes.
⁠Choosing the default theme

Admins can change the server's default theme in Administration > Server settings > Appearance, for example to make Mastodon Bird UI the default. It takes effect straight away, with no rebuild or restart, and sets the theme for:

  • screens people see when not logged in: the sign-in and sign-up pages, the about page, and public profiles and posts
  • users who haven't picked a theme in Preferences

Users who have picked a theme keep their own choice once they log in. So with Bird UI as the server default, someone who prefers stock Mastodon sees Bird UI on the sign-in page and their own choice after logging in.

⁠Our patches

Changes to Mastodon itself live in patches/⁠ as ordinary patch files, applied in order to every Mastodon release that's built. If a patch no longer fits a new release, the build stops and names it, rather than publishing an image without it. Both are off unless you set them in .env.production.

PatchWhat it doesSwitch it on with
0001-max-toot-chars⁠Configurable post character limitMAX_TOOT_CHARS
0002-giphy-picker⁠GIF picker in the composer, powered by GIPHYGIPHY_API_KEY

Our patches are MIT licensed⁠.

⁠Running it

New to running Mastodon? Mastodon on Docker: The Complete Self-Hosting Guide⁠ walks through a whole server from scratch: Docker Compose, Traefik, DNS, object storage, email, OpenSearch and LibreTranslate. Follow it, then use richarvey/mastodon-plus for web and sidekiq as shown below.

⁠Docker Compose

Start from the docker-compose.yml in the Mastodon release⁠ you are running, and change the image of the web and sidekiq services:

services:
  web:
    image: richarvey/mastodon-plus:v5.0.0
    # ...rest unchanged

  sidekiq:
    image: richarvey/mastodon-plus:v5.0.0
    # ...rest unchanged

  streaming:
    # The streaming server is unchanged: keep the upstream image
    image: ghcr.io/mastodon/mastodon-streaming:v5.0.0

Keep web, sidekiq and streaming on the same Mastodon version.

⁠Switching from the official image

The image is a like-for-like swap: same paths, user, ports and commands, so your .env.production and volumes need no changes. Follow the Mastodon release notes⁠ for each upgrade as usual, including any database migrations:

docker compose run --rm web bundle exec rails db:migrate
⁠Requirements

Bird UI 5 needs Mastodon 5.0 or newer, so images are built for Mastodon 5.x onwards.

⁠Configuration

Everything is set in .env.production. Mastodon reads these settings when it starts, so after changing them recreate web and sidekiq:

docker compose up -d --force-recreate web sidekiq
SettingDefaultWhat it does
MAX_TOOT_CHARS500Post character limit⁠
GIPHY_API_KEYnot setTurns on the GIF picker⁠
GIPHY_RATINGpg-13GIF content rating: g, pg, pg-13 or r
⁠Post character limit

Mastodon's 500-character limit is hardcoded upstream. Here it's read from MAX_TOOT_CHARS (the same name glitch-soc uses):

MAX_TOOT_CHARS=1000

Leave it unset, or set something that isn't a positive number, for 500. The limit applies to your users' posts; other servers show long posts in full.

The new limit is enforced as soon as web and sidekiq restart. The web UI's counter and apps read it from the server's instance info, which Mastodon caches for a few minutes, so they can show the old limit briefly. To update it straight away, clear Mastodon's cache (Sidekiq's queues are left alone) and reload the page:

docker compose run --rm web bin/tootctl cache clear
⁠GIF picker

Set a GIPHY API key and the composer gets a GIF button next to the emoji picker, in both Bird UI and stock Mastodon. Users browse trending GIFs or search, and click one to attach it.

Mastodon Bird UIStock Mastodon
GIF picker in Mastodon Bird UI, searching for happy catGIF picker in the stock Mastodon theme, searching for happy cat

To get a key, create an app at developers.giphy.com⁠ and choose API (not SDK). New keys start as rate-limited beta keys; apply for a production key once your server is using it. Then:

GIPHY_API_KEY=your-key
# Optional, defaults to pg-13
GIPHY_RATING=pg-13

How it behaves:

  • The key stays on your server. Searching and downloading go through Mastodon, so browsers never see it.
  • GIFs are attached as normal media. Your server downloads the GIF and stores it like any uploaded GIF (a short looping video), so it plays on every server and app. It counts as one of the post's attachments and takes alt text like any other.
  • Preview images load straight from GIPHY, so people browsing the picker contact GIPHY's servers. The GIF in the post is served by your server.
  • The GIPHY quota is protected: searches are cached for 10 minutes, the picker waits for you to stop typing, and each user is rate limited.
A GIF from GIPHY attached in the composer, with the ALT button and Mastodon's missing alt text reminder

Without GIPHY_API_KEY there is no button and no extra API endpoints.

⁠How the images are built

Builds run in Forgejo Actions on code.squarecows.com⁠ (.forgejo/workflows/build.yml⁠):

every 3 hours --> check upstream --> already on Docker Hub? --> yes: stop
                                                |
                                                no
                                                v
                      build amd64 (native)  +  build arm64 (native)
                                                v
                           merge into one multi-arch image, push tags
  1. Check upstream (scripts/resolve-versions.sh⁠): find the newest stable Mastodon release (vX.Y.Z, no release candidates) and the newest stable Bird UI release for that Mastodon major version. If the <mastodon>-birdui-<birdui> tag is already on Docker Hub, stop.
  2. Build (scripts/prepare-source.sh⁠), on an amd64 and an arm64 runner at the same time: fetch both projects at the exact commits from step 1, run rolle's install script, apply patches/, and build Mastodon's Dockerfile. Each image is pushed untagged, by digest.
  3. Publish: join the two into one multi-arch image and push the tags.

It runs:

  • Every 3 hours. A new Mastodon or Bird UI release gives a tag that doesn't exist yet, so it gets built. Otherwise the run stops after the check.
  • On push to main when the workflow, scripts or patches change. This always rebuilds, since the change affects what goes into the image.
  • By hand: Actions > Build Mastodon Plus > Run workflow, where you can pick a Mastodon tag, a Bird UI tag, branch or commit, and force a rebuild.
⁠Workflow settings

In the repository's Settings > Actions:

TypeNamePurpose
SecretDOCKERHUB_TOKENDocker Hub access token with Read & Write
VariableDOCKERHUB_USERNAMEDocker Hub user, e.g. richarvey
VariableDOCKERHUB_IMAGEOptional. Image to push. Default richarvey/mastodon-plus
VariableBIRDUI_TRACKOptional. release (default), or main to rebuild on every Bird UI commit
VariableBIRDUI_OPTIONSOptional. Flags for rolle's install script. Default --variations (stock Mastodon default, Bird UI and its accessible variants as options); add --default to build Bird UI in as the default

The workflow runs on runners labelled linux + amd64 and linux + arm64 that run jobs on the host with Docker and buildx. The build cache is kept in /var/tmp/mastodon-plus-buildcache on each runner.

⁠Adding a patch
  1. Run scripts/prepare-source.sh v5.0.0 <birdui-release> build to get a patched source tree in build/mastodon, and commit it there as a baseline.
  2. Make your change in build/mastodon, keeping edits to existing Mastodon files as small as possible (new files don't conflict with future releases).
  3. Save git diff as the next numbered file in patches/, with a short description and the MIT licence line at the top, as the existing ones do.

⁠Building it yourself

You need git, curl, and Docker with buildx.

git clone https://code.squarecows.com/ric/mastodon-plus.git
cd mastodon-plus

# Newest Mastodon + Bird UI + patches, for this machine's architecture
./build.sh

# Both architectures, pushed to your own repository (docker login first;
# the architecture that isn't native is emulated with QEMU, which is slow)
PUSH=true IMAGE=you/mastodon-plus ./build.sh

build.sh takes the same settings as the workflow as environment variables, for example MASTODON_VERSION=v5.0.0 or BIRDUI_REF=main.

For just the patched source tree:

scripts/prepare-source.sh v5.0.0 5.0.0-2026-12-02 build
# the patched source is in build/mastodon

⁠License

  • This repository (the build scripts, workflow and the patches in patches/) is MIT licensed⁠.
  • Mastodon⁠ is AGPL-3.0-or-later, and so is the image built from it, patches included.
  • Mastodon Bird UI⁠ by Roni Laukkarinen (@rolle⁠) is MIT. If you enjoy it, consider sponsoring rolle⁠. To translate the theme names, contribute upstream so every Bird UI install benefits.

Mastodon and the Mastodon logo are trade marks of Mastodon GmbH. This project is not affiliated with or endorsed by Mastodon GmbH.

Tag summary
Recent tags
Content type
Image
Digest
sha256:e0e9866b4…
Size
332.8 MB
Last updated
about 3 hours ago
docker pull richarvey/mastodon-plus:latest