--- title: "Mastodon Instance Tuning" domain: selfhosting category: services tags: [mastodon, fediverse, self-hosting, majortoot, docker] status: published created: 2026-04-02 updated: 2026-04-02 --- # Mastodon Instance Tuning Running your own Mastodon instance means you control the rules — including limits the upstream project imposes by default. These are the tweaks applied to **majortoot** (MajorsHouse's Mastodon instance). ## Increase Character Limit Mastodon's default 500-character post limit is low for longer-form thoughts. You can raise it, but it requires modifying the source — there's no config toggle. The process depends on your deployment method (Docker vs bare metal) and Mastodon version. The community-maintained guide covers the approaches: - [How to increase the max number of characters of a post](https://qa.mastoadmin.social/questions/10010000000000011/how-do-i-increase-the-max-number-of-characters-of-a-post) **Key points:** - The limit is enforced in both the backend (Ruby) and frontend (React). Both must be changed or the UI will reject posts the API would accept. - After changing, you need to rebuild assets and restart services. - Other instances will still display the full post — the character limit is per-instance, not a federation constraint. - Some Mastodon forks (Glitch, Hometown) expose this as a config option without source patches. ## Media Cache Management Federated content (avatars, headers, media from remote posts) gets cached locally. On a small instance this grows slowly, but over months it adds up — especially if you follow active accounts on large instances. Reference: [Fedicache — Understanding Mastodon's media cache](https://notes.neatnik.net/2024/08/fedicache) **Clean up cached remote media:** ```bash # Preview what would be removed (older than 7 days) tootctl media remove --days 7 --dry-run # Actually remove it tootctl media remove --days 7 # For Docker deployments docker exec mastodon-web tootctl media remove --days 7 ``` **Automate with cron or systemd timer:** ```bash # Weekly cache cleanup — crontab 0 3 * * 0 docker exec mastodon-web tootctl media remove --days 7 ``` **What gets removed:** Only cached copies of remote media. Local uploads (your posts, your users' posts) are never touched. Remote media will be re-fetched on demand if someone views the post again. **Storage impact:** On a single-user instance, remote media cache can still reach several GB over a few months of active federation. Regular cleanup keeps disk usage predictable. ## Gotchas & Notes - **Character limit changes break on upgrades.** Any source patch gets overwritten when you pull a new Mastodon release. Track your changes and reapply after updates. - **`tootctl` is your admin CLI.** It handles media cleanup, user management, federation diagnostics, and more. Run `tootctl --help` for the full list. - **Monitor disk usage.** Even with cache cleanup, the PostgreSQL database and local media uploads grow over time. Keep an eye on it. ## See Also - [self-hosting-starter-guide](../docker/self-hosting-starter-guide.md) - [docker-healthchecks](../docker/docker-healthchecks.md)