Peertube AWS S3 Object Storage

Hello everyone,

I’m trying to set up video storage on S3, but it’s not working, when I upload a video it says:
« Moving to external storage failed, this video may not work properly. »

On the AWS S3 side I do have a working key with full authorization for S3. I tested it on a WordPress to store media files.

The buckets are open to the public.

Peertube is installed on a VPS under Yunohost.

In advance, thank you very much for your help :slight_smile:

Here is the production.yaml configuration:

Bonjour à tous,

Je tente de paramétrer le stockage des vidéos sur S3, mais ça ne fonctionne pas, quand j’upload une vidéo ça indique :
« Le déplacement vers le stockage externe a échoué, cette vidéo peut ne pas fonctionner correctement. »

Du côté de AWS S3 j’ai bien une clé fonctionnelle avec une autorisation complète pour le S3. Je l’ai testé sur un WordPress pour stocker les fichiers médias.

Les buckets sont ouverts au public.

Peertube est installé sur un VPS sous Yunohost.

Par avance merci beaucoup pour votre aide :slight_smile:

Voici la configuration de production.yaml :

object_storage:
  enabled: true

  # Without protocol, will default to HTTPS
  endpoint: 's3.eu-west-3.amazonaws.com' # 's3.amazonaws.com' or 's3.fr-par.scw.cloud' for example

  region: 'eu-west-3'

  upload_acl:
    # Set this ACL on each uploaded object of public/unlisted videos
    public: 'public-read'
    # Set this ACL on each uploaded object of private/internal videos
    # PeerTube can proxify requests to private objects so your users can access them
    private: 'private'

  proxy:
    # If private files (private/internal video files) have a private ACL, users can't access directly the ressource
    # PeerTube can proxify requests between your object storage service and your users
    # If you disable PeerTube proxy, ensure you use your own proxy that is able to access the private files
    # Or you can also set a public ACL for private files in object storage if you don't want to use a proxy
    proxify_private_files: true

  credentials:
    # You can also use AWS_ACCESS_KEY_ID env variable
    access_key_id: 'XXXXXXXXXXXXX'
    # You can also use AWS_SECRET_ACCESS_KEY env variable
    secret_access_key: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

  # Maximum amount to upload in one request to object storage
  max_upload_part: 10GB

  streaming_playlists:
    bucket_name: 'ss-hls-videos'

    # Allows setting all buckets to the same value but with a different prefix
    prefix: '' # 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: '' # Example: 'https://mirror.example.com'

  # Same settings but for webtorrent videos
  videos:
    bucket_name: 'ss-web-videos'
    prefix: ''
    base_url: ''

I managed to use the S3 from Amazon, it was the ACL that was not enabled in the bucket, but the video playback does not work. Je n’ai pas ce problème avec Backblaze

I’ve found :slight_smile:
I set up CORS in the bucket in AWS S3

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]