You might consider posting the entire compose file you pasted into the stack window, but do sanitize it to remove your VPN credentials.

Problems installing VPN container
-
-
Thanks for your answer, here it is. I have followed the guide but changed transmission to Qbittorretn.
Googling this error seems to indicate a problem with the kernel.
version: "3"
services:
vpn:
image: bubuntux/nordvpn
network_mode: bridge # Required
cap_add:
- NET_ADMIN # Required
- SYS_MODULE # Required for TECHNOLOGY=NordLynx
sysctls:
- net.ipv4.conf.all.rp_filter=2
devices:
- /dev/net/tun # Required
environment: # Review https://github.com/bubuntux/nordvpn#environment-variables
- USER=******* # Required
- "PASS=*******" # Required
- CONNECT=Sweden
- TECHNOLOGY=NordLynx
- CYBER_SEC=Enable
- NETWORK=192.168.*.*/24
- TZ=Europe/Stockholm
- GROUPID=100
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
torrent:
image: linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=1000
- PGID=100
- TZ=Europe/London
- UMASK_SET=022
- WEBUI_PORT=8080
volumes:
- /srv/dev-disk-by-label-Misc/appdata/qbittorrent:/config
- /srv/dev-disk-by-label-media/Downloads:/downloads
restart: unless-stopped
network_mode: service:vpn
depends_on:
- vpn
# The torrent service would be available at https://localhost:8080/ or anywhere inside the local network http://192.168.1.xxx:8080
-
Hi,
I'm trying this to get it to work, but no luck. Could you give us a how to? The link above is dead.
This is what my portainer web-edit looks like:
Code
Display Moreversion: "3" services: vpn: image: bubuntux/nordvpn network_mode: bridge cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.rp_filter=2 devices: - /dev/net/tun environment: - USER=blabla - PASS=blabla - PUID=998 - PGID=100 - WEBUI_PORT_ENV=8080 - INCOMING_PORT_ENV=8999 - VPN_ENABLED=yes - NAME_SERVERS=1.1.1.1 - CONNECT=Netherlands - TECHNOLOGY=NordLynx - NETWORK=192.168.1.0/24 ulimits: memlock: soft: -1 hard: -1 ports: - 8080:8080 torrent: image: linuxserver/qbittorrent container_name: qbittorrent environment: - PUID=998 - PGID=100 - TZ=Europe/Amsterdam - UMASK_SET=022 - WEBUI_PORT=8080 volumes: - /srv/dev-disk-by-id-md-name-openmediavault-DataRaid1/Configs/QBittorrentVPN:/config - /srv/dev-disk-by-id-md-name-openmediavault-DataRaid1/Torrent:/Torrent restart: unless-stopped network_mode: service:vpn depends_on: - vpn
Output error:
CodeDeployment error yaml.parser.ParserError: while parsing a block mapping in "/data/compose/12/docker-compose.yml", line 3, column 3 expected , but found '' in "/data/compose/12/docker-compose.yml", line 43, column 4
Any ideas?
-
-
Seems your indention is wrong.
Try it like this
Code
Display Moreversion: "3" services: vpn: image: bubuntux/nordvpn network_mode: bridge cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.rp_filter=2 devices: - /dev/net/tun environment: - USER=blabla - PASS=blabla - PUID=998 - PGID=100 - WEBUI_PORT_ENV=8080 - INCOMING_PORT_ENV=8999 - VPN_ENABLED=yes - NAME_SERVERS=1.1.1.1 - CONNECT=Netherlands - TECHNOLOGY=NordLynx - NETWORK=192.168.1.0/24 ulimits: memlock: soft: -1 hard: -1 ports: - 8080:8080 torrent: image: linuxserver/qbittorrent container_name: qbittorrent environment: - PUID=998 - PGID=100 - TZ=Europe/Amsterdam - UMASK_SET=022 - WEBUI_PORT=8080 volumes: - /srv/dev-disk-by-id-md-name-openmediavault-DataRaid1/Configs/QBittorrentVPN:/config - /srv/dev-disk-by-id-md-name-openmediavault-DataRaid1/Torrent:/Torrent restart: unless-stopped network_mode: service:vpn depends_on: - vpn
Portainer helps here a lot. It shows a small red dot with an x inside, if something is wrong.
-
Seems your indention is wrong.
Portainer helps here a lot. It shows a small red dot with an x inside, if something is wrong.
This is why I usually tell newbs wanting to try docker-compose, to start with Portainer and stacks. If there's a formatting error (as there often can be when copying/pasting from websites).. it will be pointed out and you won't be able to deploy if it isn't right..
U
-
Hi,
No red dot observed.. would have gotten my attention otherwise. Nevertheless will try your advice asap and post result.
Thank you
-
-
When you paste the lines in the Portainer webeditor, just scroll up/down with the arrow keys and, if there's any error with the idents, it will show on the left side of the lines.
Then, it's a matter of adding/deleting spaces from the lines (I really hate the webeditor, sorry,
)
-
Yess I see it now. thus far it is able to download torrents. I have not double checked if it is actually using the vpn. Download speeds are the same as with normal downloads. Must note that using nordlynx the download speed comes very close to normal speed. The bubuntux/nordvpn stack/container does take quite some time, keeps showing ''starting'' for a few minutes. After that ''healthy''. Having trouble copy/paste log here...
-
part of the log:
Code
Display More- - Status: Connected Current server: some server address here blabla nordvpn.com Country: Netherlands City: Amsterdam Your new IP: some ip address her blabla Current technology: NordLynx Uptime: 0 seconds raw: -P PREROUTING ACCEPT -P OUTPUT ACCEPT
And then some random numbers in groups at the end that keeps renewing. I guess those are the cyphers?
Oh for those who are wondering.. Over 50 MB/s download speeds
. Tested it with a ubuntu torrent.
-
-
Ok so downloading linux torrents is going fine. Every other genre does not start, from different trackers ofcourse. ''Stalled'' message is displayed in webgui. Any ideas?
Thank you.
-
Ok now I am able to download normally. What I did was:
- enable cybersec by adding - CYBER_SEC=Enable to the stack
- shutdown qbittorent manually in the webgui
- stop/start qbitorrent and qbittorrentlynx_vpn_1 containers
-update-
After some time being idle with no active torrent any newly added torrent would start 'stalled' right away. Needs restart of qbittorrent container. Gonna tinker some more....
-
Can't figure out what goes wrong. Can someone be of assistance please?
Much appreciated!
-
-
Can't figure out what goes wrong. Can someone be of assistance please?
Much appreciated!
Probably not the answer you're looking for, but maybe you can try it with an different vpn container (a quick test won't hurt).
I can recommend Gluetun. I use this for years now (with different vpn providers).
-
Thank you for your input. Currently I am messing around with a different qbittorrent image, ghcr.io/linuxserver/qbittorrent in a seperate stack with the following code added:
This will enable the torrent client to send and receive traffic through the vpn container according to this website:
https://jordanelver.co.uk/blog…through-a-vpn-connection/
Download en upload works this way now. No idea yet if the earlier problem persists. Will update post in a few hours.
-
Ok it works. Full download speed still and no 'stalled' problem after being idle for more than hour. Final solution:
Code
Display Moreversion: "3" services: vpn: image: bubuntux/nordvpn network_mode: bridge cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.rp_filter=2 devices: - /dev/net/tun environment: - USER=bla - PASS=bla - PUID=998 - PGID=100 - WEBUI_PORT_ENV=8080 - INCOMING_PORT_ENV=8999 - VPN_ENABLED=yes - NAME_SERVERS=1.1.1.1 - CONNECT=Netherlands - TECHNOLOGY=NordLynx - CYBER_SEC=Enable - NETWORK=192.168.1.0/24 ulimits: memlock: soft: -1 hard: -1
Code
Display Moreversion: "2.1" services: qbittorrent: image: ghcr.io/linuxserver/qbittorrent container_name: qbittorrent environment: - PUID=1001 - PGID=100 - TZ=Europe/Amsterdam - NET=CONTAINER:VPN - WEBUI_PORT=8080 volumes: - /srv/dev-disk-by-id-md-name-openmediavault-DataRaid1/Configs/QBittorrentVPNLynx:/config - /srv/dev-disk-by-id-md-name-openmediavault-DataRaid1/Torrent:/Torrent ports: - 6881:6881 - 6881:6881/udp - 8080:8080 restart: unless-stopped
Hope this is usefull for someone.
Greetings
-Update-
Forgot to add:
- NET=CONTAINER:VPN
-Update-
Changed PUID for security reasons mentioned by Soma and macom
-Update-
Still doesn't function properly. Still uses public ip.
-Update-
Have a solution that works for me, look on page 2.
-
-
I don't think Qbittorrent uses your vpn-tunnel this way.
-
-
- PUID=998
And you're using this user because....?!?
The policy for docker is to use a unprivileged user (eg: user 1000 UP, on RPi it would be the "pi") adding it to "docker" group
-
-
Used this tutorial in the past and it stuck with me (3 min mark):
https://dbtechreviews.com/2020…rent-on-openmediavault-5/
He uses the admin account.
-
He uses the admin account.
Yeah, that's a really good thing to do on a server...
Sorry, but that's a BIG RED FLAG
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!