Mastodon Daily Maintenance
Remember to run these commands daily for those installing Mastodon instances to keep your server running smoothly.
Runing in a non-docker installation
$ tootctl search deploy
$ tootctl media remove --days=30
$ tootctl preview_cards remove --days=30
Running in a docker-compose installation
docker-compose -f /opt/mastodon-docker/docker-compose.yml run --rm shell tootctl search deploy
docker-compose -f /opt/mastodon-docker/docker-compose.yml run --rm shell tootctl media remove --days=30
docker-compose -f /opt/mastodon-docker/docker-compose.yml run --rm shell tootctl preview_cards remove --days=30
In our example, the mastodon docker config resides on the directory /opt/mastodon-docker.
Understanding each task
The first command (search deploy) will read the data inside your elastic search, create indexes for toots, tags, and links, and populate the explore page.
The last two commands will remove content from external instances cached in your disk. They will remove images, audio, video, avatars, user image headers (media remove) and preview cards thumbnails (preview_cards remove).
Creating cronjobs
# Daily 2 AM
00 2 * * * /opt/mastodon-scripts/clear_attachments.sh
# Daily 2:30 AM
30 2 * * * /opt/mastodon-scripts/clear_preview_cards.sh
# Daily 3:00 AM
00 3 * * * /opt/mastodon-scripts/generate_search_index.sh
In our example, the scripts reside in the directory /opt/mastodon-scripts.
Refs
- https://docs.joinmastodon.org/admin/tootctl/#media-remove
- https://docs.joinmastodon.org/admin/tootctl/#preview_cards-remove
- https://docs.joinmastodon.org/admin/tootctl/#search-deploy
Did you like our content?
We have a lot to share; visit our site!
Our fediverse services ;)
- mastodon => https://bolha.us
- mastopoet => https://poet.bolha.us
- elk => https://elk.bolha.us
- pinafore => https://pinafore.bolha.us
- pixelfed => https://bolha.photos
- lemmy => https://bolha.social
- writefreely => https://bolha.blog
- bookwyrm => https://bolha.review
- funkwhale => https://bolha.studio
- friendica => https://bolha.network
Chat and video? We have it!
- matrix => https://bolha.chat
- jitsi => https://bolha.video
Translation tools
- libretranslate => https://libretranslate.bolha.tools
- lingva => https://translate.bolha.tools
Video Platform Frontends
- invidious => https://bolha.in
Text Editors
- hedgeDoc => https://notes.bolha.tools
- wise Mapping => https://mindmap.bolha.tools
- overleaf => https://overleaf.bolha.tools
- mermaid => https://mermaid.bolha.tools
You can also visit our hacking space!
Follow our founder!
- https://bolha.us/@gutocarvalho
- https://bolha.photos/@gutocarvalho
- https://bolha.forum@gutocarvalho
- https://bolha.blog/@gutocarvalho
- https://bolha.review/@gutocarvalho
- https://bolha.studio/@gutocarvalho
- https://bolha.network/@gutocarvalho
- matrix => @bolha.chat@gutocarvalho
Follow the status of our tools
Do you want to support us? You can!
- https://www.patreon.com/bolha
- https://apoia.se/bolha
- pix@bolha.us (local brazilian wire transfer)
See you!
[s]