Follow

I know there are quite some struggling with the disk space usage of the mastodon instance they maintain. The issue is not acknowledged enough and there are very few ways you can mitigate this using the official mastodon tools etc. Even better, often the proposed 'solution' is to 'get more disk space lol'.

Here's a compilation of recipes on how we try to deal with this for post.lurk.org as we learn by doing.

things.bleu255.com/runyourown/

In general we document many parts of lurk.org on that wiki so that other collectives can use that information:

things.bleu255.com/runyourown/

@rra Glad my little script was able to help others here haha. My tiny little server was being consumed by Mastodon.

@rra Thanks for sharing your tips! Cleaning the yarn cache is a helpful one for me (especially since I run multiple instances on one server).

Also: switching from local media storage to an S3-compatible server was a big help for me. Disk doesn't grow nearly as fast now (just the Postgres database, not the media files).

I'm also curious how other #MastoAdmins are dealing with the memory growth. I have to restart every month or so, or it reaches my server's max of 8GB (running 3 instances).

@nolan @rra Can't we remove everything but the local toots and media, and the global toots that are boosted and liked (and say the last few days of toots)?

@rra Or just use Pleroma and avoid all those hassles.

@rra
Might be worth making your media attachments script a bit more robust?

```
#!/bin/bash

if [[ -n $1 ]]; then
DAYS=$1
else
DAYS=3
fi

if [[ $(whoami) != "mastodon" ]]; then
echo "Must run as 'mastodon' user..."
exit 2
fi
MASTOHOME=${MASTOHOME:-/home/mastodon}
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export RAILS_ENV=production

"${MASTOHOME}/live/bin/tootctl" statuses remove
"${MASTOHOME}/live/bin/tootctl" media remove --days="${DAYS}"
```

@rra Otherwise, for someone hosting a small instance, this is great!

Sign in to participate in the conversation
post.lurk.org

Hometown is adapted from Mastodon, a decentralized social network with no ads, no corporate surveillance, and ethical design.