Cloudron + Mastodon + Akamai s3
-
I am trying to get our Mastodons on our Cloudron server to work with Akamai s3 storage, we found this.
https://www.linode.com/docs/guides/linode-object-storage-with-mastodon/?utm_source=marketo
But only helpful if using their marketplace app.
When adding configuration to .env and try to upload the folders etc are created on the s3 bucket, but no image shows on the instance.
I think it is Configuring an NGINX Proxy part as in the explorer in cloudron it doesn't show
File: /etc/nginx/sites-available/example.com.conf
Am I correct?
-
-
We added this solution already and did not work.
S3_ENABLED=true S3_BUCKET=bucket-name AWS_ACCESS_KEY_ID=<key_id> AWS_SECRET_ACCESS_KEY=<secret_key> S3_REGION=<region> S3_PROTOCOL=https S3_HOSTNAME=<hostname>
When you upload anything you get a cloudron app error, hence we looked at using akamai s3 documentation and it works and creates lots of folders etc in the bucket, but you can't actually see the images displayed on mastodon just shows as a blank image.
-
@mhgcic mm, you will have to ask this upstream then for the correct app configuration at https://github.com/mastodon/mastodon/discussions
There's a number of s3 related discussion upstream at https://github.com/search?q=repo%3Amastodon%2Fmastodon+s3&type=discussions . Maybe you get some ideas from there.
-
I've always found getting s3 working a process of trial and error and in my limited experience it often finally works after a small tweak like including https:// or not. Or exactly how you name the bucket etc. All depending on the specific quirks of the providers and apps in question.
-
@jdaviescoates said in Cloudron + Mastodon + Akamai s3:
I've always found getting s3 working a process of trial and error and in my limited experience it often finally works after a small tweak like including https:// or not. Or exactly how you name the bucket etc. All depending on the specific quirks of the providers and apps in question.
We found that the best way is to mount a s3 to a virtual machine, we found this if you are hosted with Akamai.
Example Notes This example will use mybucket as our bucket name, us-east-1 as our region and /mount/s3 as our mount point. USEYOURREALACCESSKEY123 will be our access key, and USEyourREALsecretKEYhereITisLONGER456 will be our secret key. Wherever these values appear, feel free to substitute your own. Create a mount point mkdir -p /mount/s3 Edit your /etc/fstab file Add the following on a single line: mybucket /mount/s3 fuse.s3fs _netdev,allow_other,use_path_request_style,url=https://us-east-1.linodeobjects.com/ 0 0 Credentials Put your credentials in /etc/passwd-s3fs separated by a colon: USEYOURREALACCESSKEY123:USEyourREALsecretKEYhereITisLONGER456 Set the passwd-s3fs file's permissions: chmod 600 /etc/passwd-s3fs Mount your bucket mount -a Limitations From: https://github.com/s3fs-fuse/s3fs-fuse Generally S3 cannot offer the same performance or semantics as a local file system. More specifically: * random writes or appends to files require rewriting the entire file * metadata operations such as listing directories have poor performance due to network latency * no atomic renames of files or directories * no coordination between multiple clients mounting the same bucket * no hard links * inotify detects only local modifications, not external ones by other clients or tools
-
Just for the record in case it helps someone, this are my working S3 settings I have in my Mastodon (storing data in Scaleway S3 Buckets)
# Store data on Scaleway S3 object S3_ENABLED=true S3_BUCKET=media.uniteddiversity.coop AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=xxx S3_REGION=fr-par S3_PROTOCOL=https S3_HOSTNAME=s3.fr-par.scw.cloud S3_ENDPOINT=https://s3.fr-par.scw.cloud
-
@mhgcic said in Cloudron + Mastodon + Akamai s3:
We added this solution already and did not work.
S3_ENABLED=true
S3_BUCKET=bucket-name
AWS_ACCESS_KEY_ID=<key_id>
AWS_SECRET_ACCESS_KEY=<secret_key>
S3_REGION=<region>
S3_PROTOCOL=https
S3_HOSTNAME=<hostname>You seem to be missing the
S3_ENDPOINT