Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] binhex - qBittorrentVPN

Featured Replies

[SOLVED]
I found the resolution in another thread pointing to the github instructions, question #24, instruction to add the webUI port to VPN container's VPN_INPUT_PORTS variable.

I have another container (Nicotine+} routed through binhexQBT. The logs indicate it is successfully connecting to the web and logging in fine. However I'm unable to access the webui using SERVERIP:PORT. I have the port added to the BinhexVPN container and removed from the Nicotine template.

Sent from my Pixel 5 using Tapatalk
 

Edited by VelcroBP
added resolution to my issue

  • Replies 5.1k
  • Views 1.1m
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I rolled back to tag 5.1.1-1-01 which fixed the issue for me. I guess the new update wasn't tested for wireguard connections. Edit the docker container and change "Repository" from binhex/arch-qbitt

  • FWIW, I found this method in Reddit that seemed to work for me until they fix the log bug. But note if you have qbittorrent internet facing, it's a risk.   Add this line under [Preferences]

  • gustyScanner
    gustyScanner

    Hello! I have been using wireguard successfully for a long time with this container, today though when the container restarted I got the following error: 2025-06-27 10:35:26,490 DEBG 'start-script'

Posted Images

I just updated my qbittorrent docker on Unraid and now it wont start. 

Hello.

 

I updated my unraid server to 6.12 and I am unable to access my instance of rutorrent. It has been deprecated by the developer. It used to give me a prompt for webgui but it is no longer there. Every other docker has a webgui option. 

 

How can I bring over everything from rutorrent to qbittorrent? 

 

EDIT: Solved for now! Can access rutorrent after trying all the ports. Still need to know how to convert from rutorrent to qbittorrent. 

Edited by urbanracer34
partial fix found

Downloading Wireguard on router and unRAID container using other VPN causing issues?

I set up Wireguard on my router to access my server while traveling and so far it is working as expected. however nothing seems to be downloading with qbt-VPN. the container is set up using AirVPN config. it is running and the AirVPN ip is showing with ifconfig. It has Internet access when testing with speedtest-cli. However all downloads added since I setup the Wireguard and left are immediately stalling with no connections. A test of the port forward on AirVPN shows "Connection Refused: 111".

Is there something I'm missing that would prevent traffic to or from the container because of the router's Wireguard?

Sent from my Pixel 5 using Tapatalk

Hi, I have just switched from Mullvad to ProtonVPN on WG protocol. But I am having issues with port forwarding. Can you please help how I can find the active port and check regularly if it's still alive? I followed the guide below but natpmpc is not in the container.

 

https://protonvpn.com/support/port-forwarding-manual-setup/

Any tip on how to use this with Cloudfare Tunnel? Both the tunnel and the docker container are running on the same network. I keep getting this error in the Cloudfare Tunnel log:

 

2023-06-18T12:37:55Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp xxx.18.0.xx:80: connect: connection refused" connIndex=3 dest=https://qbt.xtu.icu/favicon.ico event=0 ip=198.41.200.43 type=http

 

Heimdall docker works fine with the following (it's the first one):

Screenshot_6.png.a39ebb93bed7fa9cbb1860610f9cfc3a.png

 

 

 

EDIT: Fixed my problem 30 seconds after making this post by adding:

:8080

at the end of my service URL in Cloudflare.

Edited by plantsandbinary

Hello forum:)

 

I´ve had a problem for some time now.. And i hope you can help me..

I want to send my sonarr through my qbittorrent/delugevpn, with privoxy.. The problem is that it´s not working:(

I thought that maybe the update would fix it but sadly no:(

 

Can you help me?

Do you need any info for how to fix the issue??

 

Best regards...

24 minutes ago, Mattti1912 said:

Hello forum:)

 

I´ve had a problem for some time now.. And i hope you can help me..

I want to send my sonarr through my qbittorrent/delugevpn, with privoxy.. The problem is that it´s not working:(

I thought that maybe the update would fix it but sadly no:(

 

Can you help me?

Do you need any info for how to fix the issue??

 

Best regards...

Why not just connect it directly?

8 hours ago, Mattti1912 said:

Hello forum:)

 

I´ve had a problem for some time now.. And i hope you can help me..

I want to send my sonarr through my qbittorrent/delugevpn, with privoxy.. The problem is that it´s not working:(

I thought that maybe the update would fix it but sadly no:(

 

Can you help me?

Do you need any info for how to fix the issue??

 

Best regards...

 

Check out here, question 27... https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md

 

Hello again and thank you..

 

I´ve tried the fix in q27 but it´s not working.. 

Any other ideas

 

Best regards

On 6/15/2023 at 12:19 PM, urbanracer34 said:

Hello.

 

I updated my unraid server to 6.12 and I am unable to access my instance of rutorrent. It has been deprecated by the developer. It used to give me a prompt for webgui but it is no longer there. Every other docker has a webgui option. 

 

How can I bring over everything from rutorrent to qbittorrent? 

 

EDIT: Solved for now! Can access rutorrent after trying all the ports. Still need to know how to convert from rutorrent to qbittorrent. 

I just finished migrating over my torrents from the depreciated binhex rutorrent container. I did have to pip install qbittorrent-api to simplify using the qbittorrent api. I am not a programmer and so my process is super clunky but I was able to migrate about 3.4k torrents successfully. I am not running unraid but I am using the same containers.

 

Rather than downloading the torrent files via "get .torrent" in rutorrent, I downloaded the torrents in the session directory of rtorrent which are named with the hash.  I had a bunch of torrents with custom directories set and without the torrent name added to the path so I could not import all of my torrents and point them at a certain directory.

 

I had manually moved some torrents over so I ended up making a python script to compare the torrents loaded in qbittorrent to those in rtorrent and for those missing, output the torrent name, hash, and save path to a .csv.  Using the csv list of torrents and the torrent files from the rtorrent session directory I made another script to go through the .csv of torrents not in qbittorrent to add them using the save path from rtorrent for each torrent without creating subfolders.

 

To generate the .csv of missing torrents:

import csv
import xmlrpc.client
from qbittorrentapi import Client

# qBittorrent API Configuration
QB_USERNAME = 'USERNAME' #change
QB_PASSWORD = 'PASSWORD' #change
QB_HOST = '192.168.1.123'  # Modify with qbittorrent ip address
QB_PORT = 9081  # Modify qbittorrent iport

# ruTorrent Configuration
RUTORRENT_RPC_URL = 'http://USERNAME:[email protected]:9080/RPC2'  # Modify with your rutorrent credentials

# Connect to qBittorrent
qb_client = Client(host=QB_HOST, port=QB_PORT)
qb_client.auth_log_in(QB_USERNAME, QB_PASSWORD)

# Connect to ruTorrent
ru_client = xmlrpc.client.Server(RUTORRENT_RPC_URL)

# Get list of torrents in qBittorrent
qb_torrents = qb_client.torrents_info()

# Get list of torrents in ruTorrent
ru_torrents = ru_client.download_list("","main")

# Compare the torrents and find missing ones
missing_torrents = []
for ru_torrent in ru_torrents:
    ru_torrent_hash = ru_client.d.get_hash(ru_torrent).lower()
    found = False
    for qb_torrent in qb_torrents:
        if ru_torrent_hash.lower() == qb_torrent['hash'].lower():
            found = True
            break
    if not found:
        ru_torrent_name = ru_client.d.get_name(ru_torrent)
        print("Missing Torrent found! " + ru_torrent_name)
        ru_torrent_path = ru_client.d.get_directory(ru_torrent)
        missing_torrents.append({
            'name': ru_torrent_name,
            'path': ru_torrent_path,
            'hash': ru_torrent_hash
        })

# Export missing torrents to a CSV file
csv_file = 'missing_torrents.csv'
with open(csv_file, 'w', encoding="utf-8", newline='') as file:
    writer = csv.writer(file)
    writer.writerow(['Torrent Name', 'Path', 'Torrent Hash'])
    for torrent in missing_torrents:
        writer.writerow([torrent['name'], torrent['path'], torrent['hash']])

print(f"List of missing torrents exported to {csv_file}")

 

Take the csv and add the torrents to qbittorrent using the downloaded torrent files from the session directory

import qbittorrentapi
import os
import csv

def add_torrent(username, password, url, torrent_file_path, save_path):
    # Connect to the qBittorrent client
    client = qbittorrentapi.Client(host=url, username=username, password=password)
    client.auth_log_in()

    try:
        # Read the .torrent file as binary
        with open(torrent_file_path, 'rb') as file:
            torrent_data = file.read()

        # Set the request parameters
        parameters = {
            'savepath': save_path,
            'paused': True,  # Set all torrents to be added as paused
            'autoTMM': False  # Disable subfolder creation
        }

        # Add the .torrent file
        client.torrents_add(torrent_files=torrent_data, savepath=save_path, category='', parameters=parameters)
        print("Torrent added successfully!")

    except qbittorrentapi.LoginFailed as e:
        print("Authentication failed. Please check your credentials.")
    except Exception as e:
        print(f"Error: {e}")

# Provide your qBittorrent's API URL, username, and password
api_url = 'http://192.168.1.123:9081'  # Replace with your qBittorrent's API URL and port
api_username = 'USERNAME'  # Replace with your qBittorrent's API username
api_password = 'PASSWORD'  # Replace with your qBittorrent's API password

# Provide the path to the CSV file
csv_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\missing_torrents.csv'  # Replace with the path to your CSV file of missing torrents generated by the previous script

# Read the CSV file and add the torrents
with open(csv_file_path, 'r') as file:
    csv_reader = csv.DictReader(file)
    for row in csv_reader:
        try:
            torrent_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\session_torrent_files\\' + row['Torrent Hash'].upper() + '.torrent'
            save_path = row['Path']
            add_torrent(api_username, api_password, api_url, torrent_file_path, save_path)
        except Exception as e:
            print(row)
            continue

 

All torrents will be added in as paused. I did a force recheck and once that was done everything was migrated over.  You could modify this to do it all on the server and in a single script with less code but this is what I got to work.

Edited by eske
typo

I recently had a power outage and ever since that my docker will not allow me to the Web UI site.  Every time I try to get to the Web UI, I am getting a Site cannot be reached, [IP] took too long to respond.  I am running the same port 8080.  I have tried to change this to see if this was causing the issue but it made no difference.  

41 minutes ago, D_gate said:

I recently had a power outage and ever since that my docker will not allow me to the Web UI site.  Every time I try to get to the Web UI, I am getting a Site cannot be reached, [IP] took too long to respond.  I am running the same port 8080.  I have tried to change this to see if this was causing the issue but it made no difference.  

Paste the contents of supervisord.log into your next post. Be sure to redact users and passwords.

24 minutes ago, D_gate said:

debug] Having issues resolving name 'www.google.com'

Looks like no internet connection but I believe the log you posted was also truncated.

Hi there,

I am having an issue where I can not access the webUI when the VPN is enabled (wireguard). When it is turned off I can access the internal ip (192.168.x.x) without issue.I have followed steps 4 and 24 and 25. I am not sure if its iptables or where the issue is.

 

Any advice would be greatly appreciated!

 

 

supervisord.log

Edited by TowerRH

5 hours ago, TowerRH said:

Hi there,

I am having an issue where I can not access the webUI when the VPN is enabled (wireguard). When it is turned off I can access the internal ip (192.168.x.x) without issue.I have followed steps 4 and 24 and 25. I am not sure if its iptables or where the issue is.

 

Any advice would be greatly appreciated!

 

 

supervisord.log 28.86 kB · 3 downloads

LAN_NETWORK=192.168.146.1/24

This is likely your issue.

https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md

Scroll down to Q4.

8 hours ago, D_gate said:

[debug] Having issues resolving name 'www.google.com'
[debug] Retrying in 5 secs...

DNS failure. Try just setting name resolution to 8.8.8.8

Ok so I found out that it is not working with VPN enabled for some reason.  Nothing has changed on my end as far as I know, my VPN is still active.  

I logged into my VPN provider and grabbed a new wireguard config file, now I can see the logs are connected and can resolve www.google.com but I still cannot get into the URL to manage files. 

14 minutes ago, TowerRH said:

Figured it out. I knew I was almost there.

And now I am working as well, with all the messing around I did (due to swapping routers when one died) I messed around with this setting as well.  With the new wireguard file and updating the IP to what it should be I am now working.  

 

Thank you all

On 6/23/2023 at 11:05 AM, eske said:

I just finished migrating over my torrents from the depreciated binhex rutorrent container. I did have to pip install qbittorrent-api to simplify using the qbittorrent api. I am not a programmer and so my process is super clunky but I was able to migrate about 3.4k torrents successfully. I am not running unraid but I am using the same containers.

 

Rather than downloading the torrent files via "get .torrent" in rutorrent, I downloaded the torrents in the session directory of rtorrent which are named with the hash.  I had a bunch of torrents with custom directories set and without the torrent name added to the path so I could not import all of my torrents and point them at a certain directory.

 

I had manually moved some torrents over so I ended up making a python script to compare the torrents loaded in qbittorrent to those in rtorrent and for those missing, output the torrent name, hash, and save path to a .csv.  Using the csv list of torrents and the torrent files from the rtorrent session directory I made another script to go through the .csv of torrents not in qbittorrent to add them using the save path from rtorrent for each torrent without creating subfolders.

 

To generate the .csv of missing torrents:

import csv
import xmlrpc.client
from qbittorrentapi import Client

# qBittorrent API Configuration
QB_USERNAME = 'USERNAME' #change
QB_PASSWORD = 'PASSWORD' #change
QB_HOST = '192.168.1.123'  # Modify with qbittorrent ip address
QB_PORT = 9081  # Modify qbittorrent iport

# ruTorrent Configuration
RUTORRENT_RPC_URL = 'http://USERNAME:[email protected]:9080/RPC2'  # Modify with your rutorrent credentials

# Connect to qBittorrent
qb_client = Client(host=QB_HOST, port=QB_PORT)
qb_client.auth_log_in(QB_USERNAME, QB_PASSWORD)

# Connect to ruTorrent
ru_client = xmlrpc.client.Server(RUTORRENT_RPC_URL)

# Get list of torrents in qBittorrent
qb_torrents = qb_client.torrents_info()

# Get list of torrents in ruTorrent
ru_torrents = ru_client.download_list("","main")

# Compare the torrents and find missing ones
missing_torrents = []
for ru_torrent in ru_torrents:
    ru_torrent_hash = ru_client.d.get_hash(ru_torrent).lower()
    found = False
    for qb_torrent in qb_torrents:
        if ru_torrent_hash.lower() == qb_torrent['hash'].lower():
            found = True
            break
    if not found:
        ru_torrent_name = ru_client.d.get_name(ru_torrent)
        print("Missing Torrent found! " + ru_torrent_name)
        ru_torrent_path = ru_client.d.get_directory(ru_torrent)
        missing_torrents.append({
            'name': ru_torrent_name,
            'path': ru_torrent_path,
            'hash': ru_torrent_hash
        })

# Export missing torrents to a CSV file
csv_file = 'missing_torrents.csv'
with open(csv_file, 'w', encoding="utf-8", newline='') as file:
    writer = csv.writer(file)
    writer.writerow(['Torrent Name', 'Path', 'Torrent Hash'])
    for torrent in missing_torrents:
        writer.writerow([torrent['name'], torrent['path'], torrent['hash']])

print(f"List of missing torrents exported to {csv_file}")

 

Take the csv and add the torrents to qbittorrent using the downloaded torrent files from the session directory

import qbittorrentapi
import os
import csv

def add_torrent(username, password, url, torrent_file_path, save_path):
    # Connect to the qBittorrent client
    client = qbittorrentapi.Client(host=url, username=username, password=password)
    client.auth_log_in()

    try:
        # Read the .torrent file as binary
        with open(torrent_file_path, 'rb') as file:
            torrent_data = file.read()

        # Set the request parameters
        parameters = {
            'savepath': save_path,
            'paused': True,  # Set all torrents to be added as paused
            'autoTMM': False  # Disable subfolder creation
        }

        # Add the .torrent file
        client.torrents_add(torrent_files=torrent_data, savepath=save_path, category='', parameters=parameters)
        print("Torrent added successfully!")

    except qbittorrentapi.LoginFailed as e:
        print("Authentication failed. Please check your credentials.")
    except Exception as e:
        print(f"Error: {e}")

# Provide your qBittorrent's API URL, username, and password
api_url = 'http://192.168.1.123:9081'  # Replace with your qBittorrent's API URL and port
api_username = 'USERNAME'  # Replace with your qBittorrent's API username
api_password = 'PASSWORD'  # Replace with your qBittorrent's API password

# Provide the path to the CSV file
csv_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\missing_torrents.csv'  # Replace with the path to your CSV file of missing torrents generated by the previous script

# Read the CSV file and add the torrents
with open(csv_file_path, 'r') as file:
    csv_reader = csv.DictReader(file)
    for row in csv_reader:
        try:
            torrent_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\session_torrent_files\\' + row['Torrent Hash'].upper() + '.torrent'
            save_path = row['Path']
            add_torrent(api_username, api_password, api_url, torrent_file_path, save_path)
        except Exception as e:
            print(row)
            continue

 

All torrents will be added in as paused. I did a force recheck and once that was done everything was migrated over.  You could modify this to do it all on the server and in a single script with less code but this is what I got to work.

 

@eske Thanks for the advice. I am a horrible coder so I really can't use scripts in my environment. 

 

Would just adding the original torrents from rutorrent's session folder, and not the "libtorrent_resume or "rutorrent" ones, to an new instance of an torrent client suffice? 

 

EDIT1: I have all 641 current torrent files ready to go to a new client.

Edited by urbanracer34

Hello,

 

I was wondering how I can modify the port the Qbittorrent instance uses for connecting to other peers. I am listed as unconnectable.

 

I'm currently using port 15276.  I port forwarded on my router but the connection is refused. 

 

Thanks!

 

 GIBSON_UpdateContainer2.pdf

 

 

Edited by urbanracer34

On 8/6/2022 at 6:09 AM, nodii said:

Could I have some help configuring this to work with ProtonVPN, please?

 

On 12/31/2022 at 3:10 PM, Globe89 said:

I have ProtonVPN and it supports user downloadable Wireguard configs. And I'm trying to run Qbittorrentvpn on a Synology NAS with DSM 7.1. After much troubleshooting, I did manage to get your docker container working. But it's a hack, so I'm hoping there is a more elegant solution.

 

The tl;dr of the solution is that I had to add VPN_DEVICE_TYPE = wg0 to the container environment, or the binhex tunnel up script would not detect that the Wireguard tunnel came up. After I got past the hurdle there is apparently some oddity with how WG works on a Synology. I found a Reddit post (link below) that came to the rescue. It has additional postup/postdown steps that resolved the internet connectivity issue, along with tweaking AllowIPs = 0.0.0.0/1,128.0.0.0/1. 

 

The biggest problem with my hack, is that if I modify the ProtonVPN WG config file to add the needed changes, when the container starts and it creates the wg0.conf file, the custom postup/postdown lines are lost. So I have to modify the wg0.conf file after the container starts and wait for the watchdog process to re-try the tunnel, at which point everything works. Not elegant. 

 

www.reddit. com/r/synology/comments/xkxjfh/fya_how_to_connect_synology_to_a_wireguard_vpn/

 

Hacked solution:

 

Start binhex container, then open the generated wg0.conf file and modify it as follows (note it's important to run the Synology postup/postdown commands BEFORE the binhex inserted commands). Save the config file and wait for the watchdog process to re-try the tunnel, at which point it comes up and life is good. 

 

[Interface]

Table = 2468
PostUp = wg set wg0 fwmark 1234
PostUp = ip rule add not fwmark 1234 table 2468
PostUp = ip rule add table main suppress_prefixlength 0
PostUp = iptables -I FORWARD -i %i -m state --state NEW -j DROP; iptables -t nat -A POSTROUTING -o %i -j MASQUERADE
PostUp = '/root/wireguardup.sh'
PostDown = iptables -D FORWARD -i %i -m state --state NEW -j DROP; iptables -t nat -D POSTROUTING -o %i -j MASQUERADE
PostDown = ip rule del table main suppress_prefixlength 0
PostDown = ip rule del not fwmark 1234 table 2468
PostDown = '/root/wireguarddown.sh'

# Key for qbittorrent
# Bouncing = 5
# NetShield = 0
# Moderate NAT = off
# NAT-PMP (Port Forwarding) = on
# VPN Accelerator = on
PrivateKey = xxxxxx
Address = 10.2.0.2/32
DNS = 1.1.1.1

[Peer]
# CA#21
PublicKey = xxxx
AllowedIPs = 0.0.0.0/1,128.0.0.0/1
Endpoint = xxxxx:51820

 

I'll be the first to admit I have no idea what the additional IP rules do, but they work. Here's the container variables that work:

 

DEBUG true

ENABLE_PRIVOXY yes

HOME /home/nobody

LAN_NETWORK 10.13.2.1/24

LAN Gen_GB.UTF-8

NAME_SERVERS 1.1.1.1

PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

PGID 100

PUID 1024

STRICT_PORT_FORWARD yes

TERM xterm

UMASK 000

VPN_CLIENT wireguard

VPN_DEVICE_TYPE wg0

VPN_ENABLED yes

VPN_INPUT_PORTS 50004

VPN_OUTPUT_PORTS 56780

VPN_PROV protonvpn

WEBUI_PORT 8080

 

The biggest issue is the postup/postdown rules getting lost and for some reason I had to define VPN_DEVICE_TYPE which I didn't see documented anywhere (bug?).

 

 

On 6/18/2023 at 1:21 AM, st34m said:

Hi, I have just switched from Mullvad to ProtonVPN on WG protocol. But I am having issues with port forwarding. Can you please help how I can find the active port and check regularly if it's still alive? I followed the guide below but natpmpc is not in the container.

 

https://protonvpn.com/support/port-forwarding-manual-setup/

 

Did any of you get this container working with ProtonVPN? I created a .conf file with no fancy stuff like the VPN accelerator or extra filtering and chose a server with P2P support, and enabled NAT-PMP. The tunnel will come up and the web UI is accessible, but I am not connectable yet.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.