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
  • Brite
  • 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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. PeerTube
  3. [GUIDE] Move PeerTube video storage to Hetzner S3

[GUIDE] Move PeerTube video storage to Hetzner S3

Scheduled Pinned Locked Moved PeerTube
guides
9 Posts 4 Posters 1.4k Views 4 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.
  • archosA Offline
    archosA Offline
    archos
    translator
    wrote on last edited by james
    #1

    Hi everyone,
    after a few failed attempts with other S3 providers like iDrive and Backblaze,
    I tried Hetzner Object Storage (S3) — where we also host our Cloudron servers.
    Here’s my working setup and migration process — maybe it helps someone.
    Everything works great: I’ve successfully moved ~240 GB of videos, all without issues.

    This guide shows how to move PeerTube video storage to Hetzner Object Storage (S3-compatible) on a Cloudron instance. Tested with PeerTube 7.3.0 and Cloudron v8.3.2 (Ubuntu 24.04.1 LTS)

    1️⃣ Create your S3 bucket(s)

    • Region: fsn1 (Falkenstein)
    • Visibility: Public (read)
    • Block Public Access: off
      Example buckets:
    • peertube-1

    2️⃣ Set CORS configuration

    Create a file called example-cors.xml:

    <CORSConfiguration>
      <CORSRule>
        <AllowedHeader>*</AllowedHeader>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>HEAD</AllowedMethod>
        <AllowedOrigin>*</AllowedOrigin>
      </CORSRule>
    </CORSConfiguration>
    

    Apply it to your bucket(s):

    s3cmd --config=/dev/null --no-check-certificate \
      --access_key=YOUR_ACCESS_KEY \
      --secret_key=YOUR_SECRET_KEY \
      --host=fsn1.your-objectstorage.com \
      --host-bucket="%(bucket)s.fsn1.your-objectstorage.com" \
      setcors example-cors.xml s3://peertube-1
    

    Check it:

    s3cmd --config=/dev/null --no-check-certificate \
      --access_key=YOUR_ACCESS_KEY \
      --secret_key=YOUR_SECRET_KEY \
      --host=fsn1.your-objectstorage.com \
      --host-bucket="%(bucket)s.fsn1.your-objectstorage.com" \
      info s3://peertube-1 | grep CORS -A1
    

    You should see:

    CORS: <CORSConfiguration ...><AllowedOrigin>*</AllowedOrigin>...</CORSConfiguration>
    

    3️⃣ Edit PeerTube configuration

    Open /app/data/production.yaml (Cloudron path) and add or modify this block:

    object_storage:
      enabled: true
      endpoint: 'https://fsn1.your-objectstorage.com'
      region: 'eu-central'
      credentials:
        access_key_id: 'YOUR_ACCESS_KEY'
        secret_access_key: 'YOUR_SECRET_KEY'
      videos:
        bucket_name: 'peertube-1'
        prefix: 'videos/'
        base_url: 'https://peertube-1.fsn1.your-objectstorage.com'
        upload_acl: 'public-read'
      streaming_playlists:
        bucket_name: 'peertube-1'
        prefix: 'hls/'
        base_url: 'https://peertube-1.fsn1.your-objectstorage.com'
        upload_acl: 'public-read'
      previews:
        bucket_name: 'peertube-1'
        prefix: 'previews/'
        base_url: 'https://peertube-1.fsn1.your-objectstorage.com'
        upload_acl: 'public-read'
      thumbnails:
        bucket_name: 'peertube-1'
        prefix: 'thumbnails/'
        base_url: 'https://peertube-1.fsn1.your-objectstorage.com'
        upload_acl: 'public-read'
      captions:
        bucket_name: 'peertube-1'
        prefix: 'captions/'
        base_url: 'https://peertube-1.fsn1.your-objectstorage.com'
        upload_acl: 'public-read'
    

    Save and restart PeerTube from the Cloudron dashboard.

    4️⃣ Move videos to S3

    From the Cloudron Web Terminal:

    cd /app/code/server
    
    gosu cloudron:cloudron npm run create-move-video-storage-job -- --to-object-storage
    

    This creates jobs that migrate all videos to your S3 bucket. Progress can be monitored in Cloudron → App → Logs.

    5️⃣ Verify

    Check the directory size before/after:

    du -sh /app/data/storage
    du -sh /app/data/storage/* | sort -h
    

    When migration finishes, most data (videos, HLS, previews) should move to S3. Local disk usage should drop to a few GB.

    Tested setup

    • PeerTube 7.3.0
    • Cloudron v8.3.2
    • Hetzner Object Storage (fsn1)
    1 Reply Last reply
    6
    • J joseph moved this topic from Discuss on
    • J Online
      J Online
      joseph
      Staff
      wrote on last edited by
      #2

      When you find some time, we can also put this into the community guides - https://docs.cloudron.io/guides/community/

      archosA 1 Reply Last reply
      4
      • J joseph

        When you find some time, we can also put this into the community guides - https://docs.cloudron.io/guides/community/

        archosA Offline
        archosA Offline
        archos
        translator
        wrote on last edited by
        #3

        @joseph Hi, glad to hear you liked the guide! 🙂
        Where can I request access or registration for your GitLab, so I can add the contribution there?
        Thanks!

        1 Reply Last reply
        0
        • J Online
          J Online
          joseph
          Staff
          wrote on last edited by
          #4

          @archos you can send a MR here - https://git.cloudron.io/docs/docs . It can go in this directory - https://git.cloudron.io/docs/docs/-/tree/master/knowledgebase/docs/guides/community?ref_type=heads . Do you already have an account on gitlab ? Otherwise , @girish or @nebulon can send you an invite .

          1 Reply Last reply
          0
          • archosA Offline
            archosA Offline
            archos
            translator
            wrote on last edited by
            #5

            I don’t have a GitLab account yet.
            @girish could you please send me an invite? 🙂

            girishG 1 Reply Last reply
            0
            • archosA archos

              I don’t have a GitLab account yet.
              @girish could you please send me an invite? 🙂

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

              @archos should I use the email on this forum?

              archosA 1 Reply Last reply
              0
              • girishG girish

                @archos should I use the email on this forum?

                archosA Offline
                archosA Offline
                archos
                translator
                wrote on last edited by
                #7

                @girish said in [GUIDE] Move PeerTube video storage to Hetzner S3:

                @archos should I use the email on this forum?

                Yes, please use the same email I use for this forum. 👍

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  stoccafisso
                  wrote on last edited by
                  #8

                  Hi all. Anyone tried this with DigitalOcean Spaces? Is there a guide somewhere for that?

                  archosA 1 Reply Last reply
                  1
                  • S stoccafisso

                    Hi all. Anyone tried this with DigitalOcean Spaces? Is there a guide somewhere for that?

                    archosA Offline
                    archosA Offline
                    archos
                    translator
                    wrote on last edited by
                    #9

                    @stoccafisso DigitalOcean Spaces should work fine — it's a standard S3-compatible storage.
                    The setup is basically the same as in the guide.
                    Just use your DO endpoint and access keys.

                    1 Reply Last reply
                    1
                    • jdaviescoatesJ jdaviescoates referenced this topic on

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    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