bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.26k stars 265 forks source link

Documentation: Known working external storage configurations #3005

Open futzle opened 1 year ago

futzle commented 1 year ago

Is your feature request related to a problem? Please describe. Setting up S3-compatible storage for my instance was a challenge because my provider was a little bit nonstandard, leading to extra top-level directories and a mismatch between the links generated by Bookwyrm and the locations that files were uploaded to.

Describe the solution you'd like A page in the documentation (or a section on the existing External Storage page) listing configurations for cloud providers that are known to work.

Example I'll start with my Linode Object Storage configuration. BucketName is the name of the bucket I created in the Linode UI. RegionName is the name of the Linode Object Storage region (in my case, ap-south-1).

In the Linode web UI, create a bucket called BucketName. In the Details popup, set the ACL to Public Read and enable the CORS button. The default CORS behaviour is sufficient, if somewhat permissive, and the extra steps listed in the "CORS Settings" section are not needed on Linode unless you want to lock access down.

Create an access key (the name is immaterial) and give it write access to the bucket BucketName. Note the access key ID AccessKeyID and secret AccessKeySecret for pasting into the .env file.

.env looks like this

USE_S3=true
AWS_ACCESS_KEY_ID="AccessKeyID"
AWS_SECRET_ACCESS_KEY="AccessKeySecret"
AWS_STORAGE_BUCKET_NAME="BucketName"
AWS_S3_CUSTOM_DOMAIN="BucketName.RegionName.linodeobjects.com"
AWS_S3_REGION_NAME="RegionName"
AWS_S3_ENDPOINT_URL="https://RegionName.linodeobjects.com"

Note: Do not put the bucket name into AWS_S3_ENDPOINT_URL or you will have an extraneous top-level directory with the name of your bucket, leading to mismatches in URLs and storage locations.

damian-murphy commented 11 months ago

Hi,

I had the same issue and filed a PR to the documentation project covering it here https://github.com/bookwyrm-social/documentation/pull/117 , which may cover this.

This issue is also related to this one #2323

cheers, Damian