From dc673bb10185f94c24e1d5ae6a18b257d6069cca Mon Sep 17 00:00:00 2001 From: Kim Brian Ramberg Date: Fri, 10 Oct 2025 13:17:25 +0000 Subject: [PATCH] Added qBittorrent --- .../appdata/config/.emptyFile => .emptyFile | 0 qbittorrent/.env | 9 ++++ qbittorrent/compose.yml | 33 ++++++++---- qbittorrent/downloads/.emptyFile | 0 qbittorrent/index.html | 50 +++++++++++++++++++ qbittorrent/notes.md | 21 ++++++++ 6 files changed, 103 insertions(+), 10 deletions(-) rename qbittorrent/appdata/config/.emptyFile => .emptyFile (100%) create mode 100644 qbittorrent/.env delete mode 100644 qbittorrent/downloads/.emptyFile create mode 100644 qbittorrent/index.html create mode 100644 qbittorrent/notes.md diff --git a/qbittorrent/appdata/config/.emptyFile b/.emptyFile similarity index 100% rename from qbittorrent/appdata/config/.emptyFile rename to .emptyFile diff --git a/qbittorrent/.env b/qbittorrent/.env new file mode 100644 index 0000000..765e067 --- /dev/null +++ b/qbittorrent/.env @@ -0,0 +1,9 @@ +# qBittorrent variables + +PUID=1000 +PGID=1000 +TZ=Europe/Oslo +WEBUI_PORT=9150 +TORRENTING_PORT=6881 +USERNAME=qbittorrent@home.ramberg.net +PASSWORD=qBittorrent123 diff --git a/qbittorrent/compose.yml b/qbittorrent/compose.yml index 06b8aca..ed061c4 100644 --- a/qbittorrent/compose.yml +++ b/qbittorrent/compose.yml @@ -3,17 +3,30 @@ services: qbittorrent: image: lscr.io/linuxserver/qbittorrent:latest container_name: qbittorrent + network_mode: "host" environment: - - PUID=1000 - - PGID=1000 - - TZ=Europe/Oslo - - WEBUI_PORT=8080 - - TORRENTING_PORT=6881 + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + - WEBUI_PORT=${WEBUI_PORT} + - TORRENTING_PORT=${TORRENTING_PORT} volumes: - - ./appdata:/config - - ./downloads:/downloads #optional + - /home/rcadmin/docker/qbittorrent/data/config:/config + - cifs_mount:/downloads #optional ports: - - 8080:8080 - - 6881:6881 - - 6881:6881/udp + - ${WEBUI_PORT}:8080 + - ${TORRENTING_PORT}:6881 + - ${TORRENTING_PORT}:6881/udp restart: unless-stopped + deploy: + placement: + constraints: + - node.role == manager + +volumes: + cifs_mount: + driver: local + driver_opts: + type: cifs + device: //192.168.50.203/Datadisk + o: "username=${USERNAME},password=${PASSWORD},vers=3.0,uid=${PUID},gid=${PGID}" diff --git a/qbittorrent/downloads/.emptyFile b/qbittorrent/downloads/.emptyFile deleted file mode 100644 index e69de29..0000000 diff --git a/qbittorrent/index.html b/qbittorrent/index.html new file mode 100644 index 0000000..e289176 --- /dev/null +++ b/qbittorrent/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + qBittorrent WebUI + + + + + + + + + + + +
+

qBittorrent WebUI

+ +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ + + diff --git a/qbittorrent/notes.md b/qbittorrent/notes.md new file mode 100644 index 0000000..4d4df75 --- /dev/null +++ b/qbittorrent/notes.md @@ -0,0 +1,21 @@ +# Notes related to qBittorrent + +## How to fix 'unauthorized' webUI error on TrueNAS qbittorrent docker install + +In case this is useful for someone in the future. + +I couldn't use the trueNAS built app, so instead created a custom app using this docker guide here: + +https://docs.linuxserver.io/images/docker-qbittorrent/#webui_port-variable + +The following two key points that got this working for me. + +Assuming everything is setup correctly, and the logs don't display any errors on startup. + +Add the following line to the `qBittorrent.conf` file: + +`WebUI\HostHeaderValidation=false` + +Make sure the docker container has been shutdown before editing `qBittorrent.conf`. This is because the conf file is written to on shutdown, so any changes made whilst it's still running will be lost otherwise. + +Happy days. \ No newline at end of file