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 - TA_USERNAME=<< first login username >> - TA_PASSWORD=<< first login password >> - ELASTIC_PASSWORD=<< create a random password >> - TZ=Europe/London 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
I will show also how to setup Authelia SSO authentication below, at this point you will only use the initial password to login for the first time.
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; proxy_set_header X-Forwarded-Protocol $scheme; proxy_set_header Remote-User $remote_user; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } 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=tubesync 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