Home Assistant addon : qbittorrent (supports openvpn & smb mounts)

Actually I think I found another thing. It seems that the addon ignores the download folder setting from the config and uses the one defined in the vuetorrten gui. Or is it only me?

EDIT. just saw there is a new version. will test that before i say more…

Yes, this time the bug was in qbittorrent itself that got updated to 4.4.0 and has this issue… I reverted to 4.3.9 to avoid this until the app itself solves the issue. The new version will work :slight_smile:

it did. thanks!

1 Like

I cant build latest version on debian supervisor

PS: it works on hassio on same machine … weird.


22-01-14 10:52:44 ERROR (SyncWorker_4) [supervisor.docker.addon] Can't build db21ed7f/amd64-addon-qbittorrent:14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1-ls166-4: The command '/bin/sh -c if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&     if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&     mkdir -p /tmpscripts /etc/cont-init.d &&     for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/$scripts" -o /tmpscripts/"$scripts"; done  &&     if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi &&     if [ -d /scripts ]; then /bin/cp -rf /tmpscripts/* /scripts/ && chmod -R 755 /scripts; fi &&     rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" > /MODULESFILE' returned a non-zero code: 2
22-01-14 10:52:44 ERROR (SyncWorker_4) [supervisor.docker.addon] Build log: 
Step 1/25 : ARG BUILD_FROM
Step 2/25 : ARG BUILD_VERSION
Step 3/25 : ARG BUILD_UPSTREAM="14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1-ls166"
Step 4/25 : FROM ${BUILD_FROM}-$BUILD_UPSTREAM
 ---> 6328840003f0
Step 5/25 : ENV     DEBIAN_FRONTEND="noninteractive"    LANG="C.UTF-8"     PS1="$(whoami)@$(hostname):$(pwd)$ "     S6_BEHAVIOUR_IF_STAGE2_FAILS=2     S6_CMD_WAIT_FOR_SERVICES=1     TERM="xterm-256color"
 ---> Using cache
 ---> 929b461a64a9
Step 6/25 : RUN     sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser     && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser     && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser         && sed -i 's=/config=/config/qBittorrent || true=g' /etc/cont-init.d/10-adduser     && sed -i 's=	/config=/config/qBittorrent || true=g' /etc/cont-init.d/30-config         && sed -i 's|/downloads/|/share/qBittorrent/|g' /defaults/qBittorrent.conf         && sed '11,13d' /defaults/qBittorrent.conf     && echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf     && echo 'WebUI\LocalHostAuth=false' >> /defaults/qBittorrent.conf || true
 ---> Using cache
 ---> 8f1f3c42845a
Step 7/25 : COPY rootfs/ /
 ---> Using cache
 ---> 2f6f814c461b
Step 8/25 : ARG PACKAGES=""
 ---> Using cache
 ---> c4df6e7fd33a
Step 9/25 : RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&     if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&     curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh &&     chmod 777 /automatic_packages.sh &&     /automatic_packages.sh "${PACKAGES:-}" &&     rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
 ---> Using cache
 ---> d4bb03554ee7
Step 10/25 : ARG MODULES="00-banner.sh 92-local_mounts.sh 92-smb_mounts.sh 90-dns_set.sh"
 ---> Using cache
 ---> a933fde97e44
Step 11/25 : RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&     if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&     mkdir -p /tmpscripts /etc/cont-init.d &&     for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/$scripts" -o /tmpscripts/"$scripts"; done  &&     if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi &&     if [ -d /scripts ]; then /bin/cp -rf /tmpscripts/* /scripts/ && chmod -R 755 /scripts; fi &&     rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" > /MODULESFILE
 ---> Running in ca11e6541687
/bin/sh: 1: Syntax error: "then" unexpected

Removing intermediate container ca11e6541687

i managed to install on hassos , backup and restore to debian supervisor.

1 Like

I had a bug that affected all my addons. If you force refresh the repo you’ll be able to install normally

I deeply apologize. I enabled autobuild as recommended by the HA guidelines, and it brought 2 big issues. I have decided to revert the changes. This means that everyone that has installed the new versions pushed since 2 days will have to restore a backup, or uninstall the app and reinstall it…

Thanks for your understanding.

Please read the detail here : My custom repo - #127 by alexbelgium

Tried that but no luck. I cant get the addon to work.
It starts , but if I add torrent nothing happens and there are no errors in the logs. Also, the ip is whitelisted but when i open the web interface in browser it says unauthorised.

1 Like

Mmh that doesn’t look good… I’ll push a new version so you can update and I’m sure you have the latest code and not the issues of the past few days. If it still doesn’t work, please post a full addon log and it should help me troubleshoot :slight_smile: thanks!

I’ve tested on my system and everything works fine here. Please post your log if you have again issues with the version finishing by 6

This is the error from qbittorrent log:

2022-01-23T15:35:55 - WebUI: Invalid Host header, port mismatch. Request source IP: ‘::ffff:127.0.0.1’. Server port: ‘8080’. Received Host header: ‘192.168.0.111:8123’

I tried changing the port from the plugin configuration from 8081 to 8080 and now i can access it from browser and its working ok but it doesn work from home assistant ( i can see the interface but the torrent list is empty and nothing works).
If you need additional info let me know which logs and from what location do you need. By the way , its a debian with supervisor installation .

Hi, thanks. Could you please add a full log of when it is starting? The addon should work i reinstalled it yesterday and ingress works. Thanks!

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-aaa_dockerfile_backup.sh: executing…
[cont-init.d] 00-aaa_dockerfile_backup.sh: exited 0.
[cont-init.d] 00-banner.sh: executing…
hello

Add-on: Qbittorrent
qBittorrent is a bittorrent client

Add-on version: 14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1-ls166-6
You are running the latest version of this add-on.
System: Debian GNU/Linux 10 (buster) (amd64 / qemux86-64)
Home Assistant Core: 2021.12.10
Home Assistant Supervisor: 2021.12.2

Please, share the above information when looking for help
or support in, e.g., GitHub, forums
GitHub - alexbelgium/hassio-addons: My home assistant addons

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-envfile: executing…
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 01-migrations: executing…
[migrations] started
[migrations] no migrations found
[cont-init.d] 01-migrations: exited 0.
[cont-init.d] 10-adduser: executing…

      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit:
Donate | LinuxServer.io

GID/UID

User uid: 0
User gid: 0

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing…
[cont-init.d] 30-config: exited 0.
[cont-init.d] 30-nginx.sh: executing…
[cont-init.d] 30-nginx.sh: exited 0.
[cont-init.d] 90-custom-folders: executing…
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 90-dns_set.sh: executing…
[16:02:35] INFO: DNS SERVERS set to 1.1.1.1 8.8.8.8
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing…
[16:02:36] INFO: Downloads can be found in /share/Seagate_Expansion_Drive
[16:02:37] INFO: Whitelisted subsets will not require a password : 192.168.0.111, 192.168.0.1/24,localhost,127.0.0.1,172.30.0.0/16
[16:02:37] INFO: WEBUI username set to admin
[16:02:37] INFO: Alternate UI enabled : vuetorrent. If webui don’t work, disable this option
[16:02:39] INFO: Default username/password : admin/adminadmin
[16:02:39] INFO: Configuration can be found in /config/qBittorrent
[cont-init.d] 91-qbittorrent_configuration.sh: exited 0.
[cont-init.d] 92-local_mounts.sh: executing…
[cont-init.d] 92-local_mounts.sh: exited 0.
[cont-init.d] 92-smb_mounts.sh: executing…
[cont-init.d] 92-smb_mounts.sh: exited 0.
[cont-init.d] 93-openvpn.sh: executing…
[16:02:40] INFO: Direct connection without VPN enabled
[cont-init.d] 93-openvpn.sh: exited 0.
[cont-init.d] 99-custom-scripts: executing…
[custom-init] no custom files found exiting…
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:02:41] INFO: Starting NGinx…
[23/Jan/2022:16:02:55 +0100] 401 192.168.0.151, 172.30.32.1(172.30.32.2) GET /api/v2/sync/maindata HTTP/1.1 (HomeAssistant/Android Mi 9T Pro beta-1916-8a8772d5-full)
[23/Jan/2022:16:02:55 +0100] 401 192.168.0.151, 172.30.32.1(172.30.32.2) GET /api/v2/app/version HTTP/1.1 (HomeAssistant/Android Mi 9T Pro beta-1916-8a8772d5-full)
[23/Jan/2022:16:02:55 +0100] 401 192.168.0.151, 172.30.32.1(172.30.32.2) POST /api/v2/auth/login HTTP/1.1 (HomeAssistant/Android Mi 9T Pro beta-1916-8a8772d5-full)
[23/Jan/2022:16:02:55 +0100] 401 192.168.0.151, 172.30.32.1(172.30.32.2) GET /api/v2/torrents/categories HTTP/1.1 (HomeAssistant/Android Mi 9T Pro beta-1916-8a8772d5-full)
[23/Jan/2022:16:02:57 +0100] 401 192.168.0.151, 172.30.32.1(172.30.32.2) GET /api/v2/sync/maindata HTTP/1.1 (HomeAssistant/Android Mi 9T Pro beta-1916-8a8772d5-full)

1 Like

Thanks indeed no error at all… The port 8080 is internal, and exposed as whatever is the value fixed to in the addon options, so setting the addon option port to 8080 vs 8081 shouldn’t affect it’s inner working…

Could you please try stopping the addon, rename the /config/qBittorrent folder to something else (as backup) and restart the addon? Normally this should be avoided by the following configs that should be set by default. Thanks!

WebUI\CSRFProtection=false
WebUI\ClickjackingProtection=false
WebUI\HostHeaderValidation=false

The lines you posted were missing from the .conf . I saw you released a new version , updated it and now its ok. Thank you.
I didn’t see anyone complaining about a similar problem as me so I’m confused why did this happen.
Thank you again for fixing .

1 Like

Hi, I don’t want to point but the most probable cause is that you saw those safety measures and enabled them in the webui :yum: or another probable cause is that the linuxserver team on which my addon is based modified the default settings :wink: anyway it’s good that you raised this issue as now it is embedded in the code so it helps make the code more robust for everyone.

Thanks!

Hi, is there a way to save torrent files to another device? I have my Homeassistant run on Intel NUC and want to save files to RaspberryPi with OpenMediaVault. The path to the file is 192.168.0.91/export/Filmy. I have share set up via SMB and NFS and can read/write to the disk without authentication on my local network.

When the qbittorrent starts I see this in logs:

[18:48:37] INFO: DNS SERVERS set to 192.168.0.91
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing…
[18:48:37] INFO: Downloads can be found in /mnt/Filmy/qbittorrent
[18:48:37] INFO: Whitelisted subsets will not require a password : localhost,127.0.0.1,172.30.0.0/16,192.168.0.0/16
[18:48:37] INFO: WEBUI username set to admin
[18:48:37] INFO: Alternate UI enabled : vuetorrent. If webui don’t work, disable this option
[18:48:38] INFO: Default username/password : admin/adminadmin
[18:48:38] INFO: Configuration can be found in /config/qBittorrent
[cont-init.d] 91-qbittorrent_configuration.sh: exited 0.
[cont-init.d] 92-local_mounts.sh: executing…
[cont-init.d] 92-local_mounts.sh: exited 0.
[cont-init.d] 92-smb_mounts.sh: executing…
Mounting smb share(s)…
[18:48:39] INFO: … //192.168.0.91/Filmy/qbittorrent successfully mounted to /mnt/qbittorrent with options
[cont-init.d] 92-smb_mounts.sh: exited 0.
[cont-init.d] 93-openvpn.sh: executing…
[18:48:39] INFO: Direct connection without VPN enabled

But when I try to start a torrent file nothing happens, and in filebrowser I don’t see my folder in mnt/qbittorrent

Hi,

//192.168.0.91/Filmy/qbittorrent successfully mounted to /mnt/qbittorrent

You need to specify /mnt/qbittorrent in the Downloads options to be able to find the files in //192.168.0.91/Filmy/qbittorrent

I’ve tried that and still nothing happens. I get this massage in logs:

“Web UI: Unable to bind to IP: 192.168.0.92, port: 8080. Reason: The address is not available”

Maybe this is the problem, I run my HA via duckdns

And can you access qbittorrent with ingress, from the app?

Could you try stopping the app, and adding WebUI\Address=* to the qbittorrent.conf file in /config/qbittorrent? Thanks

Yes I can reach qbittorrent via ingress… I’ve changed the WebUI\Address= from my ip adress to * and it worked! Thank you!

1 Like