Quick-wiki: Mastodon

Last update: 02/2022, Mastodon v3.4.6 from Docker Hub.

This is a quick-wiki for Mastodon, a federated, self-hostable social media software. As the installation was done via docker-compose, it’s more oriented towards it and may see fewer customizations.

Table of Content

Updates

## backup db
docker exec mastodon-db-1 pg_dump -Fc -U postgres postgres > name_of_the_backup.dump
cd mastodon
sed -i 's/v3.4.5/v3.4.6/g' docker-compose.yml
docker-compose pull
docker-compose up -d

Accounts

docker exec -it mastodon-web-1 sh
tootctl accounts create <USERNAME> --email=<EMAIL>
# a password would be generated for login

Note: Accounts need manual approval (confirm CTA) via <MASTODON_URL>/admin/accounts as email setup isn’t present.

docker exec -it mastodon-web-1 sh
tootctl accounts delete <USERNAME>

Database backup

docker exec mastodon-db-1 pg_dump -Fc -U postgres postgres > db.dump

Regain storage

docker exec -it mastodon-web-1 sh
tootctl media remove
tootctl media remove-orphans

Glossary

TODO