Closed CrazyWolf13 closed 1 month ago
in config file,
use_openid
needs to be set to true
and require_auth
to false
(I know, it's a bit counter intuitive but to enable openid it's necessary)
there's no need to change the start command of the container, just bind your /conf
mountpoint
the last line of your docker command can be omitted:
docker run -d \
--name yt-dlp-web-ui \
--restart unless-stopped \
--network 20 \
--ip 10.10.20.220 \
-v /dockerdata/yt-dlp-web-ui:/config \
-v /mnt/nas/Youtube-dl:/downloads \
-e JWT_SECRET=randomsecret \
marcobaobao/yt-dlp-webui
there's no need to change the start command of the container, just bind your
/conf
mountpoint
Thanks! Good to know :)
use_openid needs to be set to true and require_auth to false
Yeah I know, that's totally fine, sorry my wording was a bit poorly explained, apologies. I meant: First I've tested openID auth, and noticed that 404 error above in the screenshot , then I tough maybe it's an issue with the config file, so I just enable RPC auth and test it that gets applied after reboot, but somehow it does not, when I visit the instance I'm not prompted for a password and have full access (cleared cookies before), have you spotted and obvious mistake I made?
@marcopeocchi
I'm still unable to make the config file apply, any ideas what I'm doing wrong?
I've mapped the config file to the container, and it's correctly available in the container, checked with docker exec.
the config file itself should also be valid, so for testing normal auth should be working, as configured in my config file above?
Hi @CrazyWolf13,
Sorry for the late reply. I will try to reproduce your setup and add additional logging on the configuration parser side.
I hope to catch this strange bug đŸ¤”
@marcopeocchi
No problem, thanks sounds awesome!
Let me know if I can test anything, or you need additional info.
So,
I've setup the container in a fresh environment:
dl
and conf
directoriestouch ./conf/config.yml
./conf/config.yml
with
---
use_openid: true
openid_provider_url: https://accounts.google.com
openid_client_id: ***
openid_client_secret: ***
openid_redirect_url: http://localhost:3033/auth/openid/signin
docker run --rm --name yt-dlp-test -p 3033:3033 -v ./dl:/downloads -v ./conf:/config -e JWT_SECRET=randomsecret marcobaobao/yt-dlp-webui
The OpenID login works :/
If the config
volume is mounted correctly, after the first boot there will be a file named local.db
inside the folder.
If the config file is empty (but existing and successfully detected) this line will be logged:
2024/07/30 08:12:51 config EOF
If the config file is correctly parsed the first logged lined will be:
time=2024-07-30T08:12:51.822Z level=INFO msg="yt-dlp-webui started" address=0.0.0.0:3033
time=2024-07-30T08:12:51.822Z level=INFO msg="sucessfully persisted session"
@CrazyWolf13 if after a clean re-setup it doesn't work we maybe can schedule a call or something on discord (If it's okay with you obv.).
Hi @marcopeocchi
Thank you for your reply :)
So I've fully rebuilt everything now, but I'm still experiencing the same issue.
I created a download and a config file directory and mount them, I mount the parent folder of config, so the file will be and is mounted directly into the container, as I can confirm by using docker exec -it /bin/sh and the browsing the files.
The config file is correctly mounted inside the container and contains the text correctly. My path of the config file inside the container is /config/conf.yml
First of all I tested with RPC auth, which also did not work, then with openid, but as the config is not correctly read, neither one will be applied.
Here the logs from yt-dlp-web-ui:
2024/07/30 13:19:22 config open /config/config.yml: no such file or directory
time=2024-07-30T13:19:22.463Z level=INFO msg="yt-dlp-webui started" address=0.0.0.0:3033
time=2024-07-30T13:19:22.466Z level=INFO msg="sucessfully persisted session"
Which seems really strange to me, as the file really is at that exact path in the container.
(Normally I have to use sudo to edit the conf.yml on the host side, can there be some sort of permission issue?=
(Normally I have to use sudo to edit the conf.yml on the host side, can there be some sort of permission issue?=
This explains why yt-dlp-webui doens't see the config.yml file at all.
Hmm I see, guess that makes sense, but I run 20+ containers and none had a problem with that.
So for testing I just set the permissions to 777, so everyone full access
Here inside the container:
Root-Docker is not actually root here, just a dumb name I chose lol
So as you can see, the file is in the correct plac, is in the container and contains the correct config.
Here the log entrys:
hello @CrazyWolf13,
I see that the config file is named conf.yml
instead of config.yml
Nononononon, no way I missed that!
Apologies!
In the beginning I was not sure what filename yt-dlp-web-ui is using as it is nowwhere documented, but after you implemented the logging, it should be clear for any other user. thanks!
Apologies for the lack of documentation but I'm glad you resolved!
Version running latest, build today, checked against dockerhub
Describe the bug I'm unable to get the config file to map, or auth is not correctly applying.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect either a login screen or at least that I cannot download stuff, but when I enable auth and an unathentificated user can dl stuff...
Screenshots If applicable, add screenshots to help explain your problem.
Additional context I wanted to test out the openid auth, and tought it may be a good time to switch to config instead of docker env vars. Using the openid gives me the following screen when manually clicking login-> openid:
Docker command I used:
Config file: