Mastodon with rolle's Bird UI theme and optional extras (GIF picker, longer posts), as multi-arch Docker images built automatically https://mastodon.squarecows.com
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ric Harvey dc83c66111
All checks were successful
Build Mastodon Plus / Check upstream versions (push) Successful in 3s
Build Mastodon Plus / Build arm64 (push) Successful in 3m0s
Build Mastodon Plus / Build amd64 (push) Successful in 3m48s
Build Mastodon Plus / Publish multi-arch image (push) Successful in 17s
fix(giphy): keep the picker open when clicking "Load more"
Clicking "Load more" swapped the button for a spinner while the next
page loaded. Mastodon's popover checks whether a click landed inside
it, and the clicked button was no longer in the page, so the click
counted as outside and the picker closed.

Keep the button mounted while loading, disabled and reading
"Loading…", and only show the big spinner for the first page.
Tested in Chromium and WebKit: the picker stays open and results go
from 24 to 48; the same test fails on the previous image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lnuea1BQ9ZjVaRP63w8U6e
2026-12-03 20:33:24 +00:00
.forgejo feat: stock Mastodon as the default theme, Bird UI as an option 2026-12-03 19:31:01 +00:00
assets docs(logo): use the outlined logo everywhere in the README 2026-12-03 19:09:52 +00:00
img feat: rename to mastodon-plus, MIT license, new README and logo 2026-12-03 18:46:05 +00:00
patches fix(giphy): keep the picker open when clicking "Load more" 2026-12-03 20:33:24 +00:00
scripts feat: stock Mastodon as the default theme, Bird UI as an option 2026-12-03 19:31:01 +00:00
.gitignore feat(ci): automate Bird UI builds with Forgejo Actions 2026-12-03 16:17:10 +00:00
build.sh feat(ci): automate Bird UI builds with Forgejo Actions 2026-12-03 16:17:10 +00:00
LICENSE feat: rename to mastodon-plus, MIT license, new README and logo 2026-12-03 18:46:05 +00:00
README.md docs: link the Mastodon on Docker self-hosting guide 2026-12-03 19:45:25 +00:00

mastodon-plus

Build status Docker pulls Mastodon version Image size Platforms: amd64 and arm64 License: MIT Theme: Mastodon Bird UI

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
Tag What you get
latest The newest Mastodon release with the newest Bird UI release
v5.0.0 That Mastodon version, rebuilt whenever Bird UI or our patches change
v5.0.0-birdui-5.0.0-2026-12-02 That 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:

Theme Notes
Mastodon The default. Stock Mastodon 5, including its highlight colours
Mastodon Bird UI Follows 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.

Patch What it does Switch it on with
0001-max-toot-chars Configurable post character limit MAX_TOOT_CHARS
0002-giphy-picker GIF picker in the composer, powered by GIPHY GIPHY_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
Setting Default What it does
MAX_TOOT_CHARS 500 Post character limit
GIPHY_API_KEY not set Turns on the GIF picker
GIPHY_RATING pg-13 GIF 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 UI Stock Mastodon
GIF picker in Mastodon Bird UI, searching for happy cat GIF 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:

Type Name Purpose
Secret DOCKERHUB_TOKEN Docker Hub access token with Read & Write
Variable DOCKERHUB_USERNAME Docker Hub user, e.g. richarvey
Variable DOCKERHUB_IMAGE Optional. Image to push. Default richarvey/mastodon-plus
Variable BIRDUI_TRACK Optional. release (default), or main to rebuild on every Bird UI commit
Variable BIRDUI_OPTIONS Optional. 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.