Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mastodon
  3. Cloudron + Mastodon + Akamai s3

Cloudron + Mastodon + Akamai s3

Scheduled Pinned Locked Moved Mastodon
9 Posts 3 Posters 1.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mhgcicM Offline
    mhgcicM Offline
    mhgcic
    wrote on last edited by
    #1

    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?

    Mersey Hub Group CIC
    Non-profit Charitable Organisation
    https://www.mhgcic.org.uk

    1 Reply Last reply
    0
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @mhgcic see https://docs.cloudron.io/apps/mastodon/#s3-for-media-storage . there's also a discussion at https://forum.cloudron.io/topic/8330/backing-up-media-cache/ and https://forum.cloudron.io/topic/8291/adding-s3-bucket/2

      mhgcicM 1 Reply Last reply
      1
      • girishG girish

        @mhgcic see https://docs.cloudron.io/apps/mastodon/#s3-for-media-storage . there's also a discussion at https://forum.cloudron.io/topic/8330/backing-up-media-cache/ and https://forum.cloudron.io/topic/8291/adding-s3-bucket/2

        mhgcicM Offline
        mhgcicM Offline
        mhgcic
        wrote on last edited by
        #3

        @girish

        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.

        Mersey Hub Group CIC
        Non-profit Charitable Organisation
        https://www.mhgcic.org.uk

        girishG jdaviescoatesJ 2 Replies Last reply
        0
        • mhgcicM mhgcic

          @girish

          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.

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @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.

          mhgcicM 1 Reply Last reply
          1
          • girishG girish

            @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.

            mhgcicM Offline
            mhgcicM Offline
            mhgcic
            wrote on last edited by
            #5

            @girish thanks I will take a look.

            Mersey Hub Group CIC
            Non-profit Charitable Organisation
            https://www.mhgcic.org.uk

            1 Reply Last reply
            0
            • jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote on last edited by
              #6

              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.

              I use Cloudron with Gandi & Hetzner

              mhgcicM 1 Reply Last reply
              1
              • jdaviescoatesJ jdaviescoates

                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.

                mhgcicM Offline
                mhgcicM Offline
                mhgcic
                wrote on last edited by
                #7

                @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
                

                Mersey Hub Group CIC
                Non-profit Charitable Organisation
                https://www.mhgcic.org.uk

                1 Reply Last reply
                1
                • jdaviescoatesJ Offline
                  jdaviescoatesJ Offline
                  jdaviescoates
                  wrote on last edited by
                  #8

                  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
                  

                  I use Cloudron with Gandi & Hetzner

                  1 Reply Last reply
                  0
                  • mhgcicM mhgcic

                    @girish

                    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.

                    jdaviescoatesJ Offline
                    jdaviescoatesJ Offline
                    jdaviescoates
                    wrote on last edited by jdaviescoates
                    #9

                    @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

                    I use Cloudron with Gandi & Hetzner

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search