Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3_BUCKET appended to S3_HOSTNAME causes an issue with Digital Ocean Spaces #20347

Closed
Michael-Brooks opened this issue Nov 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Michael-Brooks
Copy link

Steps to reproduce the problem

  1. Create a Digital Ocean Space
  2. Add Digital Ocean Space details to the S3 environment variables
    ...

Expected behaviour

https://mastodonassets.fra1.digitaloceanspaces.com/accounts/avatars/000/000/005/original/639522c276743cd4.jpg

Actual behaviour

https://mastodonassets.fra1.digitaloceanspaces.com/mastodonassets/accounts/avatars/000/000/005/original/639522c276743cd4.jpg

Detailed description

Digital Ocean Spaces is a drop-in replacement for Amazon's S3 storage. It is the same configuration, but they never append their bucket name to the URL's end as Mastodon expects. If I leave the S3_BUCKET blank, it still fails because there are no two forward slashes because it expects the directory to be there.

S3_ENABLED=true
S3_BUCKET=mastodonassets
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
S3_PROTOCOL=https
S3_HOSTNAME=mastodonassets.fra1.digitaloceanspaces.com
S3_ENDPOINT=https://fra1.digitaloceanspaces.com/

Specifications

Mastodon v3.5.3

@Michael-Brooks Michael-Brooks added the bug Something isn't working label Nov 10, 2022
@Michael-Brooks
Copy link
Author

Fixed using S3_ALIAS_HOST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant