Possible to run 2 qBt images on same docker host?

If you run qBittorrent in / with Docker.
Post Reply
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

Can I run two different qBt docker images at the same time on the same docker host as long as they use different service names/labels, port-mappings, configs and download directories?
I can get 1 running with no problems using the defaults. But after that, none of the compose.yaml port mappings seem to work as expected on either of the 2 docker images.

The 1st docker image is plain vanilla and started right up with no existing torrents. I used the default port mapping in the compose.yaml, used the "docker-compose up qbittorrent" command, the image downloaded and booted right up. I logged into the web GUI (http://docker01:8080), changed some of the typical qBt parameters to match the environment and started searching, downloading and saving torrents to my NAS.

The 2nd image is an attempt to migrate from a Windows qBt to the docker Linux.
The compose.yaml is edited to add the 2nd image, changed the label and service name to qbittorrent-01, changed the /config volume mapping and the port mapping to avoid issues with the 1st.
It boots up, but the web GUI is unreachable on port 8081.
I've renamed #2's config to qBitorrent.conf (removed the .ini), edited #2's /usr/local/qbittorrent-01.appdata/qBittorrent/qBittorrent.conf file to rename all the references to the old Windows shares (G:\bittorrent\home-lab\qBt\downloads) to the path that leads to the NAS storage for all the existing torrents and verified the ports matched the new environment.
But, while it always starts and continues to run, but no response to a browser (timeout)
The curl command doesn't return anything, no error, no time out, just a new command line.

Code: Select all

[root@docker01 ~]# curl -Is http://0.0.0.0:8080 | head -n 1
HTTP/1.1 200 OK
[root@docker01 ~]# curl -Is http://0.0.0.0:8081 | head -n 1
[root@docker01 ~]#

I've tried deleting the image for #2 and the running 'docker-compose up -d qbittorrent-02' - but that doesn't change anything.
The logs don't show any "problems":

Code: Select all

[root@docker01 ~]# docker logs -f qbittorrent-01
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 4.6.7-r0-ls352
Build-date: 2024-09-22T06:52:38+00:00
───────────────────────────────────────

[custom-init] No custom files found, skipping...
WebUI will be started shortly after internal preparations. Please wait...

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8081

The WebUI administrator username is: admin
The WebUI administrator password was not set. A temporary password is provided for this session: XteGqg2Fv
You should set your own password in program preferences.
^Ccontext canceled
[root@docker01 ~]#
Based on the log, it looks like it ignored the /config file that I edited and coming up with some of the defaults (no password for admin) and I don't know what "custom files" it might be looking for and it shows "[migrations] started" and "[migrations] no migrations found".
When the 2nd image is started, a new logs/qbittorrent.log file is created. But it is throwing errors for every file that it is checking and using the old Windows share path and not the new path I entered in #2's qBittorrent.conf:

Code: Select all

(N) 2024-10-17T12:05:46 - Restored torrent. Torrent: "[JacquieEtMichelTV] Les cadeaux de Poopea, 27ans (18.09.2019)"
(W) 2024-10-17T12:05:46 - Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "[JacquieEtMichelTV] Les cadeaux de Poopea, 27ans (18.09.2019)". Reason: "[JacquieEtMichelTV] Les cadeaux de Poopea, 27ans (18.09.2019) rq.mp4 fast resume rejected. file_stat(/run/s6-rc:s6-rc-init:blIOiN/servicedirs/svc-qbittorrent/J:\home-desktop-bt-downloads\qBt-download\JacquieEtMichelTV/[JacquieEtMichelTV] Les cadeaux de Poopea, 27ans (18.09.2019) rq.mp4): mismatching file size"
My assumption is that is it reading the BT_backup files (.fastresume and .torrent) files and getting the old path. I don't know how I could change all of them, but the "short-cut" might be to delete the "*.fastresume" file and then force a rescan of all 1000 torrents after I can log in.

Or maybe if I get access to the GUI, I could change the download paths and get it running.

It gets more confusing:
I stop the #1 & #2 image and edit the compose.yaml to change #1's port mapping to 8081 and 6882 then do a "docker-compose start qbittorrent" (the #1 image). The #1 image boots up, but it's still stuck on port 8080 for the web GUI and 6881.

I've edited the firewalld (using firewall-cmd) to add all the ports (8080, 8081, 6881 & 6882) to the default zone (home) and the docker zone (docker).
There is also a filewalld entry I created in '/usr/lib/firewalld/services/qbittorrent.xml' file that opened port 6881 and then later port 6882, but there is no entry for 8080 or 8081.

<COMPOSE.YAML>

Code: Select all

[root@docker01 ~]# cat compose.yaml
---
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /usr/local/qbittorrent.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped

---
services:
  qbittorrent-01:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent-01
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8081
      - TORRENTING_PORT=6882
    volumes:
      - /usr/local/qbittorrent-01.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8081:8081
      - 6882:6882
      - 6882:6882/udp
    restart: unless-stopped
---

Code: Select all

[root@docker01 qBittorrent]# pwd
/usr/local/qbittorrent-01.appdata/qBittorrent
[root@docker01 qBittorrent]# ls -lan
total 216
drwxr-xr-x. 10 1000 1000   4096 Oct 17 12:20 .
drwxr-xr-x.  5 1000 1000     74 Oct 15 16:38 ..
drwxr-xr-x.  2 1000 1000 135168 Oct 17 10:49 BT_backup
drwxr-xr-x.  2 1000 1000      6 Oct 12 16:00 cache
-rw-r--r--.  1 1000 1000   1592 Oct 13 12:35 categories.json
drwxr-xr-x.  2 1000 1000     36 Oct 15 12:58 GeoDB
drwxr-xr-x.  2 1000 1000     35 Oct 12 16:01 GeoIP
srwx------.  1 1000 1000      0 Oct 17 12:05 ipc-socket
-rw-r--r--.  1 1000 1000      0 Oct 15 12:58 lockfile
drwxr-xr-x.  2 1000 1000   8192 Oct 17 12:05 logs
drwxr-xr-x.  3 1000 1000    149 Oct 12 16:00 nova3
-rw-r--r--.  1 1000 1000  16425 Oct 17 12:05 qBittorrent.conf
-rw-r--r--.  1 1000 1000    201 Oct 17 12:20 qBittorrent-data.conf
drwxr-xr-x.  3 1000 1000     60 Oct 15 12:58 rss
drwxr-xr-x.  3 1000 1000     22 Oct 12 16:00 rss-old
-rw-r--r--.  1 1000 1000      4 Oct 13 12:35 watched_folders.json
[root@docker01 qBittorrent]#
/usr/local/qbittorrent-01.appdata/qBittorrent/qBittorrent.conf file:

Code: Select all

[AboutDialog]
Size=@Size(545 314)

[AddNewTorrentDialog]
Attached=false
DialogSize=@Size(1116 618)
DownloadPathHistory=/downloads/qBt-download-01/qBt-temp
Enabled=true
RememberLastSavePath=false
SavePathHistory=/downloads/qBt-download-01, /Downloads/qBt
SplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\x32\0\0\x1\0\0\xff\xff\xff\xff\x1\0\0\0\x1\0)
TopLevel=true
TreeHeaderState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x6\x34\0\0\0\x3\0\0\0\x5\0\0\0\x64\0\0\0\x4\0\0\0\x64\0\0\0\x2\0\0\0\x64\0\0\x3.\0\0\0\x6\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x6\0\0\x2\x66\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)
qt5\treeHeaderState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x6\x34\0\0\0\x3\0\0\0\x2\0\0\0\x64\0\0\0\x5\0\0\0\x64\0\0\0\x4\0\0\0\x64\0\0\x3.\0\0\0\x6\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x6\0\0\x2\x66\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)

[Application]
FileLogger\Age=1
FileLogger\AgeType=1
FileLogger\Backup=true
FileLogger\DeleteOld=true
FileLogger\Enabled=true
FileLogger\MaxSizeBytes=66560
FileLogger\Path=/config/qBittorrent/logs
GUI\Notifications\TorrentAdded=false

[AutoRun]
ConsoleEnabled=false
OnTorrentAdded\Enabled=false
OnTorrentAdded\Program=
enabled=false
program=

[BitTorrent]
MergeTrackersEnabled=true
Session\AddExtensionToIncompleteFiles=false
Session\AddTorrentStopped=false
Session\AlternativeGlobalDLSpeedLimit=0
Session\AlternativeGlobalUPSpeedLimit=1000
Session\BandwidthSchedulerEnabled=true
Session\DefaultSavePath=/downloads/qBt-download-01
Session\DisableAutoTMMByDefault=false
Session\DisableAutoTMMTriggers\CategorySavePathChanged=false
Session\DisableAutoTMMTriggers\DefaultSavePathChanged=false
Session\FinishedTorrentExportDirectory=/downloads/qBt-download-01/qBt-torrent
Session\GlobalMaxRatio=40
Session\MaxActiveCheckingTorrents=6
Session\MaxUploadsPerTorrent=10
Session\Port=6882
Session\QueueingSystemEnabled=false
Session\SSL\Port=32825
Session\ShareLimitAction=Stop
Session\SubcategoriesEnabled=true
Session\Tags=Euro, DST6, Shakira, 1956-2009, French, Compilations, Pickup, The Four Tops, GoGoBarAuditions, Hegre-Art, casting, Aretha Franklin, Al Stewart, Discography, hotel, Microminumus, beach, Amature, Filipina, Australian, Pink Floyd, Twins, Chinese, Artistic, Alive, Pictures, Nitty Gritty Dirt Band, Thai, SoCal, Japanese, Videos, Models, wickedweasel, Studio, thai
Session\TempPath=/downloads/qBt-download-01/qBt-temp
Session\TempPathEnabled=true
Session\TorrentExportDirectory=/downloads/qBt-download-01/qBt-torrent
Session\UseAlternativeGlobalSpeedLimit=true

[Core]
AutoDeleteAddedTorrentFile=Never

[DownloadFromURLDialog]
Size=@Size(501 220)

[GUI]
ConfirmActions\PauseAndResumeAllTorrents=true
DownloadTrackerFavicon=false
Log\Enabled=true
MainWindow\FiltersSidebarWidth=228
Notifications\Enabled=true
Notifications\TorrentAdded=false
Qt6\AddNewTorrentDialog\SplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1T\0\0\x1i\0\xff\xff\xff\xff\x1\0\0\0\x1\0)
Qt6\AddNewTorrentDialog\TreeHeaderState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x6\x34\0\0\0\x3\0\0\0\x2\0\0\0\x64\0\0\0\x4\0\0\0\x64\0\0\0\x5\0\0\0\x64\0\0\x3}\0\0\0\x6\x1\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x6\0\0\x2%\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\xf4\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64\0\0\0\0)
Qt6\SearchTab\HeaderState=@ByteArray(\0\0\0\xff\0\0\0\0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x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0q\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x44\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64\0\0\0\0)
StartUpWindowState=Normal
TorrentTagsDialog\Size=@Size(484 330)

[LegalNotice]
Accepted=true

[MainWindow]
LastDir=/root
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1x\0\0\0p\0\0\tZ\0\0\x5 \0\0\x1x\0\0\0\x8f\0\0\tZ\0\0\x5 \0\0\0\0\0\0\0\0\n\0\0\0\x1x\0\0\0\x8f\0\0\tZ\0\0\x5 )
qt5\vsplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0x\0\0\x1\xe4\x1\xff\xff\xff\xff\x1\0\0\0\x1\0)

[Meta]
MigrationVersion=6

[Network]
PortForwardingEnabled=true
Proxy\HostnameLookupEnabled=false
Proxy\Profiles\BitTorrent=true
Proxy\Profiles\Misc=true
Proxy\Profiles\RSS=true

[OptionsDialog]
HorizontalSplitterSizes=136, 724
LastViewedPage=4
Size=@Size(887 745)

[Preferences]
Advanced\DisableRecursiveDownload=false
Advanced\EnableIconsInMenus=true
Advanced\RecheckOnCompletion=false
Advanced\TrayIconStyle=Normal
Advanced\confirmRemoveAllTags=true
Advanced\confirmTorrentDeletion=true
Advanced\confirmTorrentRecheck=true
Advanced\trackerPort=9000
Advanced\trackerPortForwarding=false
Advanced\updateCheck=true
Connection\GlobalUPLimitAlt=140
Connection\PortRangeMin=49771
Connection\ResolvePeerCountries=true
Connection\ResolvePeerHostNames=false
Downloads\DblClOnTorDl=0
Downloads\DblClOnTorFn=1
Downloads\FinishedTorrentExportDir=C:/Downloads/qBt/.torrent
Downloads\NewAdditionDialog=true
Downloads\NewAdditionDialogFront=true
Downloads\SavePath=C:/Downloads/qBt/
Downloads\TempPath=C:/Downloads/qBt/qBt-temp/
Downloads\TempPathEnabled=true
Downloads\TorrentExportDir=C:/Downloads/qBt/.torrent
Downloads\UseIncompleteExtension=true
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=DynDNS
DynDNS\Username=
General\AlternatingRowColors=true
General\CloseToTray=true
General\CloseToTrayNotified=true
General\CustomUIThemePath=
General\ExitConfirm=false
General\HideZeroComboValues=0
General\HideZeroValues=false
General\Locale=en
General\MinimizeToTray=false
General\NoSplashScreen=true
General\PreventFromSuspendWhenDownloading=false
General\PreventFromSuspendWhenSeeding=false
General\SpeedInTitleBar=false
General\StartMinimized=false
General\SystrayEnabled=true
General\UseCustomUITheme=false
MailNotification\email=
MailNotification\enabled=false
MailNotification\password=
MailNotification\req_auth=false
MailNotification\req_ssl=false
MailNotification\[email protected]
MailNotification\smtp_server=smtp.changeme.com
MailNotification\username=
Queueing\QueueingEnabled=false
Scheduler\days=EveryDay
Scheduler\end_time=@Variant(\0\0\0\xf\0\x36\xee\x80)
Scheduler\start_time=@Variant(\0\0\0\xf\x1\x80\x85\x80)
Search\SearchEnabled=true
State\hSplitterSizes=119, 633
State\size=@Size(779 591)
WebUI\Address=*
WebUI\AlternativeUIEnabled=false
WebUI\AuthSubnetWhitelistEnabled=false
WebUI\BanDuration=3600
WebUI\CSRFProtection=true
WebUI\ClickjackingProtection=true
WebUI\CustomHTTPHeaders=
WebUI\CustomHTTPHeadersEnabled=false
WebUI\Enabled=false
WebUI\HTTPS\CertificatePath=
WebUI\HTTPS\Enabled=false
WebUI\HTTPS\KeyPath=
WebUI\HostHeaderValidation=true
WebUI\LocalHostAuth=true
WebUI\MaxAuthenticationFailCount=5
WebUI\Port=8081
WebUI\ReverseProxySupportEnabled=false
WebUI\RootFolder=
WebUI\SecureCookie=true
WebUI\ServerDomains=*
WebUI\SessionTimeout=3600
WebUI\TrustedReverseProxiesList=
WebUI\UseUPnP=false
WebUI\Username=admin

[RSS]
AutoDownloader\DownloadRepacks=true
AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})"

[Search]
FilteringMode=Everywhere

[SearchPluginSelectDialog]
Size=@Size(600 345)

[SearchPluginSourceDialog]
Size=@Size(207 76)

[SearchTab]
qt5\HeaderState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\x2\x1\0\0\0\0\0\0\0\0\0\0\0\a`\0\0\0\x2\0\0\0\x5\0\0\0\x64\0\0\0\x6\0\0\0\x64\0\0\x3\xc7\0\0\0\a\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\a\0\0\x2\xf\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x8c\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)

[ShutdownConfirmDlg]
DontConfirmAutoExit=false

[SpeedLimitDialog]
Size=@Size(481 272)

[SpeedWidget]
Enabled=true
graph_enable_0=true
graph_enable_1=true
graph_enable_2=false
graph_enable_3=false
graph_enable_4=false
graph_enable_5=false
graph_enable_6=false
graph_enable_7=false
graph_enable_8=false
graph_enable_9=false
period=1

[TorrentAdditionDlg]
save_path_history=C:/Downloads/qBt

[TorrentCreator]
Comments="Site that's been online for at least 15 years\n"
IgnoreRatio=false
LastAddPath=/download/qBt-download-01/MyFun/MF-2021
LastSavePath=/download/qBt-download-01/qBt-torrent
OptimizeAlignment=true
PaddedFileSizeLimit=-1
PieceSize=0
PrivateTorrent=false
Size=@Size(592 707)
Source=
StartSeeding=true
TrackerList=
WebSeedList=

[TorrentOptionsDialog]
Size=@Size(450 582)

[TorrentProperties]
CurrentTab=4
Peers\qt5\PeerListState="@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\x6\x1\0\0\0\0\0\0\0\0\0\0\0\xf\0`\0\0\0\x2\0\0\0\xe\0\0\0\x64\0\0\0\r\0\0\0\x64\0\0\x6\x9b\0\0\0\xf\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\xf\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x62\0\0\0\x1\0\0\0\0\0\0\0.\0\0\0\x1\0\0\0\0\0\0\0\x31\0\0\0\x1\0\0\0\0\0\0\0\x33\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x36\0\0\0\x1\0\0\0\0\0\0\0I\0\0\0\x1\0\0\0\0\0\0\0<\0\0\0\x1\0\0\0\0\0\0\0H\0\0\0\x1\0\0\0\0\0\0\0=\0\0\0\x1\0\0\0\0\0\0\0>\0\0\0\x1\0\0\0\0\0\0\x3\x61\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)"
SplitterSizes="647,407"
Trackers\qt5\TrackerListState="@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x3J\0\0\0\b\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\b\0\0\0\x64\0\0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0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64)

[TransferListFilters]
CategoryFilterState=true
TagFilterState=false
selectedFilterIndex=1
statusFilterState=true
trackerFilterState=false
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

Anyway, here is an "update" with a little more detail.

In the docker log for the 1st image, there is one line that is not in the 2nd image:
1st image's initial startup log

Code: Select all

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8080

Connection to localhost (::1) 8080 port [tcp/http-alt] succeeded!
[ls.io-init] done.
2nd images initial startup log

Code: Select all

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8085

The WebUI administrator username is: admin
The WebUI administrator password was not set. A temporary password is provided for this session: uLsE9eZXA
You should set your own password in program preferences.
The 1st image successfully connected to the localhost's port 8080 while there is no indication the 2nd image connected on any port (I tried 8081 and 8085). I assume this is related to the 'ls.io.init' process and it isn't completing.

On a 2nd note:
I spun up a 3rd image using the WebUI_Port=8082 and TORRENTING_PORT=7881, it still fails, but fails in a different way
The WebUI came up and I could log in, but the WebUI couldn't connect to a qBt client.

The error message in the lower left corner of the browser is "qbittorrent client is not reachable" and when I open the option window, it is blank with only the text "Error: n" displayed in the upper left corner of the option pop-up.
qBt Log file:

Code: Select all

(N) 2024-10-28T14:39:57 - qBittorrent v4.6.7 started
(N) 2024-10-28T14:39:57 - Using config directory: /config/qBittorrent
(N) 2024-10-28T14:39:57 - Trying to listen on the following list of IP addresses: "0.0.0.0:7881,[::]:7881"
(I) 2024-10-28T14:39:57 - Peer ID: "-qB4670-"
(I) 2024-10-28T14:39:57 - HTTP User-Agent: "qBittorrent/4.6.7"
(I) 2024-10-28T14:39:57 - Distributed Hash Table (DHT) support: ON
(I) 2024-10-28T14:39:57 - Local Peer Discovery support: ON
(I) 2024-10-28T14:39:57 - Peer Exchange (PeX) support: ON
(I) 2024-10-28T14:39:57 - Anonymous mode: OFF
(I) 2024-10-28T14:39:57 - Encryption support: ON
(I) 2024-10-28T14:39:57 - Successfully listening on IP. IP: "127.0.0.1". Port: "TCP/7881"
(I) 2024-10-28T14:39:57 - Successfully listening on IP. IP: "127.0.0.1". Port: "UTP/7881"
(I) 2024-10-28T14:39:57 - Successfully listening on IP. IP: "172.18.0.3". Port: "TCP/7881"
(I) 2024-10-28T14:39:57 - Successfully listening on IP. IP: "172.18.0.3". Port: "UTP/7881"
(I) 2024-10-28T14:39:57 - Successfully listening on IP. IP: "::1". Port: "TCP/7881"
(I) 2024-10-28T14:39:57 - Successfully listening on IP. IP: "::1". Port: "UTP/7881"
(I) 2024-10-28T14:39:57 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Mon Sep 30 17:47:11 2024.
(N) 2024-10-28T14:39:57 - Using built-in WebUI.
(W) 2024-10-28T14:39:57 - Couldn't load WebUI translation for selected locale (C).
(N) 2024-10-28T14:39:57 - WebUI: Now listening on IP: *, port: 8082
(I) 2024-10-28T14:39:58 - Detected external IP. IP: "71.84.12.64"
(N) 2024-10-28T14:40:46 - WebAPI login success. IP: ::ffff:192.168.123.15
Looks okay to me.
And the docker log looks like it should:

Code: Select all

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 4.6.7-r0-ls352
Build-date: 2024-09-22T06:52:38+00:00
───────────────────────────────────────

[custom-init] No custom files found, skipping...
WebUI will be started shortly after internal preparations. Please wait...

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8082

The WebUI administrator username is: admin
The WebUI administrator password was not set. A temporary password is provided for this session: aJZeFW2gB
You should set your own password in program preferences.
Connection to localhost (::1) 8082 port [tcp/*] succeeded!
[ls.io-init] done.
Maybe I'm wasting my time with this. I was hoping someone would be able to point me in the right direction or just say it's not possible.
Amoeba
Newbie
Newbie
Posts: 3
Joined: Wed Nov 06, 2024 3:46 am

Re: Possible to run 2 qBt images on same docker host?

Post by Amoeba »

Hi, ticedoff8!

It it possible to run two separate images.
However, I would advise you to separate them into two docker-compose.yml files.

So, one docker-compose.yml would be:

Code: Select all

---
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /usr/local/qbittorrent.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped
And the other:

Code: Select all

---
services:
  qbittorrent-01:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent-01
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8081
      - TORRENTING_PORT=6882
    volumes:
      - /usr/local/qbittorrent-01.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8081:8081
      - 6882:6882
      - 6882:6882/udp
    restart: unless-stopped
I have made spun up these two containers and they do work. So reach out if it doesn't on your end.
Just be sure to put the docker-compose.yml files into separate folders before trying to create the containers.

By the way, Linuxserver's qbit images are very bad at giving out useful errors, when at all.
Sometimes, I would simply get a blank screen and nothing showed up in the log. Very frustrating chasing down the source.

Also, if you keep trying to recreate the container, you may run into an error which ends with "KeyError: 'ContainerConfig'".
To fix it, delete the existing container and try again.
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

In general, I always 'docker rm <lable>' after I make a change to the compose.yaml file.

But, thank you for the suggestion, but it didn't work.

First, I started with a clean slate:
-No existing /usr/local/qbittorrent-01.appdata/qBittorrent folder
-Created a new folder and a new compose.yaml file (/root/qbt-01/compose.yaml) and copied your yaml code into it.
-In the /root/qbt-01, I made a link to the docker-compose app (ln -s /usr/libexec/docker/cli-plugins/docker-compose).
-When I ran "./docker-compose up qbittorrent-01" the image was created and the WebUI came alive
EXCEPT: Same as before. I logged into the WebUI and it could not connect to the qBitorrent Client.

So, on my setup I can't run 2 qBittorrent images.

And, when I try the same technique with my original qbittorrent-01 config directory, I get the same failure where the WebUI never starts and port 8081 is dead.

So there are (at least) 2 different issues.
1- I can't run 2 docker images at the same time
2- Even if I could, my goal of migrating my Windows qBt to Linux/docker is not working out too well.
Amoeba
Newbie
Newbie
Posts: 3
Joined: Wed Nov 06, 2024 3:46 am

Re: Possible to run 2 qBt images on same docker host?

Post by Amoeba »

Okay, just to tackle the issue number 2 for a bit.

After everything is working, it should be simple to change the path of the torrents so you don't need to rehash everything.
I'll assume you used to have a qBit on a Windows pc, which contained the torrent files in G:\bittorrent\home-lab\qBt\downloads.
Now, you want to take the Windows machine out of the equation.

I will also assume the files on G:\bittorrent\home-lab\qBt\downloads are now on /mnt/qbittorrent.downloads on the home server.

Per the docker-compose.yml file, there is a volume from the above path to /downloads (internal to the container).
What you need to do is:
  • Go to the qbit webui
  • Select all of the torrents
  • Right click > Advanced > Change Location
  • Set the root directory to /downloads
This should change the whole path, except for the torrent folder's name, so, for example: if a torrent points to G:\bittorrent\home-lab\qBt\downloads\example_torrent (Windows path), it would become /downloads/example_torrent (container path), which translates to /mnt/qbittorrent.downloads/example_torrent (homes server path).

I have done something similar and it worked nicely, though not from windows to linux.
Amoeba
Newbie
Newbie
Posts: 3
Joined: Wed Nov 06, 2024 3:46 am

Re: Possible to run 2 qBt images on same docker host?

Post by Amoeba »

Back to the main issue now.

Let's try to replicate my config on your end and then we can customize it for your needs then.
We will create two new qbit containers. So, if you have any running, stop them before the following. You can start them again later.
Create two files in your home directory:
  • qbt-01
  • qbt-02
In ~/qbt-01, create a file named docker-compose.yml with:

Code: Select all

---
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent-01
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - ./config:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped
In ~/qbt-02, create a file named docker-compose.yml with:

Code: Select all

---
services:
  qbittorrent-01:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent-02
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8082
      - TORRENTING_PORT=6882
    volumes:
      - ./config:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8082:8082
      - 6882:6882
      - 6882:6882/udp
    restart: unless-stopped
I am not sure about the linking part that you said you did on the last answer, so let's try it the way I do it for now.
Go to ~/qbt-01/ and run "sudo docker-compose up -d" to spin up the container.
Do the same while inside ~/qbt-02/.

This should create wedbuis exposed on ports 8080 and 8082(I had a conflict on 8081, so I changed it).
If the above does not work, please reply with the output of "sudo docker ps" so we can see the exposed ports.

Inside each of the qbt folders, you will see a config/ directory. If all works well, this is where you should move all the config files from your Windows install.
Again, I have never done a migration from Windows to Linux, so it is possible it might not work perfectly. That is a problem for later though hehehe.
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

Thanks for your suggestions.
Sorry for the delay. I've been offline for a while and just got back in today.
Okay, just to tackle the issue number 2 for a bit.

After everything is working, it should be simple to change the path of the torrents so you don't need to rehash everything.
I'll assume you used to have a qBit on a Windows pc, which contained the torrent files in G:\bittorrent\home-lab\qBt\downloads.
Now, you want to take the Windows machine out of the equation.

I will also assume the files on G:\bittorrent\home-lab\qBt\downloads are now on /mnt/qbittorrent.downloads on the home server.

Per the docker-compose.yml file, there is a volume from the above path to /downloads (internal to the container).
What you need to do is:
Go to the qbit webui
Select all of the torrents
Right click > Advanced > Change Location
Set the root directory to /downloads
This should change the whole path, except for the torrent folder's name, so, for example: if a torrent points to G:\bittorrent\home-lab\qBt\downloads\example_torrent (Windows path), it would become /downloads/example_torrent (container path), which translates to /mnt/qbittorrent.downloads/example_torrent (homes server path).

I have done something similar and it worked nicely, though not from windows to linux.
When I started, what you describe here is what I was hoping it would be.
Seems simple...
Except the fundamental issue is the WebUI isn't up and/or I cannot connect to the WebUI on any ports I've tried using (8081, 9081, etc, etc).
I have looked at the qBt log and it seems that the client is up - the log shows it is checking the fastrestore files for each torrent and failing because there is no G:\ drive.

But, unless I can get 2 qBt images running using different ports for the WebUI, there's no chance to see if I can migrate the Windows qBt configuration to Linux.
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

Your testing configuration for 2 qBt clients to run at the same time works.
But, it doesn't work when combined with my original configuration.

There is some odd stuff going on.
I am logged in as root. There is a local user "ticedoff8" with UID:1000 and GID:1000 and all the directories and files that are created are owned by that user. I don't use "sudo <command>".
I also make links in each new directory to the docker-compose binary, mainly because it isn't on the PATH. That means I use it with the ./docker-compose command, and it works okay.
I also use a compose.yaml file instead of docker-compose.yml. I figured you meant docker-compose.yaml (not .yml), and that seems to work too.
I also changed the qbt-01 docker-compose.yaml label to qbittorrent-01. There is already a qbittorrent container that I don't want to delete.
My setups use a "config" directory /usr/local/<container_name>.appdata/ while yours is using ./config. They both have the correct ownership.

In a nutshell, I don't know which one of these differences causes the 2nd container's WebUI to fail.

Interestingly, the 2nd container started a new network:

Code: Select all

[root@docker01 qbt-02]# ./docker-compose up -d
[+] Running 2/2
 ✔ Network qbt-02_default    Created                                                                                                                          0.2s
 ✔ Container qbittorrent-02  Started                                                                                                                          0.3s
[root@docker01 qbt-02]# docker logs qbittorrent-02
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 4.6.7-r0-ls352
Build-date: 2024-09-22T06:52:38+00:00
───────────────────────────────────────

[custom-init] No custom files found, skipping...
WebUI will be started shortly after internal preparations. Please wait...

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8082

The WebUI administrator username is: admin
The WebUI administrator password was not set. A temporary password is provided for this session: ZLa4GHmDc
You should set your own password in program preferences.
Connection to localhost (::1) 8082 port [tcp/*] succeeded!
[ls.io-init] done.
[root@docker01 qbt-02]#
It looks like running at least 2 qBt containers configured per your recommendation is possible.
The next step is to figure out why it doesn't conform to the docker "standard" (as I understand it) and how I can get my 2 containers running harmoniously.

As a "next step", create a copy of the #1 client to a new directory.
Created a /root/qbt-prime directory, copied all the /usr/local/qbittorrent.appdata to a new /root/qbt-prime/config and created a docker-compose.yaml that matches the #1 client's compose.yaml (except change the label and the container names).
In that case, the new container started up and the WebUI showed all the existing torrents that were active in the OG container.

Code: Select all

[root@docker01 qbt-prime]# cat docker-compose.yaml
---
services:
  qbt-prime:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbt-prime
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - ./config:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped

[root@docker01 qbt-prime]#
... and it worked.
The new container came up and all the torrents came back online using the fastrestore info in /root/qbt-prime/config/qBittorrent/BT-backups.

The next step is to see if the /root/qbt-02/docker-compose.yaml container still comes up.
... and it did not work.

Code: Select all

[root@docker01 qbt-02]# cat docker-compose.yaml
---
services:
  qbittorrent-02:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent-02
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8082
      - TORRENTING_PORT=6882
    volumes:
      - ./config:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8082:8082
      - 6882:6882
      - 6882:6882/udp
    restart: unless-stopped

[root@docker01 qbt-02]#
There are no changes to the qbt-02 .yaml file
But, the failure is the same as before, the WebUI comes up but cannot connect to its client.
The browser window displays "qBittorrent client is unreachable" in the lower left-hand corner.

Code: Select all

[root@docker01 qbt-02]# docker ps -a
CONTAINER ID   IMAGE                                    COMMAND   CREATED          STATUS                         PORTS                                                                                                                                                           NAMES
58b606b2ea2e   lscr.io/linuxserver/qbittorrent:latest   "/init"   4 minutes ago    Up 4 minutes                   6881/tcp, 0.0.0.0:6882->6882/tcp, :::6882->6882/tcp, 8080/tcp, 6881/udp, 0.0.0.0:8082->8082/tcp, 0.0.0.0:6882->6882/udp, :::8082->8082/tcp, :::6882->6882/udp   qbittorrent-02
264de1a9e382   lscr.io/linuxserver/qbittorrent:latest   "/init"   11 minutes ago   Up 11 minutes                  0.0.0.0:6881->6881/tcp, :::6881->6881/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:6881->6881/udp, :::8080->8080/tcp, :::6881->6881/udp                                 qbt-prime
6b881bba9ee5   lscr.io/linuxserver/syslog-ng:latest     "/init"   2 months ago     Exited (0) 2 months ago                                                                                                                                                                        syslog-ng
da6c57b8094f   lscr.io/linuxserver/qbittorrent:latest   "/init"   2 months ago     Exited (0) About an hour ago                                                                                                                                                                   qbittorrent
[root@docker01 qbt-02]#
If you look at the line for qbittorrent-02, it seems something is still be trying to use ports 6881 and 8080. Those are definitely set to 8082 and 6882 in its docker-compose.yaml file. Is there undocumented compose file option that needs to be set?
I didn't notice if it that was different when I tested earlier.
obelisk
Newbie
Newbie
Posts: 1
Joined: Wed Dec 04, 2024 8:54 pm

Re: Possible to run 2 qBt images on same docker host?

Post by obelisk »

Sorry for jumping in the middle of this but I did spot what looks like a misconfiguration to me (you can ignore it if you like).

What I noticed is that you have both qBittorrent instances pointing to the same config folder on the host filesystem...

qbt-prime and qbitorrent-02 have:

volumes:
- ./config:/config

The configuration locations must be unique as there is a file called qBittorrent.conf located there which has among other things port configuration data for the WebUI. If both instances point to the same file they will both try to use the same port.

I do something similar with Radarr in docker so I can have one instance handle 1080p and the other be exclusively 4k (allows me to have a copy of each resolution). This is what it looks like in compose...

radarr:
image: "linuxserver/radarr:latest"
container_name: "radarr"
volumes:
- ${USERDIR}/.config/Radarr:/config

radarr4k:
image: "linuxserver/radarr:latest"
container_name: "radarr4k"
volumes:
- ${USERDIR}/.config/Radarr_4k:/config
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

obelisk wrote: Wed Dec 04, 2024 9:03 pm Sorry for jumping in the middle of this but I did spot what looks like a misconfiguration to me (you can ignore it if you like).

What I noticed is that you have both qBittorrent instances pointing to the same config folder on the host filesystem...

qbt-prime and qbitorrent-02 have:

volumes:
- ./config:/config

The configuration locations must be unique as there is a file called qBittorrent.conf located there which has among other things port configuration data for the WebUI. If both instances point to the same file they will both try to use the same port.

I do something similar with Radarr in docker so I can have one instance handle 1080p and the other be exclusively 4k (allows me to have a copy of each resolution). This is what it looks like in compose...

radarr:
image: "linuxserver/radarr:latest"
container_name: "radarr"
volumes:
- ${USERDIR}/.config/Radarr:/config

radarr4k:
image: "linuxserver/radarr:latest"
container_name: "radarr4k"
volumes:
- ${USERDIR}/.config/Radarr_4k:/config
Thanks for weighing in - I think I need all the help there is.
What you are describing is what I would consider to be the correct way to do this.

But, the suggestion is that the qbt docker image is broken in some way that requires them to be run from unique and separate folders, with each folder having a simi-unique docker-compose.yaml file that has 1 container defined.
So I have to cd into /root/qbt-prime and do a 'docker-compose up -d' (or stop) for the container labeled "qbt-prime", cd into /root/qbt-01 and run 'docker-compose up -d' (or stop) for the container labeled "qbt-01". Notice, there is no container name in the docker-compose commands.

"Normally", I'd have 1 compose.yaml file that has several different containers and then start and stop them using standard docker-compose commands.

The downside of doing as suggested is confusion and the requirement to start (and stop) each container while actually being in each respective directory.
/root/qbt-prime/config
/root/qbt-01/config
/root/qbt-02/config

This seemed to "work" when I started with 2 "fresh" container definitions from their own directories. I could log into the WebUI on different ports and while there were no torrents, there was no error messages either.
When I stopped these new containers and started my #1 (original container), everything started fine and as I expected. But, when I started one of the new (fresh) containers, the new container's WebUI couldn't connect to the client. Same error as before.

I've posted the original compose.yaml file with all the typical commands to start qBt and my syslog server and then the individual "docker-compose.yaml" files.
But the sticking point is running a 2nd qBt container. And nothing seems to work with my original #1 qBt image that has downloaded TB of torrents since I started it.

Honestly, I think there is something else going on here.
I hate to get started down the rabbit hole of Voodoo Solutions or Shotgun Troubleshooting. I wish someone from the team that manages the qBt docker images would weigh-in and tell me what I'm doing wrong.
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: Possible to run 2 qBt images on same docker host?

Post by ticedoff8 »

I'm going to close this thread.
I was able to get two docker images running at the same time, but it was based mainly on trial and error until I got it to work repeatably.

As far as I can tell, the correct commands are:

Code: Select all

docker-compose up <container_name> -d
docker logs <container_name>
docker ps -a
docker-compose down <cantainer_name>
When I use "docker stop", "docker start", "docker-compose stop" or "docker-compose start" that's there the problem seems to crop up.

I used the standard compose.yaml file for all the qBt images and rsyslog server (as I would do normally).
I found I can start and stop multiple qBt containers and each will use the details that are defined in each of their compose.yaml names.
This is my compose.yaml file that works for me:

Code: Select all

---
services:
  qbt-win:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbt-win
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8084
      - TORRENTING_PORT=6884
    volumes:
      - /mnt/qbittorrent.downloads/qBitTorrent.AppData/qbt-win.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8084:8084
      - 6884:6884
      - 6884:6884/udp
    restart: unless-stopped
---
services:
  qbt-02:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbt-02
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8082
      - TORRENTING_PORT=6882
    volumes:
      - /mnt/qbittorrent.downloads/qBitTorrent.AppData/qbt-02.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8082:8082
      - 6882:6882
      - 6882:6882/udp
    restart: unless-stopped
---
services:
  qbt-prime:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbt-prime
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /mnt/qbittorrent.downloads/qBitTorrent.AppData/qbt-prime.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped
---
services:
  syslog-ng:
    image: lscr.io/linuxserver/syslog-ng:latest
    container_name: syslog-ng
    environment:
      - PUID=0
      - PGID=0
      - TZ=TZ=America/Los_Angeles
      - LOG_TO_STDOUT= #optional
    volumes:
      - /usr/local/syslog-ng.appdata/:/config
      - /var/log:/var/log #optional
    ports:
      - 514:5514/udp
      - 601:6601/tcp
      - 6514:6514/tcp
    restart: unless-stopped
As one would expect, using "docker-compose up qbt-prime -d" spins up that container, then using "docker-compose up qbt-02 -d" spins up a 2nd container.

But, the starting point on all of these containers is they were "born" on this docker host.
They follow the recommended compose.yaml entries, only with several in one compose.yaml file.

I am using a NAS share for storing all the torrents from all the qBt clients and each of the qBt clients has their own unique config directory on the NAS.

I'm done with this part of my question.

But, I still haven't gotten the qBt migration from a Windows system to a docker container completed.
The container starts with an error message and the GUI is dead. Trying to open the WebUI just times out and never loads the page.

Code: Select all

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 4.6.7-r0-ls352
Build-date: 2024-09-22T06:52:38+00:00
───────────────────────────────────────

[custom-init] No custom files found, skipping...
QtSingleCoreApplication: listen on local socket failed, QLocalServer::listen: Unknown error 5
WebUI will be started shortly after internal preparations. Please wait...

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8084

The WebUI administrator username is: admin
The WebUI administrator password was not set. A temporary password is provided for this session: HjXvNNp8d
You should set your own password in program preferences.
[root@docker01 ~]#
I tried searching for
QtSingleCoreApplication: listen on local socket failed, QLocalServer::listen: Unknown error 5
but I can't find anything helpful.
My docker host is Rocky Linux, but it's supposed to be compatible with CentOS.

I'll shift this to the Linux forum and see if there are any clearer instructions to get it to migrate to a Linux host and hope that is good enough to use for docker. 
User avatar
Peter
Administrator
Administrator
Posts: 3044
Joined: Wed Jul 07, 2010 6:14 pm

Re: Possible to run 2 qBt images on same docker host?

Post by Peter »

I typed up a wall of text and then I just realized I could ask our best LLM friend. Hope you don't mind.
I'll check in a vps once I get some time but can't promise anything...

...

Root Cause
1. Local Socket Conflict: Qt-based applications (like `qBittorrent`) often create a local socket for internal communication. By default, these applications use the same socket name, causing conflicts when multiple instances are run simultaneously.
2. Default Config Paths: Each instance may inadvertently attempt to use the same configuration directory or environment variables if not explicitly separated.

Solutions
1. Separate Configurations
- You're already mounting separate volumes for `/config` in your `docker-compose` files. Ensure that each instance has a unique directory mapped to `/config` to avoid conflicts.

2. Override Local Socket Path
- Qt applications often use a predefined directory for their socket files. You can override this using the `QT_QPA_PLATFORM` or related environment variables.

Add this to each `environment` section in your `docker-compose` services:

Code: Select all

   environment:
     - QT_QPA_PLATFORM=offscreen
   
This disables the use of local sockets by the Qt library.

3. Use Different WebUI Ports
- You're already using unique `WEBUI_PORT` values for each instance. Ensure these ports are correctly mapped and not overlapping:

Code: Select all

   ports:
     - 8084:8084  # Example for qbt-win
     - 6884:6884
     - 6884:6884/udp
   
4. Networking Isolation
- If the issue persists, consider running each instance in its own Docker network:

Code: Select all

   networks:
     qbt-net1:
       driver: bridge
   services:
     qbt-win:
       networks:
         - qbt-net1
   
5. Custom Socket Path (Advanced)
- Modify the `qBittorrent` startup command or configuration file to use a custom local socket path.

Debugging Steps
1. Check Logs
Inspect the logs for more details about the error:

Code: Select all

   docker logs qbt-win
   
2. Verify Config Path
Ensure that `/config` is properly separated for each instance:

Code: Select all

   docker exec -it qbt-win ls /config
   
3. Port Conflicts
Verify that no other application or container is using the same ports.

Updated Example for `docker-compose.yml`
Here’s an updated snippet for one of your services with fixes applied:

Code: Select all

services:
  qbt-win:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbt-win
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - WEBUI_PORT=8084
      - TORRENTING_PORT=6884
      - QT_QPA_PLATFORM=offscreen
    volumes:
      - /mnt/qbittorrent.downloads/qBitTorrent.AppData/qbt-win.appdata:/config
      - /mnt/qbittorrent.downloads:/downloads #optional
    ports:
      - 8084:8084
      - 6884:6884
      - 6884:6884/udp
    networks:
      - qbt-net1
    restart: unless-stopped

networks:
  qbt-net1:
    driver: bridge
Next Steps
1. Update all instances with these changes.
2. Restart your `docker-compose` stack:

Code: Select all

   docker-compose down && docker-compose up -d
   
3. Verify each instance is running and accessible.

These changes should resolve the socket conflict issue. Let me know if you encounter further issues!
Post Reply