Mastodon server management

Mastodon is an open source, self-hosted, social networking service. Mastodon uses the ActivityPub protocol for federation which allows users to communicate between independent Mastodon instances and other ActivityPub compatible services. Mastodon has microblogging features similar to Twitter, and is generally considered to be a part of the Fediverse. – info from Wikipedia

To manage your Mastodon instance first login to your server.

Change to mastodon user:

su - mastodon

Set the environment:

export RAILS_ENV=production

Add some folders to PATH:

export PATH="$HOME/.rbenv/bin:$PATH"

Change to the folder:

cd ~/live

All next commands are in the right folder, with the right environment.


Remove orphaned media files:

tootctl media remove-orphans

Show media storage usage:

tootctl media usage

Fix duplicates (offline):

tootctl maintenance fix-duplicates

Last updated on 2024:12:13 at 21:30 UTC

Leave a Reply

Your email address will not be published. Required fields are marked *

Filtered by Akismet. (privacy info).