How to migrate assets to S3?


I am running a Mastodon instance with about 100 users on a Linode instance that gives me 20G of HDD. With asset caching and frequent uploads I am slowly running out of disk space and want to avoid filling it up.

I am thinking about putting the assets on S3 for starters which will make this a non-issue. Has anyone migrated the assets of a running Mastodon instance to S3 before and can tell me roughly what steps are involved?

Afterwards, I’d like to find a good way to deprecate old, cached remote assets. Any advice on that is appreciated as well.


I did, and I wrote a guide based on what i discovered

may be a little out of date as of 1.4, i think things changed a little bit in the S3 variables, but cybrespace is still set up based on how this guide says it and everything is still working ok


Thank you for chiming in, I agree in principle. Unfortunately, you’re derailing from my actual question, which is:

How does one divide assets out from a running mastodon instance into a place where these assets are served better.

That can be AWS, that can be google, microsoft, whoever, that can be the server farm with a gigabit fiber line your neighbor runs in her basement.

Thank you! Your guide looks extremely useful! :slight_smile:

I tagged @chr’s guide as the solution to this question.

If you find that it is not, you can untag it. (This is a neat feature for questions that can have straight answers)

1 Like

This is awesome, will you mind contributing this to GitHub - tootsuite/documentation: Full documentation repository for Mastodon?