User Tools

This is an old revision of the document!


Tube Archivist

Installation

TubeArchivist is available using docker compose, i will show you how to install with rootless podman of course.

Add the usual dedicated user:

useradd -d /data/daemons/tubearchivist -m tubearchivist -g media

Create the needed folders:

mkdir /data/Media/YouTube
chown tubearchivist:media /data/Media/YouTube
su - tubearchivist
mkdir cache es redis

Download the composer file from here, and edit like the following:

docker-compose.yml
version: '3.5'

services:
  tubearchivist:
    container_name: tubearchivist
    image: bbilly1/tubearchivist
    ports:
      - 8124:8000
    volumes:
      - /data/Media/YouTube:/youtube
      - /data/daemons/tubearchivist/cache:/cache
    environment:
      - ES_URL=http://archivist-es:9200
      - REDIS_CON=redis://archivist-redis:6379
      - TA_HOST=https://tube.mydomain.com
      # 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
      # Uncomment to enable extra debug: 
      #- DJANGO_DEBUG=True
    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

This example shows how to use Authelia SSO authentication (for more info see here), you will not need to setup an initial password and username.

Pull the images:

su - tubearchivist
podman compose pull

Reverse Proxy

Follow the The Reverse Proxy concept and the Authentication pages.

TubeArchivist requires a subdomain, so i assume you will host as https://tube.yourdomain.com:

tube.conf
server {
        server_name tube.mydomain.com;
        listen 443 ssl;
        listen 8443 ssl;
        http2 on;

        access_log /var/log/nginx/tube.mydomain.com_access_log main;
        error_log /var/log/nginx/tube.mydomain.com_error_log info;
       include "org.mydomain/authelia_location.conf";

        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;
}

Autostart

To start it, and set it up on boot, as usual follow my indications Using Containers on Gentoo, so link the user-containers init script:

ln -s /etc/init.d/user-containers /etc/init.d/user-containers.tubearchivist

and create the following config file:

/etc/conf.d/user-containers.tubearchivist
USER=tubearchivist
DESCRIPTION="Download YouTube stuff"

Add the service to the default runlevel and start it now:

rc-update add user-containers.tubearchivist default
rc-service user-containers.tubearchivist start

Jellyfin Integration

Use this plugin in JellyFin.

In short, open JellyFin go to administration / plugins and add a new repository with the following details:

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: https://tube.mydomain.com
  • 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