Wireguard dyonr-qbittorrent container not launching

Currently reading
Wireguard dyonr-qbittorrent container not launching

Telos

Subscriber
2,641
853
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
How do I put my existing linuxserver-qbittorrent container through it?
That's simple... relocate the port entries from the qbittorrent container to the gluetun container. Using docker-compose, it looks like this:
Code:
version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    hostname: gluetun
    cap_add:
      - NET_ADMIN
    ports:
      - 9117:9117 # jackett
      - 8080:8080 # qbt web interface
      - 6881:6881/tcp # qbt
      - 6881:6881/udp # qbt
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
So in your case (adjust using the qbt ports you chose for your qbt container)...

Code:
docker run -d --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=surfshark \
-p 8080:8080 \
-p 6881:6881/tcp \
-p 6881:6881/udp \
-e VPN_TYPE=wireguard \
-e WIREGUARD_PRIVATE_KEY=<privatekey> \
-e WIREGUARD_ADDRESSES="10.14.0.2/16" \
-e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun

Once this is running, SSH into the qbt container and issue this command…
curl ipconfig.io
It will return the IP address that qbt is using. If done correctly, that will be your VPN IP.

For security sake, in qbt's advanced settings, set your network adaptor to use "tun".
 

Rusty

Moderator
NAS Support
5,854
1,726
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
That's simple... relocate the port entries from the qbittorrent container to the gluetun container. Using docker-compose, it looks like this:
Code:
version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    hostname: gluetun
    cap_add:
      - NET_ADMIN
    ports:
      - 9117:9117 # jackett
      - 8080:8080 # qbt web interface
      - 6881:6881/tcp # qbt
      - 6881:6881/udp # qbt
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
So in your case (adjust using the qbt ports you chose for your qbt container)...

Code:
docker run -d --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=surfshark \
-p 8080:8080\
-p 6881:6881/tcp\
-p 6881:6881/udp\
-e VPN_TYPE=wireguard \
-e WIREGUARD_PRIVATE_KEY=<privatekey> \
-e WIREGUARD_ADDRESSES="10.14.0.2/16" \
-e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun

Once this is running, SSH into the qbt container and issue this command…
curl ipconfig.io
It will return the IP address that qbt is using. If done correctly, that will be your VPN IP.

For security sake, in qbt's advanced settings, set your network adaptor to use "tun".
Thats half of the story, you might confuse the OP. Also, compose is not something that he is familiar with.
 

Telos

Subscriber
2,641
853
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
Correct but there is no torrent client side of things just the vpn side and that is not enough in a separated scenario that’s what I meant
Well... honestly, you have confused me. You must add the client (qbt) ports to the gluetun container for this to work.

Then you must go back and modify the qbt container with network_mode: "container:gluetun"
 
I'm now a bit confused indeed 😅

Should I run this code in putty as root? (after removing the existing container)
Or should something also be changed in the gluetun-wireguard container?

Code:
docker run -d \
  --name=linuxserver-qbittorrent \
  -e PUID=1027 \
  -e PGID=100 \
  -e TZ=Europe/Amsterdam \
  -e WEBUI_PORT=8080 \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /volume1/docker/qbittorrent:/config \
  -v /video/downloads:/video/downloads \
  --restart unless-stopped \
  --network=gluetun-wireguard:gluetun
  lscr.io/linuxserver/qbittorrent:latest
 

Rusty

Moderator
NAS Support
5,854
1,726
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
I'm now a bit confused indeed 😅

Should I run this code in putty as root? (after removing the existing container)
Or should something also be changed in the gluetun-wireguard container?

Code:
docker run -d \
  --name=linuxserver-qbittorrent \
  -e PUID=1027 \
  -e PGID=100 \
  -e TZ=Europe/Amsterdam \
  -e WEBUI_PORT=8080 \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /volume1/docker/qbittorrent:/config \
  -v /video/downloads:/video/downloads \
  --restart unless-stopped \
  --network=gluetun-wireguard:gluetun
  lscr.io/linuxserver/qbittorrent:latest
As Telos said, you will need to make changes but in this case to both containers, vpn one and qbit.

Starting with qbit container you need to make 2 changes.

1. remove all the port settings. So completely eliminate this:

Code:
-p 8080:8080 \
-p 6881:6881 \
-p 6881:6881/udp \

2. add the network element pointing to the VPN container: --network=container:<name of your container>. So --network=container are system parameters, leave those and just correct for the name.

Once that is done, rerun the container.

Next, you need to make changes to the VPN container. There you will only need to publish the port values that you deleted from the qbit container.

So again, stop it, delete it and alter your docker run command to include the deleted section from previous steps:

Code:
-p 8080:8080 \
-p 6881:6881 \
-p 6881:6881/udp \

Once that is done, recreate the vpn container. Now, at this point maybe qbit will still not work if you already started it but the vpn container was not running with these changes, so feel free to just restart qbit container once again after you are certain that the vpn container is running and is connected to the provider.
 
Allright so do i need to add
Code:
--network=container:gluetun
or
Code:
--network=container
?
In a previous reply you mentioned the first one where :gluetun is added, or did you mean that as part of the container name?
 
I'm trying to follow your instructions but im having the weirdest errors in docker.
I successfully added the new qbittorrent container (after deleting the old one) without any ports, with this code. And then stopped the container.
Code:
docker run -d \
  --name=linuxserver-qbittorrent \
  -e PUID=1027 \
  -e PGID=100 \
  -e TZ=Europe/Amsterdam \
  -e WEBUI_PORT=8080 \
  -v /volume1/docker/qbittorrent:/config \
  -v /volume1/video/downloads:/video/downloads \
  --restart unless-stopped \
  --network=container:gluetun-wireguard \
  lscr.io/linuxserver/qbittorrent:latest

I earlier already deleted the gluetun wireguard container, and tried adding it again with this code below. But the problem is it wouldn't show up in the docker list of containers. Only after stopping and restarting the docker package would it appear.
Then I tried to change the name of the container to the correct 'gluetun-wireguard', but then it gives the error that 'local ports 6881 and 8080 conflict with other ports used by other services' when im trying to save it. But I don't have any other containers with any ports..?

Code:
# Wireguard
docker run -d --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=surfshark \
-p 8080:8080 \
-p 6881:6881 \
-p 6881:6881/udp \
-e VPN_TYPE=wireguard \
-e WIREGUARD_PRIVATE_KEY=<<privatekey>> \
-e WIREGUARD_ADDRESSES="10.14.0.2/16" \
-e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun
 

Rusty

Moderator
NAS Support
5,854
1,726
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Then I tried to change the name of the container to the correct 'gluetun-wireguard'
Just recreate the vpn container with that name and all the rest of the parameter needed and start fresh. Add the —name=gluten-wireguard as part of your docker run as well as all the rest of the parameters.
 
Okay I managed to get both containers working by re-adding the qbittorrent container but with right name that was given to the gluetun container (while the gluetun container was running).

I can now access qbittorrent at port 8080, but something seems to not be working correctly. It takes very long to find any peers after adding a magnet link, if it finds some at all. Some that I tried just stay at 'stalled' or 'metadata' without finding any peers.
Is there anything I need to change about the portforwarding maybe?
 

Rusty

Moderator
NAS Support
5,854
1,726
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Okay I managed to get both containers working by re-adding the qbittorrent container but with right name that was given to the gluetun container (while the gluetun container was running).

I can now access qbittorrent at port 8080, but something seems to not be working correctly. It takes very long to find any peers after adding a magnet link, if it finds some at all. Some that I tried just stay at 'stalled' or 'metadata' without finding any peers.
Is there anything I need to change about the portforwarding maybe?
Ok so looks like you are on the right track. There might be a custom port that is needed to be added to the vpn container (like the rest) depending on the tracker you are using. If it’s a private one then you will know what it is. If it’s a public one then not sure, not using torrents myself.

Do you have the same issue with an official ubuntu iso download? So not the same trackers?
 
Yeah Im trying different magnets and torrents. And tried an ubuntu iso file as well, but it stays stalled.
Tried a private tracker as well as public ones, but both stay either stalled or finding metadata.
 

Rusty

Moderator
NAS Support
5,854
1,726
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Yeah Im trying different magnets and torrents. And tried an ubuntu iso file as well, but it stays stalled.
Tried a private tracker as well as public ones, but both stay either stalled or finding metadata.
Guess a test of internet connectivity via vpn container should be next.

Open docker ui for the vpn container and go the the terminal tab. click the create button and type in bash.

Click the new bash tab and you should be in the container command line.

Try a simple ping google.com command
 
I added port 6881 udp/tcp to my router under portforwarding and directed it to the NAS, and now it finds peers right away. But unfortunately the speed stays kind off low. It maxes out at about 10-15MB/s, even though the same torrent immedately goes up to 90MB/s when trying it on my desktop without a VPN. Pretty surprised by this since with openvpn it maxed out at around 20-23MB/s.

I tried getting the terminal to work, but that doesn't seem to be working since Im getting a black screen with a cursor but I cant type in it, and an error message is displayed.
2022-09-22--20.02.10.jpg
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Question! maybe someone know if it is possible... At the moment I'm using VDSM as a VPN Gateway for my...
Replies
8
Views
3,154
It keeps stopping working between the 2 Synologys, and I have to keep running commands in the Terminal to...
Replies
21
Views
13,594
  • Question
Are you able to expand on this part? Make it more step by step? I spent the last week doing what you...
Replies
20
Views
3,470

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top