Object Storage: digitalocean Spaces

Hi, just set up my first mastodon server instance today on digitalocean. Apart from my server, I’m using their object storage platform, Spaces. Spaces is S3 compatible, but I can’t seem to configure the .env.production to interface with my space correctly. Looking through the logs, I see it making put requests to {S3_BUCKET}.s3.{S3_REGION}.amazonaws.com. I was hoping it would generate the url with all the env vars like so: {S3_BUCKET}.{S3_REGION}.{S3_HOSTNAME}.

Has anyone configured their instance to use Spaces before? Does anyone know how I can get more control over the url used by… Seahorse::Client (I think)?

Looks like S3_ENDPOINT can set the url statically rather than fighting each var to generate the final endpoint.

Calling this one solved.

I set this up on my instance! Here are all the configs I set:

# This is configured for Digital Ocean spaces

I set the alias host to the CDN for the bucket, digital ocean provides that one for me.

1 Like

Yeah, pretty much all the config I set as well. I had to use the S3_ENDPOINT explicitly, though I don’t believe the joinmastodon.org docs mentioned it. Also, I had to append my bucket name in the cdn alias which seemed odd. S3_ALIAS_HOST=${cdn_domain}/${bucket}.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.