[Support] binhex - qBittorrentVPN


Recommended Posts

3 hours ago, whauk said:

Since yesterday I cannot access the Web GUI anymore (after a restart of the container, no other changes). Does anyone else have the same problem?

Yes, with VPN enabled is not possible to access the GUI. When set 'no' to 'VPN_ENABLED' the GUI works.

Link to comment
On 4/1/2020 at 1:12 PM, binhex said:

Your are out of luck, no port forward = low speeds switch to a provider that supports port forwarding

Sent from my CLT-L09 using Tapatalk
 

You say that, but with NordVPN, no port forwarding, I've been able to download at 60MB/s pretty regularly.  Of course, this varies by indexer and seed amount. Granted, with PIA properly setup, I can get over 100MB/s, 60MB is still pretty damn fast.

Edited by dlchamp
Added more info
Link to comment

I seem to have this problem where I cannot connect to peers. I made a video to easily show what happens:

 

 

I'm using PIA and here are the logs: https://pastebin.com/gTyE4AcZ. My machine is directly accessible through the internet so my LAN_NETWORK is set to 110.111.112.113/32, where this is of course an example IP.

 

I checked the documentation and I think Q6 is about this. So I checked the whole answer, but only the first point is relevant: Incoming port not defined correctly. This seems the most likely cause, although the logs seem to say ports are open. If I check qBittorrent connection tab I see it's using port 22968. Docker tells me the following ports are opened: 0.0.0.0:6881->6881/tcp, 0.0.0.0:6881->6881/udp, 8080/tcp, 0.0.0.0:8118->8118/tcp. Port is open. See edit below. So I have no idea what's causing this.

 

My docker-compose.yml looks like this:

  qbit:
    image: binhex/arch-qbittorrentvpn:latest
    container_name: qbit
    restart: always
    networks:
      - proxy
    cap_add:
      - NET_ADMIN
    ports:
      - 6881:6881
      - 6881:6881/udp
      # - 8080:8080
      - 8118:8118
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./qbittorrent:/config
      - /home/user/downloads/:/downloads
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=$VPN_USERNAME
      - VPN_PASS=$VPN_PASSWORD
      - VPN_PROV=pia
      - STRICT_PORT_FORWARD=yes
      - ENABLE_PRIVOXY=no
      - LAN_NETWORK=110.111.112.113/32
      - NAME_SERVERS=209.222.18.222,84.200.69.80,37.235.1.174,1.1.1.1,209.222.18.218,37.235.1.177,84.200.70.40,1.0.0.1
      #- ADDITIONAL_PORTS=1234
      - DEBUG=false
      - WEBUI_PORT=8080
      - UMASK=000
      - PUID=$PUID
      - PGID=$PGID
    labels:
      - "traefik.enable=true"
      # HTTP Routers
      - "traefik.http.routers.qbittorrent-rtr.entrypoints=https"
      - "traefik.http.routers.qbittorrent-rtr.rule=Host(`qbit.$DOMAINNAME`)"
      - "traefik.http.routers.qbittorrent-rtr.tls=true"
      # Middlewares
      - "traefik.http.routers.qbittorrent-rtr.middlewares=chain-authelia-auth@file"
      # HTTP Services
      - "traefik.http.routers.qbittorrent-rtr.service=qbittorrent-svc"
      - "traefik.http.services.qbittorrent-svc.loadbalancer.server.port=8080"

I cannot download anything right now, so please help me out!

 

Edit: The port is open apparently! So that cannot be the issue:

image.png.acad8cd6cbba10eabc0fc398eb3a620b.png

Edited by Rourke
Link to comment

I seem to have fixed my issue. I totally forgot about permissions. The download folder wasn't set to the right owner. A simple sudo chown -R user:user ~/downloads fixed it.

 

If anyone runs into problems like this and you don't know where to start, it helps to check the qBittorrent logs (not printed by docker logs). The qBittorrent logs can be found in the config folder: /qBittorrent/data/logs/qbittorrent.log. Thanks Binhex for your wonderful containers!

Link to comment
On 6/21/2020 at 2:00 PM, Rourke said:

A simple sudo chown -R user:user ~/downloads fixed it.

Can you elaborate a bit on this part?

I know how to navigate to what folder I need. I know what chown -R does. But I cannot figure out how to find which user I need to change permissions to.

Link to comment
11 minutes ago, Civrock said:

Can you elaborate a bit on this part?

I know how to navigate to what folder I need. I know what chown -R does. But I cannot figure out how to find which user I need to change permissions to.

Sure! I'm using the PUID and PGID environment variables so that all files created from this qBittorrent are from my user (user and group ID 1000). This way I can easily browse, move or even edit files through my server (host) without going into the container itself. However I've mounted the volume ~/downloads:/downloads which was still a folder owned by root on my host.

 

So basically I did a id command on my host, saw user and group id 1000, did sudo chown -R 1000:1000 ~/downloads, restarted the container and it could read and write to my /downloads folder.

Edited by Rourke
  • Thanks 1
Link to comment
39 minutes ago, Rourke said:

Sure! I'm using the PUID and PGID environment variables so that all files created from this qBittorrent are from my user (user and group ID 1000). This way I can easily browse, move or even edit files through my server (host) without going into the container itself. However I've mounted the volume ~/downloads:/downloads which was still a folder owned by root on my host.

 

So basically I did a id command on my host, saw user and group id 1000, did sudo chown -R 1000:1000 ~/downloads, restarted the container and it could read and write to my /downloads folder.

So my individual user account shows as id 1000, tried that and I am still getting the same issue you had above. I reset the permissions to 99:100 which is the default for most containers and that still did not work. The logs are still showing permission denied error for me.

 

Edit: I found the problem. It wasn't permissions for me, but rather one of the paths in the container was modified so it was trying to save to an invalid path. Same looking error, but different solutions.

Thanks for your elaboration and help @Rourke

Edited by Civrock
  • Like 1
Link to comment

I can't get the Web UI to pull up, but my PIA VPN is working normally via Privoxy. I checked the logs for the Docker and everything seems to be in order. I then looked at qBittorrent's logs and it said that it wasn't able to map a port via uPnP. The only thing different about my setup vs. last week is that I just upgraded my router to a box running pfSense over the weekend and I didn't have uPnP enabled on it like it was with my previous router, so I enabled that.

 

Now the qBittorrent logs look good, it even added a torrent from Sonarr per the log, but I still can't pull up the Web UI. I'm at kind of a loss here. It could be some other setting within pfSense that I'm unaware of, hopefully there's another power user here with a bit more familiarity with pfSense and this docker that could help me out.

 

If there's any kind of log or anything that would help to post, let me know.

 

Edit: I ended up using binhex's privoxy VPN docker to route the traffic through and used linuxserver's qbittorent docker as I couldn't get binhex's rtorrent or deluge dockers to work either. I'm sure it's something specific to my setup, but at least I'm up and running again.

Edited by chris_b_chicken
Ended up solving my own problem
Link to comment
11 hours ago, Civrock said:

So my individual user account shows as id 1000, tried that and I am still getting the same issue you had above. I reset the permissions to 99:100 which is the default for most containers and that still did not work. The logs are still showing permission denied error for me.

 

Edit: I found the problem. It wasn't permissions for me, but rather one of the paths in the container was modified so it was trying to save to an invalid path. Same looking error, but different solutions.

Thanks for your elaboration and help @Rourke

You could go into the container with sudo docker exec -it qbittorrent /bin/bash (or /bin/sh) and check why you can't read or write to your download volume. Usually there is something out of the ordinary.

Link to comment

Anyone else having issues with the VPN portion of this?  I'm using PIA with my openvpn configured to the Netherlands.  Have also tried France and Germany.  I keep getting the same problem where downloads will start just fine, and then after 10 or 15 minutes they stall out even though I'm connected to plenty of seeds and peers.   If I go into the settings and turn off strict port forwarding then everything seems to work fine.  Just wondering what the downside of having this option off is.

Link to comment

Hi,

 

So i am unable to load qbittorrent it I have the VPN enabled. I've made sure the log in is correct. i have strict port forwarding off. I've tried deluge and it does the same thing unless i turn off the VPN. Heres the logs I'm receiving 

 

 

2020-07-10 06:28:25,098 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-07-10 06:28:25,099 INFO success: watchdog-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-07-10 06:28:25,100 DEBG 'watchdog-script' stdout output:
[info] qBittorrent config file already exists, skipping copy

2020-07-10 06:28:25,100 DEBG 'watchdog-script' stdout output:
[info] Removing session lock file (if it exists)...

2020-07-10 06:28:25,110 DEBG 'start-script' stdout output:
[warn] Password contains characters which could cause authentication issues, please consider changing this if possible

2020-07-10 06:28:25,170 DEBG 'start-script' stdout output:
[info] Default route for container is 172.17.0.1

2020-07-10 06:28:25,174 DEBG 'start-script' stdout output:
[info] Adding 209.222.18.222 to /etc/resolv.conf

2020-07-10 06:28:25,178 DEBG 'start-script' stdout output:
[info] Adding 84.200.69.80 to /etc/resolv.conf

2020-07-10 06:28:25,181 DEBG 'start-script' stdout output:
[info] Adding 37.235.1.174 to /etc/resolv.conf

2020-07-10 06:28:25,185 DEBG 'start-script' stdout output:
[info] Adding 1.1.1.1 to /etc/resolv.conf

2020-07-10 06:28:25,189 DEBG 'start-script' stdout output:
[info] Adding 209.222.18.218 to /etc/resolv.conf

2020-07-10 06:28:25,193 DEBG 'start-script' stdout output:
[info] Adding 37.235.1.177 to /etc/resolv.conf

2020-07-10 06:28:25,197 DEBG 'start-script' stdout output:
[info] Adding 84.200.70.40 to /etc/resolv.conf

2020-07-10 06:28:25,201 DEBG 'start-script' stdout output:
[info] Adding 1.0.0.1 to /etc/resolv.conf

2020-07-10 06:30:25,318 DEBG 'start-script' stderr output:
Error: error sending query: Could not send or receive, because of network error

Link to comment

Hi all,

 

I'm having an issue with qbittorrentvpn where after a couple of days of running fine, new torrents will add to the list (for example automatically added via sonarr, but can be manual as well) but won't start downloading or even download the metadata. If I restart the docker container, it then starts normally. I'm pretty sure existing seeds will continue to periodically upload. The logs mention an inactivity timeout, and I wonder whether this is related. 

 

Quote

2020-07-21 02:10:49,054 DEBG 'start-script' stdout output:
Tue Jul 21 02:10:48 2020 [openvpn2.vpnunlimitedapp.com] Inactivity timeout (--ping-exit), exiting

2020-07-21 02:10:49,528 DEBG 'start-script' stdout output:
Tue Jul 21 02:10:49 2020 /usr/bin/ip addr del dev tun0 local 10.200.0.206 peer 10.200.0.205

2020-07-21 02:10:49,568 DEBG 'start-script' stdout output:
Tue Jul 21 02:10:49 2020 SIGTERM[soft,ping-exit] received, process exiting

2020-07-21 02:11:19,725 DEBG 'start-script' stdout output:
[warn] OpenVPN process terminated, restarting OpenVPN...

2020-07-21 02:11:19,774 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:19 2020 WARNING: file 'credentials.conf' is group or others accessible
Tue Jul 21 02:11:19 2020 OpenVPN 2.4.9 [git:makepkg/9b0dafca6c50b8bb+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Apr 20 2020
Tue Jul 21 02:11:19 2020 library versions: OpenSSL 1.1.1g 21 Apr 2020, LZO 2.10

2020-07-21 02:11:19,775 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:19 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts

2020-07-21 02:11:19,775 DEBG 'start-script' stdout output:
[info] OpenVPN restarted

2020-07-21 02:11:19,778 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:19 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]209.58.135.106:1194
Tue Jul 21 02:11:19 2020 UDP link local: (not bound)
Tue Jul 21 02:11:19 2020 UDP link remote: [AF_INET]209.58.135.106:1194

2020-07-21 02:11:20,555 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:20 2020 [openvpn2.vpnunlimitedapp.com] Peer Connection Initiated with [AF_INET]209.58.135.106:1194

2020-07-21 02:11:27,227 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:27 2020 TUN/TAP device tun0 opened
Tue Jul 21 02:11:27 2020 /usr/bin/ip link set dev tun0 up mtu 1500

2020-07-21 02:11:27,263 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:27 2020 /usr/bin/ip addr add dev tun0 local 10.200.0.62 peer 10.200.0.61

2020-07-21 02:11:27,264 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:27 2020 /root/openvpnup.sh tun0 1500 1553 10.200.0.62 10.200.0.61 init

2020-07-21 02:11:27,401 DEBG 'start-script' stdout output:
Tue Jul 21 02:11:27 2020 Initialization Sequence Completed

2020-07-21 02:11:28,049 DEBG 'start-script' stdout output:
[info] Application does not require port forwarding or VPN provider is != pia, skipping incoming port assignment

2020-07-21 02:11:28,066 DEBG 'start-script' stdout output:
[info] Checking we can resolve name 'www.google.com' to address...

2020-07-21 02:11:28,619 DEBG 'start-script' stdout output:
[info] DNS operational, we can resolve name 'www.google.com' to address '216.58.195.68'

2020-07-21 02:11:28,990 DEBG 'start-script' stdout output:
[info] Attempting to get external IP using Name Server 'ns1.google.com'...

2020-07-21 02:11:29,751 DEBG 'start-script' stdout output:
[info] Successfully retrieved external IP address 209.58.135.106

2020-07-21 02:11:49,771 DEBG 'watchdog-script' stdout output:
[info] qBittorrent listening interface IP 10.200.0.206 and VPN provider IP 10.200.0.62 different, marking for reconfigure

 

So my questions are, does anyone else have this problem, and is anyone aware of a solution? Or, if not, could someone help me with a script that restarts qbittorentvpn every 24 hours or so?

 

Thanks!

Link to comment

Next time it happens test container connectivity by running something like:

docker exec -it vpn curl ipinfo.io

I renamed my container vpn. Substitute whatever name you have in the command above. If everything's working it should return your VPN IP and additional details.

 

To test the connection and restart containers automatically you can run Rebuild-DNDC available in the Community Apps. Detailed description here:

https://github.com/elmerfdz/rebuild-dndc

Link to comment
On 4/26/2019 at 12:45 PM, Fraih said:

Until yesterday I had never been able to reach qBittorrent GUI through ZeroTier. Maybe I did something else, but I will switch it back to "yes" later when I get home and I will try again to see if the problem comes back by only changing that...

Did we ever figure out what the issue was here? I am experiencing the same problem.

Link to comment
5 hours ago, alexacallmebaka said:

Did we ever figure out what the issue was here? I am experiencing the same problem.

Hello, I don't remember I did anything else than changing STRICT_PORT_FORWARD to no, but binhex already said that it shouldn't affect anything. I have ZeroTier as a host and qBittorrent as a bridge.

Link to comment

Hey folks, I'm having issues with downloading anything in qbittorrent. I've set the directories up as I want but it wont download anything, if I put them back to default it will. So obviously I'm not putting correct download location in as Im a first time user of unraid. Can anyone help me out?

 

Qbittorrent details from docker page:

/data/mnt/user/Torrents/Downloads/

/config/mnt/user/appdata/binhex-qbittorrentvpn

 

Setting menu inside it defaults to:

/config/qBittorrent/downloads/

 

I change it to:

/data/mnt/user/Torrents/Downloads/

 

Torrents won't download, each one says stalled, set it back to default and away they go no problem. From this can anyone guide me on what I should be putting in the Settings menu?

 

I've also tried deluge by binhex also to the /Torrents/Downloads/ folder and it works straight off the bat but its a nightmare of software to use. Hate it. A;ways used qbittorrent on pc for years so I would like to use it also on server.

 

Thanks in advance.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.