User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
services:tubearchivist [2025/04/17 12:39] – created - external edit 127.0.0.1services:tubearchivist [2025/04/18 09:33] (current) willy
Line 1: Line 1:
-====== Tube Sync ======+====== Tube Archivist ======
  
-[[https://github.com/meeb/tubesync|TubeSync]] is a self-hostable downloader for YouTube aimed at channels and playlistsAfter you set it up, it will automatically scan and download videos from channels you select. +[[https://www.tubearchivist.com/|TubeArchivist]] is YouTube downloader and metadata collectorYou can use it to download your favourite YouTube channels and playlists (to dowload single videos, create a playlist and add it to that). With an additional plugin it can feed Jellyfin with all the metadata for smooth navigation.
- +
-It cannot be used to download single videos. As stated in the docsto download single videos you need to create a playlist and add them to it, then add the playlist as source itself in TubeSync.+
  
 ==== Installation ==== ==== Installation ====
  
-TubeSync is available as container image.+TubeArchivist is available using docker compose, i will show you how to install with rootless podman of course.
  
 Add the usual dedicated user: Add the usual dedicated user:
 <code bash> <code bash>
-useradd -d /data/daemons/tubesync -m tubesync -g media+useradd -d /data/daemons/tubearchivist -m tubearchivist -g media
 </code> </code>
  
 Create the needed folders: Create the needed folders:
 <code bash> <code bash>
-mkdir /data/daemons/tubesync/config 
 mkdir /data/Media/YouTube mkdir /data/Media/YouTube
-chown tubesync:tubesync /data/daemons/tubesync/config /data/Media/YouTube+chown tubearchivist:media /data/Media/YouTube 
 +su - tubearchivist 
 +mkdir cache es redis
 </code> </code>
  
-Use the following docker-compose:+Download the composer file from [[https://github.com/tubearchivist/tubearchivist/blob/master/docker-compose.yml|here]], and edit like the following:
 <file - docker-compose.yml> <file - docker-compose.yml>
 +version: '3.5'
 +
 services: services:
-  tubesync: +  tubearchivist
-    image: ghcr.io/meeb/tubesync:latest +    container_name: tubearchivist 
-    container_name: tubesync +    imagebbilly1/tubearchivist
-    restartunless-stopped+
     ports:     ports:
-      - 4848:4848+      - 8124:8000
     volumes:     volumes:
-      - /data/daemons/tubesync/config:/config +      - /data/Media/YouTube:/youtube 
-      - /data/Media/YouTube:/downloads+      - /data/daemons/tubearchivist/cache:/cache
     environment:     environment:
 +      - ES_URL=http://archivist-es:9200
 +      - REDIS_CON=redis://archivist-redis:6379
 +      - TA_HOST=https://tube.mydomain.com http://127.0.0.1:8124
 +      # Uncommen tthe next two to NOT use SSO: 
 +      #- TA_USERNAME=not_needed
 +      #- TA_PASSWORD=not_needed
 +      # Comment the next three to use SSO:
 +      - TA_ENABLE_AUTH_PROXY=true
 +      - TA_AUTH_PROXY_USERNAME_HEADER=HTTP_REMOTE_USER
 +      - TA_AUTH_PROXY_LOGOUT_URL=https://login.mydomain.com/logout
 +      - ELASTIC_PASSWORD=<< create a random password >>
       - TZ=Europe/London       - TZ=Europe/London
-      - PUID=0 +      # Uncomment to enable extra debug:  
-      - PGID=0 +      #DJANGO_DEBUG=True 
-      - DJANGO_URL_PREFIX=/tubesync/+    depends_on: 
 +      - archivist-es 
 +      - archivist-redis 
 +    networks: 
 +      - tubearchivist-net 
 + 
 +  archivist-redis: 
 +    image: redis 
 +    container_name: archivist-redis 
 +    restart: unless-stopped 
 +    expose: 
 +      - "6379" 
 +    volumes: 
 +      - /data/daemons/tubearchivist/redis:/data 
 +    depends_on: 
 +      - archivist-es 
 +    networks: 
 +      - tubearchivist-net 
 + 
 +  archivist-es: 
 +    image: bbilly1/tubearchivist-es 
 +    container_name: archivist-es 
 +    environment: 
 +      - "ELASTIC_PASSWORD=<< copy same password above >>" 
 +      - "ES_JAVA_OPTS=-Xms1g -Xmx1g" 
 +      - "xpack.security.enabled=true" 
 +      - "discovery.type=single-node" 
 +      - "path.repo=/usr/share/elasticsearch/data/snapshot" 
 +    ulimits: 
 +      memlock: 
 +        soft: -1 
 +        hard: -1 
 +    volumes: 
 +      - /data/daemons/tubearchivist/es:/usr/share/elasticsearch/data 
 +    expose: 
 +      - "9200" 
 +    networks: 
 +      - tubearchivist-net 
 + 
 +networks: 
 +  tubearchivist-net: 
 +    dns_enabled: true
 </file> </file>
 +
 +This example shows how to use Authelia SSO authentication (for more info see [[services:authelia|here]]), you will not need to setup an initial password and username.
 +
 +Adding **http://127.0.0.1:8124** to TA_HOST is required to ensure that the Jellyfin plugin works.
  
 Pull the images: Pull the images:
 <code bash> <code bash>
-su - tubesync+su - tubearchivist
 podman compose pull podman compose pull
 </code> </code>
- 
-TubeSync doesn't support multi-users and doesnt really support authentication (just a simple BASIC auth, which we can ignore). So it goes behind the Reverse Proxy and SSO authentication... 
  
 ==== Reverse Proxy ==== ==== Reverse Proxy ====
Line 52: Line 106:
 Follow the [[selfhost:nginx|The Reverse Proxy concept]] and the [[selfhost:sso|Authentication]] pages. Follow the [[selfhost:nginx|The Reverse Proxy concept]] and the [[selfhost:sso|Authentication]] pages.
  
-This is the working NGINX config file+TubeArchivist requires a subdomain, so i assume you will host as **https://tube.yourdomain.com**
-<file - tubesync.conf> +<file - tube.conf>
-location = /tubesync {   +
-        return 301 https://$host/tubesync/; +
-}+
  
-location ^~ /tubesync/ +server 
-        rewrite ^/tubesync/(.*) /$1 break+        server_name tube.mydomain.com
-        proxy_pass http://127.0.0.1:4848/tubesync/+        listen 443 ssl
-        proxy_set_header Host $host+        listen 8443 ssl
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for+        http2 on; 
-        proxy_set_header X-Forwarded-Host $host+ 
-        proxy_set_header X-Forwarded-Proto $scheme+        access_log /var/log/nginx/tube.mydomain.com_access_log main
-        proxy_redirect off+        error_log /var/log/nginx/tube.mydomain.com_error_log info
-        proxy_http_version 1.1; +       include "org.mydomain/authelia_location.conf"; 
-        proxy_set_header Upgrade $http_upgrade; + 
-        proxy_set_header Connection $http_connection;+        location ^~ / { 
 +               include "com.mydomain/authelia_proxy.conf"; 
 +               include "com.mydomain/authelia_authrequest.conf"; 
 +                proxy_pass http://127.0.0.1:8124
 +        } 
 +        include com.mydomain/certbot.conf;
 } }
 +
 </file> </file>
  
Line 76: Line 133:
 To start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script: To start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script:
 <code> <code>
-ln -s /etc/init.d/user-containers /etc/init.d/user-containers.tubesync+ln -s /etc/init.d/user-containers /etc/init.d/user-containers.tubearchivist
 </code> </code>
  
 and create the following config file: and create the following config file:
-<file - /etc/conf.d/user-containers.tubesync+<file - /etc/conf.d/user-containers.tubearchivist
-USER=tubesync +USER=tubearchivist 
-DESCRIPTION="Download YouTube channels"+DESCRIPTION="Download YouTube stuff"
 </file> </file>
  
 Add the service to the default runlevel and start it now: Add the service to the default runlevel and start it now:
 <code bash> <code bash>
-rc-update add user-containers.tubesync default +rc-update add user-containers.tubearchivist default 
-rc-service user-containers.tubesync start+rc-service user-containers.tubearchivist start
 </code> </code>
 +
 +===== Jellyfin Integration =====
 +
 +Use [[https://github.com/tubearchivist/tubearchivist-jf-plugin|this plugin]] in JellyFin.
 +
 +In short, open JellyFin go to administration / plugins and add a new repository with the following details:
 +  * Repository name: TubeArchivistMetadata
 +  * Repository URL: https://github.com/tubearchivist/tubearchivist-jf-plugin/raw/master/manifest.json
 +
 +Now navigate to the plugins and install **TubeArchivistMetadata**, now restart Jellyfin server.
 +
 +After Jellyfin is running again, go to the plugins page and configure the TubeArchivistMetadata plugin with the following settings:
 +  * Collection name: whatever you like, maybe YouTube
 +  * TubeArchivist URL: http://127.0.0.1:8124 (you need to use the local URL to avoid the Authelia SSO filtering the plugin requests)
 +  * TubeArchivist API key: can be found inside TubeArchivist, under Settings / Application / Integration
 +
 +Now, to **use** the plugin, in Jellyfin go to settings -> libraries and add a new library of type "TV shows" and unselect all sources fo all kinds except TubeArchivist.
 +
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information