Anyone running their mastodon instance using a cloud hosting object storage service (s3, etc)? I am in awe at how fast the storage needs of are growing.

@jerry I'm using s3 compatible service and its working pretty well.

@tursiops what service are you using, and how expensive is it?

M8, if you could bind a network drive (sshfs) to your main mastoserver, seedboxes are cheap per dollar.

@m4iler @tursiops seems like performance would suffer. Client needs to make a connection to, which has to request the file from the seedbox, which effectively uploads to, which then gets sent to the client.

@jerry @m4iler my server is in Switzerland so the data has not much to travel and with good bandwith between the two services it helps. At least my instance performance now cannot be perceptively noticed. Maybe with numbers it's indeed slower but I use it every day and to me it's imperceptible

@jerry @m4iler @tursiops I run a diaspora pod with assets stored on S3 and distributed via cloudfront. One downside on that is security-by-obscurity. All S3 objects are effectively public (on that software's setup). Any photo published to a subset of users gets a public URL. So the whole limited distribution/restriction thing (on diaspora) is a bit flimsy.

@jerry @m4iler @tursiops Obviously it doesn't have to be that way. There are clever tricks to use authentication and signed URLs and such. It's just that diaspora doesn't do any of them. The alternative is to authorise the EC2 instance to read S3, but not to authorise CloudFront or direct S3 access. Data still passes through the EC2 instance, and there's no caching, etc. But you have solid access control and unlimited S3 storage.

@jerry @m4iler @tursiops The other AWS choice is EFS, which is basically an NFS-style interface to an unlimited, pay-as-you-go filesystem that has S3 durability. I think it's pricey ($0.30 per gig), so I don't use it.

@jerry Hi I'm using and it's 0.01800
EUR GB / month

@jerry I'm not on Mastodon and I'm not using S3, but my attachments directory is 474 Gigabytes right now.

@jerry How much storage are we talking about?

Perhaps remove cached media attachments? From my maintenance script:

rails mastodon:media:remove_remote 2>&1 >/dev/null

@ServerStatus about 100GB and growing about 20GB/month. I have that same script, but I actually think that it no longer works as of 2.5.0, when those maintenance jobs were merged into the main code

@jerry Ah, looks like it changed here:

Might be worth giving that a run an seeing what impact it has. Remote media is by far the biggest hog on this server, currently sitting at approximately 112G.

@ServerStatus thanks for that. For some reason, I thought it was automatically running periodically starting in 2.5.0. I’ll give that a try.

@jerry perfect. Thanks for the heads up about the change in 2.5, I need to ammend my scripts now as well. It really should be automatic and built-in, but alas.

If cost is a concern, definitely look into Backblaze's Not-S3, B2. $5/TB storage, $10/TB transfer.

Sign in to participate in the conversation
Infosec Exchange

A Mastodon instance for info/cyber security-minded people.