My Mastodon Server Compose files
- Shell 100%
| backup | ||
| caddy | ||
| fedifetcher | ||
| mastodon | ||
| .gitignore | ||
| docker-tailscale-routing.service | ||
| README.md | ||
| update-mastodon.sh | ||
mastodon-compose
Docker Compose files for my Mastodon instance.
Contents
- backup: Backup script that backs up everything to a B2 bucket, scheduled via cron. See backup.sh for details. Requires restic and jq to be installed.
- caddy: The reverse proxy; terminates TLS. Uses a lean custom Caddy image bundling the Cloudflare DNS module for DNS-01 ACME challenges.
- fedifetcher: My FediFetcher install.
- mastodon: The Docker Compose stack for Mastodon. Currently running
glitch-soc. - update-mastodon.sh: Script to automate Mastodon updates.
- docker-tailscale-routing.service: See below.
Routing service
For a Headscale exit node to work, you need an extra entry in the routing table.
The docker-tailscale-routing.service unit handles this. (See also https://blog.thms.uk/2026/06/docker-tailscale-exit-node.)
To enable it:
sudo ln -s <absolute-directory>/docker-tailscale-routing.service /etc/systemd/system/docker-tailscale-routing.service
sudo systemctl daemon-reload
sudo systemctl enable --now docker-tailscale-routing.service