binhex / arch-qbittorrentvpn

Docker build script for Arch Linux base with qBittorrent, Privoxy and OpenVPN
GNU General Public License v3.0
397 stars 46 forks source link

WebUI temporary password not shown in logs #213

Closed sbalbrecht closed 4 months ago

sbalbrecht commented 5 months ago

First of all, thank you for maintaining this project. It's very useful!

Version Information

arch-qbittorrentvpn: 4.6.2-2-01 Operating system: Ubuntu 22.04.3 LTS

What is the problem?

This issue first appeared in November (https://github.com/binhex/arch-qbittorrentvpn/issues/208, https://github.com/qbittorrent/qBittorrent/issues/19984) but has since been fixed on the qBittorrent side.

The Web UI temporary password is not printed to any of the logs, preventing the ability to log into the Web UI without researching a workaround.

To workaround this issue, users can:

While the workarounds exist, they shouldn't be relied upon if there is a potential fix. If there is no way to display the temporary password, users should directed to a workaround via logs/documentation or one should be implemented for them.

Steps to reproduce

docker compose up using the following docker-compose.yml (VPN, Privoxy, etc. disabled for simplicity)

---
version: "2"
services:
  qbittorrent:
    image: binhex/arch-qbittorrentvpn:4.6.2-2-01
    container_name: qbittorrent
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    environment:
     - VPN_ENABLED=no
     - ENABLE_PRIVOXY=no
     - LAN_NETWORK=<your lan network info here>
     - DEBUG=false
     - TZ=America/New_York
    volumes:
      - /docker/config/qbittorrent:/config
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp

qBittorrent will start successfully, and the temporary password will not be visible in any console/log (supervisord.log, qbittorrent.log)

Logs

supervisord.log

Created by...
___.   .__       .__
\_ |__ |__| ____ |  |__   ____ ___  ___
 | __ \|  |/    \|  |  \_/ __ \\  \/  /
 | \_\ \  |   |  \   Y  \  ___/ >    <
 |___  /__|___|  /___|  /\___  >__/\_ \
     \/        \/     \/     \/      \/
   https://hub.docker.com/u/binhex/

2024-01-02 09:07:19.852100 [info] System information Linux f1aeed2f8f7c 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct  9 15:34:04 UTC 2 x86_64 GNU/Linux
2024-01-02 09:07:19.879947 [info] PUID defined as '1000'
2024-01-02 09:07:19.923973 [info] PGID defined as '1000'
2024-01-02 09:07:19.971610 [info] UMASK defined as '000'
2024-01-02 09:07:19.996440 [info] Setting permissions recursively on '/config'...
2024-01-02 09:07:20.029249 [info] Deleting files in /tmp (non recursive)...
2024-01-02 09:07:20.062594 [info] VPN_ENABLED defined as 'no'
2024-01-02 09:07:20.083618 [warn] !!IMPORTANT!! VPN IS SET TO DISABLED', YOU WILL NOT BE SECURE
2024-01-02 09:07:20.111409 [warn] WEBUI_PORT not defined (via -e WEBUI_PORT), defaulting to '8080'
2024-01-02 09:07:20.253641 [info] Starting Supervisor...
2024-01-02 09:07:20,480 INFO Included extra file "/etc/supervisor/conf.d/qbittorrent.conf" during parsing
2024-01-02 09:07:20,480 INFO Set uid to user 0 succeeded
2024-01-02 09:07:20,482 INFO supervisord started with pid 7
2024-01-02 09:07:21,485 INFO spawned: 'start-script' with pid 62
2024-01-02 09:07:21,486 INFO spawned: 'watchdog-script' with pid 63
2024-01-02 09:07:21,486 INFO reaped unknown pid 8 (exit status 0)
2024-01-02 09:07:21,492 DEBG 'watchdog-script' stdout output:
[info] qBittorrent config file doesnt exist, copying default to /config/qBittorrent/config/...

2024-01-02 09:07:21,492 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-01-02 09:07:21,492 INFO success: watchdog-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-01-02 09:07:21,492 DEBG 'start-script' stdout output:
[info] VPN not enabled, skipping configuration of VPN

2024-01-02 09:07:21,492 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 140350306537744 for <Subprocess at 140350306149136 with name start-script in state RUNNING> (stderr)>
2024-01-02 09:07:21,493 INFO exited: start-script (exit status 0; expected)
2024-01-02 09:07:21,493 DEBG received SIGCHLD indicating a child quit
2024-01-02 09:07:21,495 DEBG 'watchdog-script' stdout output:
[info] Removing session lock file (if it exists)...

2024-01-02 09:07:21,512 DEBG 'watchdog-script' stdout output:
[info] qBittorrent not running

2024-01-02 09:07:21,513 DEBG 'watchdog-script' stdout output:
[info] Removing session lock file (if it exists)...

2024-01-02 09:07:21,524 DEBG 'watchdog-script' stdout output:
[info] Attempting to start qBittorrent...

2024-01-02 09:07:21,585 DEBG 'watchdog-script' stdout output:
[info] qBittorrent process started
[info] Waiting for qBittorrent process to start listening on port 8080...

2024-01-02 09:07:21,797 DEBG 'watchdog-script' stdout output:
[info] qBittorrent process listening on port 8080

qbittorrent.log

(N) 2024-01-02T09:07:21 - qBittorrent v4.6.2 started
(N) 2024-01-02T09:07:21 - Using config directory: /config/qBittorrent/config
(N) 2024-01-02T09:07:21 - qBittorrent termination initiated
(N) 2024-01-02T09:07:21 - qBittorrent is now ready to exit
(N) 2024-01-02T09:07:21 - qBittorrent v4.6.2 started
(N) 2024-01-02T09:07:21 - Using config directory: /config/qBittorrent/config
(N) 2024-01-02T09:07:21 - Trying to listen on the following list of IP addresses: "0.0.0.0:34743,[::]:34743"
(I) 2024-01-02T09:07:21 - Peer ID: "-qB4620-"
(I) 2024-01-02T09:07:21 - HTTP User-Agent: "qBittorrent/4.6.2"
(I) 2024-01-02T09:07:21 - Distributed Hash Table (DHT) support: ON
(I) 2024-01-02T09:07:21 - Local Peer Discovery support: ON
(I) 2024-01-02T09:07:21 - Peer Exchange (PeX) support: ON
(I) 2024-01-02T09:07:21 - Anonymous mode: OFF
(I) 2024-01-02T09:07:21 - Encryption support: ON
(I) 2024-01-02T09:07:21 - Successfully listening on IP. IP: "127.0.0.1". Port: "TCP/34743"
(I) 2024-01-02T09:07:21 - Successfully listening on IP. IP: "127.0.0.1". Port: "UTP/34743"
(I) 2024-01-02T09:07:21 - Successfully listening on IP. IP: "(omitted)". Port: "TCP/34743"
(I) 2024-01-02T09:07:21 - Successfully listening on IP. IP: "(omitted)". Port: "UTP/34743"
(I) 2024-01-02T09:07:21 - UPnP/NAT-PMP support: ON
(W) 2024-01-02T09:07:21 - Couldn't load IP geolocation database. Reason: No such file or directory
(N) 2024-01-02T09:07:21 - Using built-in WebUI.
(N) 2024-01-02T09:07:21 - WebUI translation for selected locale (en) has been successfully loaded.
(N) 2024-01-02T09:07:21 - WebUI: Now listening on IP: *, port: 8080
jackdewhurst commented 4 months ago

None of these workarounds have worked for me.. setting passwords in qbitttorrent.conf or whitelisitng IPs.

Guess the only other options is to downgrade?

ntalekt commented 4 months ago

Add this to your config\qBittorrent\config\qBittorrent.conf, replacing existing values:

WebUI\User=admin
WebUI\Password_PBKDF2="@ByteArray(EFt1EXdMP1pvwWU5AxgL7w==:9nNYQh9Ta8R/aP0qGu7b7yH4NgAQ50qsFPisN1bvaXJS6lZ+vilx70B6O/DHf2l2HFEmi9EqASiS+U7umMdRJA==)"

Username: admin Password: adminadmin

Legion495 commented 4 months ago

This is my config:

[AutoRun]
enabled=false
program=

[BitTorrent]
Session\Port=47986
Session\QueueingSystemEnabled=false

[Meta]
MigrationVersion=6

[Preferences]
WebUI\AuthSubnetWhitelist=192.168.x.0/24 #use your local subnet
WebUI\AuthSubnetWhitelistEnabled=true
WebUI\User=admin
WebUI\Password_PBKDF2="@bytearray(72ycFfm20SU9J1917+v4rg==:rmIGmlb3YZukCUlIghBhnu/8ovMGEqloSqoIlga7Tfh/tm0m7uGgHibe/B/rpn7Bs65+SrVcp1AAtPKm5AoVfw==)"
Connection\PortRangeMin=6881
Connection\UPnP=false
General\Locale=en
General\UseRandomPort=false
WebUI\Address=*
WebUI\CSRFProtection=false
WebUI\LocalHostAuth=false
WebUI\Port=8091
WebUI\ServerDomains=*
WebUI\UseUPnP=false

I cannot log onto my webUI. Ignore the x in the IP. Am I missing something that has to be removed or changed? New to qbitorrent. Using the binhex container. Sorted out accessing the webUI now this.

sbalbrecht commented 4 months ago

@Legion495 From other examples, looks like @bytearray in your password property should be changed to @ByteArray

Legion495 commented 4 months ago

@Legion495 From other examples, looks like @bytearray in your password property should be changed to @ByteArray

Thanks that was it.

binhex commented 4 months ago

This issue is I believe now resolved in the latest image, the temporary password is now shown in the log.