Freitag, 13. Februar 2026

Yunohost fix userlogin peertube via ldap

Using Yunohost version 12.1.39 with peertube 8.0.2 and also after a clean reinstall i can't login with my yunohost users. So after some research i found the simple trick to put the correct informaitons in the plugin configuration and it just works.

Mind that if you install PeerTube with your yunohost user the email of this user gets the one of the root user whicht is beeing created at installing. If you want to use your own yunohost account separate you have to change the admin emailadress to another one!

For setting the correct konfiguration for ldap-auth so you can login with your yunohost users without creating them separately log in with your root user, go to Administration->Settings->Plugins/Designs->auth-ldap and put in:

URL: ldap://localhost:389

Bind DN: [NULL]

Bind Passwort: [NULL]

Search base: dc=yunohost,dc=org

Filter (already was in there in my case): (|(mail={{username}})(uid={{username}}))

Mail property (already was in there in my case): mail

Mail property index (already was in there in my case): 0

Username property (already was in there in my case): uid

Group base: [NULL]

Group filter: (member={{dn}})

Administrator group DN: [NULL]

Moderator group DN: [NULL]

User group DN: [NULL]

Checkbox "No group matches login" keep unchecked


then Update settings and you should be able to login with your yunohost users in peertube now!

Yunohost Peertube Setup Wasabi S3 Storage

Der Storage kann nicht in der Admin-Oberfläche von Peertube eingestellt werden, es muss auf die Konsole zurückgeriffen werden. Ich habe die Installation mit Yunohost durchgeführt, hier wird erwähnt, dass man die Konfiguration updatefähig macht, in dem man eine neue Datei /var/www/peertube/config/local.yaml anlegt. Wir direkt die /var/www/peertube/config/production.yaml bearbeitet wird das beim nächsten Update überschrieben

Wasabi konfigurieren

Zuerst lege ich den bucket "peertube-data" an, dann in meinem Wasabi-Account eine neue Richtlinie an, sodass wenn aus irgend einem Grund meine Konfigurationsdatei nach außen geht nur der Zugriff auf den einen S3 Bucket frei ist und nicht auf alle Buckes in meinem Account. 


{

  "Version": "2012-10-17",

  "Statement": [

    {

      "Effect": "Allow",

      "Action": "s3:*",

      "Resource": [

        "arn:aws:s3:::peertube-data/*",

        "arn:aws:s3:::peertube-data"

      ]

    }

  ]

}

Dann lege ich den user peertube an und weise ihm nur diese eine Richtlinie zu. 


Peertube konfigurieren

 per ssh auf den Server, Datei anlegen 


vi /var/www/peertube/config/local.yaml


und dann folgenden Inhalt einfügen, in meinem Beispiel für den eu-central-2 (Frankfurt) Speicher von Wasabi:


object_storage:

  enabled: true

  endpoint: 's3.eu-central-2.wasabisys.com'

  region: 'eu-central-2'

  credentials:

    access_key_id: '<<access-key-id>>'

    secret_access_key: '<<long-secret-access-key>>'


  videos:

    bucket_name: 'peertube-data'

    prefix: 'videos/'


  streaming_playlists:

    bucket_name: 'peertube-data'

    prefix: 'streaming-playlists/'


  user_exports:

    bucket_name: 'peertube-data'

    prefix: 'user-exports/'


  original_video_files:

    bucket_name: 'peertube-data'

    prefix: 'original-video-files/'


  captions:

    bucket_name: 'peertube-data'

    prefix: 'captions/'



Die Prefixe kann man auch auslassen, mir gefällts besser weil es dann im Bucket schön strukturiert ist. 

Jetzt die Rechte korrekt setzen, dann yunohost neu starten und während man ein Video hochlädt schauen ob ein fehler im Log auftaucht:

chown peertube:www-data /var/www/peertube/config/local.yaml
systemctl restart peertube
journalctl -u peertube -f

Wenn ein Fehler Auftritt, dann sieht man es nachdem die Transkodierung des Videos abgeschlossen ist im Video, wo steht, dass das Video nicht verschoben werden konnte oder im Log. 

Wenn alles passt schauts so aus:

...
info: Creating job to send video creation of https://tube.srv.com/videos/watch/bd77446b-2a00-4a11-8c2b-69a9faa1299f.                                                                                                                                                                 
info: Creating job to send announce https://tube.srv.com/videos/watch/bd77446b-2a00-4a11-8c2b-69a9faa1299f/announces/3.                                                                                                                                                              
info: Creating job to send announce https://tube.srv.com/videos/watch/bd77446b-2a00-4a11-8c2b-69a9faa1299f/announces/1.                                                                                                                                                              
info: Notifying user usr of the publication of its video https://tube.srv.com/videos/watch/bd77446b-2a00-4a11-8c2b-69a9faa1299f.       

...


Quellen:

https://docs.wasabi.com/docs/how-do-i-set-up-wasabi-for-user-access-separation