Lemmy, pictrs and S3 compatible storage

pimeys@lemmy.nauk.io to Lemmy@lemmy.ml – 17 points –

I'm running a small Lemmy server using the Ansible setup modified to our needs. Now, we do not post that many (if any) images, but I'm also running an Akkoma server with Cloudflare R2 setup for images, and I was wondering is there an easy way to just set the Lemmy server to use this bucket? Would be better than to just keep them lying around in the server disk for sure.

If somebody else did this, is there any written documentation on the best practices? I might need to (again) modify the Ansible scripts, but I'd love to not waste time making mistakes if there's a good way to do this.

2

Pictrs can use blob storage, there are environment variables for it's container to swap it over. Now that you will have to do a migration too, but pictrs provides this too.