Wireguard dyonr-qbittorrent container not launching

Currently reading
Wireguard dyonr-qbittorrent container not launching

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 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.View attachment 10794
no need for terminal test if the connection is there then. So the port forward was the issue.

Speed will depend ofc on the client, it’s speed and 10-20% difference from openvpn could be a temporary thing. Test it out with multiple torrents or with one to see how it behaves.
 

Telos

Subscriber
2,641
853
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
no need for terminal test if the connection is there then. So the port forward was the issue.
There should be no need to port forward. This suggests that the connection is not fully running with the VPN.

To check this, open the qbt terminal window and enter

curl ipconfig.io

If your local IP is returned, there is a problem. Do not use qbt until you confirm proper connectivity.

Presuming this all checks out (and I do not understand the port-forward need at all),
  • Be sure that qbt accepts only tun network connections
    rMKnEsg.png
  • Be sure that your torrent listening port does not change, or you will lose all connectivity
I recommend that the OP install Portainer docker, and set these containers up using docker-compose. There are several reasons for this.

Each time you choose to add another container (ex. jackett) to the VPN, you must repeat all the SSH commands to destroy and rebuild the container.

Using the Synology Docker GUI provides to reliable means to update Gluetun when new images are released.

Using docker compose allows you to stack containers that work together... in this example gluetun and qbt... so that when you update gluetun (image or configuration), it will auto-relink qbt. Presently OP must restart qbt each time gluetun is restarted,
 
If I want to use portainer to combine these 2 containers into one, how would I go about doing that? I assume I should make a stack? What would be the compose code I need to use? Below is the code I use to set up the 2 separate containers via putty.
Code:
# Wireguard gluetun
docker run -d --cap-add=NET_ADMIN --name=gluten-wireguard -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

# qbit
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:gluten-wireguard \
  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 assume I should make a stack?
Correct.

You will need to use the compose code not the docker run one. If will be something along these lines:

YAML:
version: "3.5"
services:
  vpn:
    image: qmcgaw/gluetun
    container_name: gluten-wireguard
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=nordVPNaccount
      - VPN_SERVICE_PROVIDER=surfshark
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=<<privatekey>>
      - WIREGUARD_ADDRESSES="10.14.0.2/16"
      - SERVER_COUNTRIES=Netherlands qmcgaw/gluetun
    ports:
      - 8088:8088
      - 6881:6881
      - 6881:6881/udp
  torrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: service:vpn
    environment:
      - WEBUI_PORT=8088
      - PUID=1027
      - PGID=101
      - TZ=Europe/Amsterdam
    volumes:
      - /volume1/docker/qbittorrent:/config
      - /volume1/video/downloads:/video/downloads
    depends_on:
      - vpn
    restart: always

You will notice that the VPN element is called inside the torrent client element with a slightly different command: network_mode: service:vpn. Considering they are a part of the same stack, each element is a service, and as such, are called using the variable service and ending with the name of the service, in this case vpn (as that is the name of the wireguard container in this stack. You are free to change the name of the service, container or any other value element as you see fit.
 

Telos

Subscriber
2,641
853
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
If will be something along these lines:
This is the way... then as you add new VPN needs, you either add them to this stack, or create a similar stack with Gluetun/Container2 as you may want to use an alternate VPN location.

Also... substitute your current port/environmental variables for this stack. For example,
Code:
-e VPN_TYPE=wireguard \
-e WIREGUARD_PRIVATE_KEY=<<privatekey>> \
-e WIREGUARD_ADDRESSES="10.14.0.2/16" \
-e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun
 
I'm getting the following error when trying to deploy the stack of the docker compose code:

failed to deploy a stack: Network qbittorrentwg_default Creating Network qbittorrentwg_default Created Container gluten-wireguard Creating Container gluten-wireguard Created Container qbittorrent Creating Container qbittorrent Created Container gluten-wireguard Starting Container gluten-wireguard Started Container qbittorrent Starting Error response from daemon: cannot join network of a non running container: 848440b2a78b6cee91f824940dc6596d7db7685a028b5413089b568e90631474
 

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 getting the following error when trying to deploy the stack of the docker compose code:
It looks like the vpn container is not up and running as it should be, before the qbit container kicks in, so the network element of that container (that is the vpn contianer) is "missing" and not ready, hence the error.

Try and separate these 2 into 2 separate containers/stacks, and make a change in the qbit torrent one.

VPN compose
YAML:
version: "3.5"
services:
  vpn:
    image: qmcgaw/gluetun
    container_name: gluten-wireguard
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=nordVPNaccount
      - VPN_SERVICE_PROVIDER=surfshark
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=<<privatekey>>
      - WIREGUARD_ADDRESSES="10.14.0.2/16"
      - SERVER_COUNTRIES=Netherlands qmcgaw/gluetun
    ports:
      - 8088:8088
      - 6881:6881
      - 6881:6881/udp
    restart: always

Qbit compose (notice the network change in this case from "service" to "container"
YAML:
version: "3.5"
services:
  torrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: contianer:gluten-wireguard
    environment:
      - WEBUI_PORT=8088
      - PUID=1027
      - PGID=101
      - TZ=Europe/Amsterdam
    volumes:
      - /volume1/docker/qbittorrent:/config
      - /volume1/video/downloads:/video/downloads
    depends_on:
      - vpn
    restart: always

1st star the vpn one, and once you are certain it is running ok, run the qbit one. Give it a go.
 

Telos

Subscriber
2,641
853
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
Code:
devices:
      - /dev/net/tun:/dev/net/tun
Although this is not indicated for Surfshark:
 
I successfully added the vpn container, but when adding the qbittorrent container I get this error:

failed to deploy a stack: Container qbittorrent Creating Container qbittorrent Created Container qbittorrent Starting Error response from daemon: Container baba0d1a71740e7e7ff3c00abffc65414132b858b9925ac2a26c5a120934a2d4 is restarting, wait until the container is running
 

Telos

Subscriber
2,641
853
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
Be sure that the container name is unique. If you create a stack using an existing container name, it will fail.

Look in your list of containers to see if "qbittorrent" already exists. Either delete the existing container, or change the container name in the new stack you are deploying.
 

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
There is no other container with the same name, I tried running it again with a completely new name but that also gives the same error.
Container "baba0d1a71740e7e7ff3c00abffc65414132b858b9925ac2a26c5a120934a2d4 " is what exact container? Is is your qbit or the vpn one? The error is reporting that specific container is restarting, that would indicate that some container in questions is not running as it should.
 

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