alexta69 / metube

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
GNU Affero General Public License v3.0
6.89k stars 433 forks source link

Password auth not working #519

Open NikoQT opened 1 month ago

NikoQT commented 1 month ago

I tryed to configure an auth to enter the instance by using YTDL_OPTIONS_FILE but I could get it to work

Does anyone know how to configure it?

my json file:

{ "user": "", "password": "", "videopassword:": "***", "geo_bypass": true }

PikuZheng commented 1 month ago

username and password maybe? https://github.com/yt-dlp/yt-dlp/blob/eabb4680fdb09ba1f48d174a700a2e3b43f82add/yt_dlp/YoutubeDL.py#L216-L218

jlar0che commented 1 month ago

I also can't get this working. I tried it with YTDL_OPTIONS passed as an environment variable in my docker-compose.

Example:

version: "3.9"
services:
  metube:
    container_name: MeTube
    image: ghcr.io/alexta69/metube
    healthcheck:
     test: curl -f http://localhost:8081/ || exit 1
    mem_limit: 6g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    restart: on-failure:5
    ports:
      - 5697:8081
    volumes:
      - /volume1/docker/metube/downloads:/downloads:rw
    environment:
      UID: 1111
      GID: 111
      YTDL_OPTIONS: '{"username":"username-here","password":"super-secret-redacted-password"}'
NikoQT commented 1 month ago

I also can't get this working. I tried it with YTDL_OPTIONS passed as an environment variable in my docker-compose.

Example:

version: "3.9"
services:
  metube:
    container_name: MeTube
    image: ghcr.io/alexta69/metube
    healthcheck:
     test: curl -f http://localhost:8081/ || exit 1
    mem_limit: 6g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    restart: on-failure:5
    ports:
      - 5697:8081
    volumes:
      - /volume1/docker/metube/downloads:/downloads:rw
    environment:
      UID: 1111
      GID: 111
      YTDL_OPTIONS: '{"username":"username-here","password":"super-secret-redacted-password"}'

In the end I used a nginx reverse proxy with htaccess and it does its job

jlar0che commented 1 month ago

I tried that but never got it to work properly. Could you share your (sanitized) docker-compose for the nginx reverse proxy?

jlar0che commented 1 month ago

Nevermind. Got it up and running wonderfully. Even made a nice customized 401 error page :)

NikoQT commented 1 month ago

Nevermind. Got it up and running wonderfully. Even made a nice customized 401 error page :)

nice :)

Betonhaus commented 2 weeks ago

Nevermind. Got it up and running wonderfully. Even made a nice customized 401 error page :)

can you share how you did it? I'd like to password protect my metube app.