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. PeerTube
  3. Peertube and S3/Minio Objectstorage

Peertube and S3/Minio Objectstorage

Scheduled Pinned Locked Moved PeerTube
41 Posts 8 Posters 7.1k Views 9 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.
  • scookeS scooke

    @scooke Well, I'm getting ahead of myself. I've managed to set it up to upload to my Minio... but now there is a problem with playback. As in, the video doesn't playback. When I try to download it, the initial link says https://peertube.example.com/download/videos/longfilename.mp4 but then starting the download results in a failed white screen saying that the following can't be reached, https://peertube-miniobucket.minio.myserver.com/peertube-miniobucket/videos/longfilename.mp4 .

    The documentation I find online seems conflicting - some say Peertube doesn't work with S3, others say yes, and still a third says "yes but with a CDN directive". So I'm off to see what I can find out.

    girishG Do not disturb
    girishG Do not disturb
    girish
    Staff
    wrote on last edited by
    #19

    @scooke Try unsetting base_url and see if that works. I think base_url is for CDN setups which requires additional configuration - https://docs.joinpeertube.org/admin-remote-storage?id=cache-server . In a CDN setup, the video is served to the browser straight from minio (as opposed to browser -> peertube -> minio).

    scookeS 1 Reply Last reply
    2
    • girishG girish

      @scooke Try unsetting base_url and see if that works. I think base_url is for CDN setups which requires additional configuration - https://docs.joinpeertube.org/admin-remote-storage?id=cache-server . In a CDN setup, the video is served to the browser straight from minio (as opposed to browser -> peertube -> minio).

      scookeS Offline
      scookeS Offline
      scooke
      wrote on last edited by
      #20

      @girish Holy smokes. That did it. I just # commented out those two base_url lines, restarted the app, and now the upload works, and the download.

      Now, I thought I had reached a similar point before, but I think what I had missed was copying the new cert to the proper directory. Thus, it wasn't working.

      Now, it is. You sir are a magician.

      A life lived in fear is a life half-lived

      1 Reply Last reply
      0
      • A awnzky

        @scooke
        iam already try using contabo. it's does not work. contabo not support virtual host style, sorry for my bad english.
        its my working config. insert after storage section.
        if have an error you can check the logs from peertube administration. make sure minio support virtual host style requests
        https://github.com/Chocobozzz/PeerTube/issues/4455
        example vhost style like this : yourbucket.sin1.contabostorage.com
        path style : sin1.contabostorage.com/a808f6dce2514fba8eeb68596724ddd1:yourbucket

        object_storage:
          enabled: true
          # Without protocol, will default to HTTPS
          endpoint: 'e4u6.la11.idrivee2-5.com' # 's3.amazonaws.com' or 's3.fr-par.scw.cloud' for example
          region: 'us-la'
          # Set this ACL on each uploaded object
          upload_acl: ''
          credentials:
            # You can also use AWS_ACCESS_KEY_ID env variable
            access_key_id: 'secret'
            # You can also use AWS_SECRET_ACCESS_KEY env variable
            secret_access_key: 'secret'
          # Maximum amount to upload in one request to object storage
          max_upload_part: 2GB
          streaming_playlists:
            bucket_name: 'peertube'
            # Allows setting all buckets to the same value but with a different prefix
            prefix: 'streaming-playlists/' # Example: 'streaming-playlists:'
            # Base url for object URL generation, scheme and host will be replaced by this URL
            # Useful when you want to use a CDN/external proxy
            base_url: 'https://peertube.e4u6.la11.idrivee2-5.com' # Example: ''
          # Same settings but for webtorrent videos
          videos:
            bucket_name: 'peertube'
            prefix: 'videos/'
            base_url: 'https://peertube.e4u6.la11.idrivee2-5.com'
        
        jdaviescoatesJ Offline
        jdaviescoatesJ Offline
        jdaviescoates
        wrote on last edited by jdaviescoates
        #21

        @awnzky said in Peertube and S3/Minio Objectstorage:

        iam already try using contabo. it's does not work.

        Wish I'd read/ seen this earlier. I just spent hours pulling my hair trying to get contabo object storage to work with peertube but I just couldn't get it to work either 😞 (whereas on Scaleway it Just Worked - and even when it didn't work, like when I hadn't set the region, it gave useful error messages telling me what was wrong and how to fix it 👍 )

        However, even with the S3 connection to my Scaleway object buckets working fine, playback actually just didn't work 😞

        Playback with Object Storage disabled works fine.

        I don't have any base_url set anywhere.

        I use Cloudron with Gandi & Hetzner

        robiR 1 Reply Last reply
        0
        • jdaviescoatesJ jdaviescoates

          @awnzky said in Peertube and S3/Minio Objectstorage:

          iam already try using contabo. it's does not work.

          Wish I'd read/ seen this earlier. I just spent hours pulling my hair trying to get contabo object storage to work with peertube but I just couldn't get it to work either 😞 (whereas on Scaleway it Just Worked - and even when it didn't work, like when I hadn't set the region, it gave useful error messages telling me what was wrong and how to fix it 👍 )

          However, even with the S3 connection to my Scaleway object buckets working fine, playback actually just didn't work 😞

          Playback with Object Storage disabled works fine.

          I don't have any base_url set anywhere.

          robiR Offline
          robiR Offline
          robi
          wrote on last edited by
          #22

          @jdaviescoates playback may require the bucket to be https accessible, which is a setting.

          Conscious tech

          jdaviescoatesJ 1 Reply Last reply
          0
          • robiR robi

            @jdaviescoates playback may require the bucket to be https accessible, which is a setting.

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

            @robi said in Peertube and S3/Minio Objectstorage:

            @jdaviescoates playback may require the bucket to be https accessible, which is a setting.

            You mean making the bucket public? Already is. Can't find any other settings related to https.

            I use Cloudron with Gandi & Hetzner

            scookeS 1 Reply Last reply
            1
            • jdaviescoatesJ jdaviescoates

              @robi said in Peertube and S3/Minio Objectstorage:

              @jdaviescoates playback may require the bucket to be https accessible, which is a setting.

              You mean making the bucket public? Already is. Can't find any other settings related to https.

              scookeS Offline
              scookeS Offline
              scooke
              wrote on last edited by
              #24

              @jdaviescoates I wonder if the problem is the TYPE of bucket. In the comments above I was running a self-installed instance of Minio. That is, I didn't use Yunohost, or CapRover, or Cloudron, etc. I installed it by hand. Somehow (I guess I could figure it out by rereading the above) I set Minio up to use virtual-host, rather than path-style. And for whatever reason, Peertube (only) works with virtual-host style. Maybe this has something to do with it?

              FWIW (I'm only getting my own head sort of around all this), the end_point in teh config has to be whatever your API enpoint is. Off the top of my head, I forget how to tell which is which, but one address is the home adress, and the other is the end point address. That is to say, when it is being installed on mino.example.com, a second API address is created, something like minio-s3.example.com. The API is the address needed.

              A life lived in fear is a life half-lived

              jdaviescoatesJ 1 Reply Last reply
              1
              • scookeS scooke

                @jdaviescoates I wonder if the problem is the TYPE of bucket. In the comments above I was running a self-installed instance of Minio. That is, I didn't use Yunohost, or CapRover, or Cloudron, etc. I installed it by hand. Somehow (I guess I could figure it out by rereading the above) I set Minio up to use virtual-host, rather than path-style. And for whatever reason, Peertube (only) works with virtual-host style. Maybe this has something to do with it?

                FWIW (I'm only getting my own head sort of around all this), the end_point in teh config has to be whatever your API enpoint is. Off the top of my head, I forget how to tell which is which, but one address is the home adress, and the other is the end point address. That is to say, when it is being installed on mino.example.com, a second API address is created, something like minio-s3.example.com. The API is the address needed.

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

                @scooke said in Peertube and S3/Minio Objectstorage:

                Maybe this has something to do with it?

                That's why Contabo didn't work, I think.

                But Scaleway does support that and did work in that the files get transferred to the bucket fine. It's just that then playback basically doesn't work at all.

                I use Cloudron with Gandi & Hetzner

                scookeS 1 Reply Last reply
                0
                • jdaviescoatesJ jdaviescoates

                  @scooke said in Peertube and S3/Minio Objectstorage:

                  Maybe this has something to do with it?

                  That's why Contabo didn't work, I think.

                  But Scaleway does support that and did work in that the files get transferred to the bucket fine. It's just that then playback basically doesn't work at all.

                  scookeS Offline
                  scookeS Offline
                  scooke
                  wrote on last edited by
                  #26

                  @jdaviescoates Care to share your config (the pertinent part)?

                  A life lived in fear is a life half-lived

                  jdaviescoatesJ 1 Reply Last reply
                  0
                  • scookeS scooke

                    @jdaviescoates Care to share your config (the pertinent part)?

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

                    @scooke

                    # Store all videos in one bucket on Scaleway
                    object_storage:
                      enabled: true
                      # Scaleway endpoint
                      endpoint: 's3.fr-par.scw.cloud'
                      region: 'fr-par'
                      videos:
                        bucket_name: 'bridport-tv'
                        prefix: 'videos/'
                      # Use the same bucket as for webtorrent videos but with a different prefix
                      streaming_playlists:
                        bucket_name: 'bridport-tv'
                        prefix: 'streaming-playlists/'
                      credentials:
                        access_key_id: 'xxxxx'
                        secret_access_key: 'xxxxx'
                    

                    That's was working fine for getting stuff into the bucket, but then videos didn't actually play

                    Bucket is also public:

                    d227c5b8-5e67-4b15-9214-75d687032f0c-image.png

                    I use Cloudron with Gandi & Hetzner

                    robiR 1 Reply Last reply
                    0
                    • jdaviescoatesJ jdaviescoates

                      @scooke

                      # Store all videos in one bucket on Scaleway
                      object_storage:
                        enabled: true
                        # Scaleway endpoint
                        endpoint: 's3.fr-par.scw.cloud'
                        region: 'fr-par'
                        videos:
                          bucket_name: 'bridport-tv'
                          prefix: 'videos/'
                        # Use the same bucket as for webtorrent videos but with a different prefix
                        streaming_playlists:
                          bucket_name: 'bridport-tv'
                          prefix: 'streaming-playlists/'
                        credentials:
                          access_key_id: 'xxxxx'
                          secret_access_key: 'xxxxx'
                      

                      That's was working fine for getting stuff into the bucket, but then videos didn't actually play

                      Bucket is also public:

                      d227c5b8-5e67-4b15-9214-75d687032f0c-image.png

                      robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #28

                      @jdaviescoates if you get a public link, does it play in the browser?

                      compare that to the link the app tries to use?

                      Conscious tech

                      jdaviescoatesJ 2 Replies Last reply
                      0
                      • robiR robi

                        @jdaviescoates if you get a public link, does it play in the browser?

                        compare that to the link the app tries to use?

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

                        @robi said in Peertube and S3/Minio Objectstorage:

                        @jdaviescoates if you get a public link, does it play in the browser?

                        Yes

                        I use Cloudron with Gandi & Hetzner

                        1 Reply Last reply
                        0
                        • robiR robi

                          @jdaviescoates if you get a public link, does it play in the browser?

                          compare that to the link the app tries to use?

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

                          @robi said in Peertube and S3/Minio Objectstorage:

                          compare that to the link the app tries to use?

                          Looking for that I spotted this:

                          CORS Missing Allowed Origin

                          I guess that's likely the problem...

                          (man, it's SO much easier doing this stuff when I'm not both freezing cold and way too tired! /me reminds himself, again, to get more f-ing sleep and go to bed on f-ing time!)

                          I use Cloudron with Gandi & Hetzner

                          jdaviescoatesJ 1 Reply Last reply
                          1
                          • jdaviescoatesJ jdaviescoates

                            @robi said in Peertube and S3/Minio Objectstorage:

                            compare that to the link the app tries to use?

                            Looking for that I spotted this:

                            CORS Missing Allowed Origin

                            I guess that's likely the problem...

                            (man, it's SO much easier doing this stuff when I'm not both freezing cold and way too tired! /me reminds himself, again, to get more f-ing sleep and go to bed on f-ing time!)

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

                            Woohoo! 😄

                            So, after following this guide:

                            https://www.scaleway.com/en/docs/storage/object/api-cli/object-storage-aws-cli/

                            And then this guide:

                            https://www.scaleway.com/en/docs/storage/object/api-cli/setting-cors-rules/

                            I now have videos stored on S3 that ALSO play! 😄

                            https://bridport.tv/w/hCegSC1b9YGW5hAgbQbFcE

                            I use Cloudron with Gandi & Hetzner

                            jdaviescoatesJ 1 Reply Last reply
                            3
                            • jdaviescoatesJ jdaviescoates

                              Woohoo! 😄

                              So, after following this guide:

                              https://www.scaleway.com/en/docs/storage/object/api-cli/object-storage-aws-cli/

                              And then this guide:

                              https://www.scaleway.com/en/docs/storage/object/api-cli/setting-cors-rules/

                              I now have videos stored on S3 that ALSO play! 😄

                              https://bridport.tv/w/hCegSC1b9YGW5hAgbQbFcE

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

                              Scaleway are great. Good prices, great docs!

                              I was tempted by special offer Contabo pricing, but unlike Scaleway they aren't 100% renewably powered (although their German based stuff when I'd bought some object storage is), and their docs are crap.

                              So looks like I'll just ditch Contabo and stick with using Scaleway for my Object Storage needs.

                              I use Cloudron with Gandi & Hetzner

                              1 Reply Last reply
                              2
                              • S Offline
                                S Offline
                                SamGreenwood
                                wrote on last edited by
                                #33

                                anyone done this on Linode?

                                1 Reply Last reply
                                0
                                • scookeS scooke

                                  I recently discovered how to host media from my Cloudron-hosted Mastodon instance on my Minio instance (non-Cloudron), and it works great. So I started exploring what else I can use my Minio storage for, and found a plugin for Wordpress, , that also works well. So now, I'm trying to see how to use it for Peertube, which apparently can use objectstorage. I've found the following links with sample yaml files, but I haven't been able to get it working on my own Cloudron-hosted Peertube instance. Has anyone else had success?

                                  https://docs.joinpeertube.org/admin-remote-storage

                                  https://framacolibri.org/t/redundancy-videos-not-able-to-use-object-storage/14668

                                  https://github.com/Chocobozzz/PeerTube/blob/develop/support/docker/production/config/custom-environment-variables.yaml#L24

                                  https://github.com/Chocobozzz/PeerTube/blob/develop/config/production.yaml.example

                                  https://github.com/Chocobozzz/PeerTube/blob/develop/support/docker/production/config/production.yaml

                                  https://framagit.org/framasoft/peertube/PeerTube/-/blob/c342726ad4ccbb90b8ff29f1cc1c89f9f7e8d98f/config/production.yaml.example

                                  L Offline
                                  L Offline
                                  LoudLemur
                                  wrote on last edited by LoudLemur
                                  #34

                                  @scooke Thanks for asking this question. I might try this using block storage with Wasabi and PeerTube.

                                  Why is object storage suitable for this task? Isn't object storage better for keeping gigantic files? I suppose a considerable archive of videos would end up needing a large amount of storage, but they would all be separate files.

                                  jdaviescoatesJ 1 Reply Last reply
                                  0
                                  • L LoudLemur

                                    @scooke Thanks for asking this question. I might try this using block storage with Wasabi and PeerTube.

                                    Why is object storage suitable for this task? Isn't object storage better for keeping gigantic files? I suppose a considerable archive of videos would end up needing a large amount of storage, but they would all be separate files.

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

                                    @LoudLemur said in Peertube and S3/Minio Objectstorage:

                                    Why is object storage suitable for this task? Isn't object storage better for keeping gigantic files?

                                    Video files are relatively large files.

                                    But aside from that, often VPS servers don't come with much disk space and so Object Storage is just one relatively cheap way of increasing the amount of storage you have.

                                    @LoudLemur said in Peertube and S3/Minio Objectstorage:

                                    Wasabi

                                    Lots of people on here seem to have moved away from them for various reasons.

                                    The cheapest out there seems to be iDrive e2 who have a 90% off offer which makes it insanely cheap for the first year (and pretty good value after that):

                                    https://www.idrive.com/e2/

                                    Personally I use Scaleway who are also good value and 100% powered by renewable energy

                                    https://www.scaleway.com/en/

                                    I've got all my instances of Peertube, Mastodon, and Pixelfed all storing their data on Scaleway Object Storage.

                                    I use Cloudron with Gandi & Hetzner

                                    L 1 Reply Last reply
                                    2
                                    • jdaviescoatesJ jdaviescoates

                                      @LoudLemur said in Peertube and S3/Minio Objectstorage:

                                      Why is object storage suitable for this task? Isn't object storage better for keeping gigantic files?

                                      Video files are relatively large files.

                                      But aside from that, often VPS servers don't come with much disk space and so Object Storage is just one relatively cheap way of increasing the amount of storage you have.

                                      @LoudLemur said in Peertube and S3/Minio Objectstorage:

                                      Wasabi

                                      Lots of people on here seem to have moved away from them for various reasons.

                                      The cheapest out there seems to be iDrive e2 who have a 90% off offer which makes it insanely cheap for the first year (and pretty good value after that):

                                      https://www.idrive.com/e2/

                                      Personally I use Scaleway who are also good value and 100% powered by renewable energy

                                      https://www.scaleway.com/en/

                                      I've got all my instances of Peertube, Mastodon, and Pixelfed all storing their data on Scaleway Object Storage.

                                      L Offline
                                      L Offline
                                      LoudLemur
                                      wrote on last edited by
                                      #36

                                      @jdaviescoates You are so good to me!
                                      Thank you. I shall look into those.

                                      1 Reply Last reply
                                      1
                                      • benborgesB Offline
                                        benborgesB Offline
                                        benborges
                                        wrote on last edited by benborges
                                        #37

                                        I'm wondering if there is a path to do this with Peertube + Hetzner storage box or if the S3 Storage objects way is the only way to store peertube video content outside the cloudron, anyone tried ?

                                        edit : Hmm apparently, the answer is no, only S3 is supported : https://docs.joinpeertube.org/maintain/remote-storage#migrate-to-another-object-storage-provider

                                        BenB

                                        jdaviescoatesJ 1 Reply Last reply
                                        1
                                        • benborgesB benborges

                                          I'm wondering if there is a path to do this with Peertube + Hetzner storage box or if the S3 Storage objects way is the only way to store peertube video content outside the cloudron, anyone tried ?

                                          edit : Hmm apparently, the answer is no, only S3 is supported : https://docs.joinpeertube.org/maintain/remote-storage#migrate-to-another-object-storage-provider

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

                                          @benborges said in Peertube and S3/Minio Objectstorage:

                                          I'm wondering if there is a path to do this with Peertube + Hetzner storage box or if the S3 Storage objects way is the only way to store peertube video content outside the cloudron, anyone tried ?

                                          You might be able to mount a Volume and then use that for the data directory? 🤷

                                          I use Cloudron with Gandi & Hetzner

                                          benborgesB 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