[Support] binhex - DelugeVPN


8533 posts in this topic Last Reply

Recommended Posts

Hi Guys,

I just possibly found a fix for the:

"Unable to successfully download PIA json to generate token from URL 'https://10.0.0.1/authv3/generateToken"  Issue that multiple people reported above. 

aka: "DEBG 'start-script' stderr output: parse error: Invalid numeric literal at line 7, column 0"

 

My Solution: I set the container to "Privileged Mode" and it started working. 

Link to post
  • Replies 8.5k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

There has been an issue raised on GitHub related to tracker announce request IP leakage under certain circumstances, after careful review of iptables i have tightened up the rules to prevent this. A n

OK guys, multi remote endpoint support is now in for this image please pull down the new image (this change will be rolled out to all my vpn images shortly).   What this means is that the im

ok thats fine, so you are using privoxy in this case and NOT network binding multiple containers.   so good news, at long last i am able to replicate one of the issues here, so if i set sona

Posted Images

20 minutes ago, nikizm said:

Hi Guys,

I just possibly found a fix for the:

"Unable to successfully download PIA json to generate token from URL 'https://10.0.0.1/authv3/generateToken"  Issue that multiple people reported above. 

aka: "DEBG 'start-script' stderr output: parse error: Invalid numeric literal at line 7, column 0"

 

My Solution: I set the container to "Privileged Mode" and it started working. 

dont do this its a coincidence, pia is having intermittent issues on some of their endpoints, you just happened to catch pia endpoint working, nothing to do with privileged mode.

Link to post
On 4/12/2021 at 3:01 PM, Roudy said:

 

Deluge doesn't really keep track of files, it just downloads what is sent to it. You may want to look at whatever you have sending downloads to Deluge. It sounds like it is losing track of the file once it is complete and it is thinking it failed and reinitiates the download again.

I appreciate the offering of help but that's not quite how torrenting works with any client. However, I've moved to the Transmission docker, now everything works fine. 

Link to post
24 minutes ago, Keek Uras said:

I appreciate the offering of help but that's not quite how torrenting works with any client. However, I've moved to the Transmission docker, now everything works fine. 

 

Deluge doesn't just go find files to download. It is either sent to it or placed in a watch folder that it scans. I could be missing something from your vague initial request, but either way, glad you got everything working now.

Link to post

@binhex

According to the scripts included in PIAs documentation on manually getting a port, tokens should be generated by sending the POST request to https://privateinternetaccess.com/gtoken/generateToken, rather than 10.0.0.1. Would updating the arch-int-vpn layer to use that URL fix the issue people have been having today where certain PIA endpoints are not generating tokens?

 

Unfortunately I don't know enough about docker to figure out how to hijack & modify the vpn layer and test it myself.

Link to post
9 hours ago, mehappy said:

tokens should be generated by sending the POST request to https://privateinternetaccess.com/gtoken/generateToken, rather than 10.0.0.1.

the script does generate tokens from that host you are right, however a PIA developer in conversation when the NextGen stuff came out, said you can also hit 10.0.0.1, which is easier than a hostname which would require name resolution, so i dont believe this is the issue, and 10.0.0.1 has been working since NextGen was introduced (around a year ago).

 

Also note hitting 10.0.0.1 is only used for port forwarding, the scripts also generatetoken for wireguard, which is also failing intermittently, as shown here:-

https://forums.unraid.net/topic/44109-support-binhex-delugevpn/?do=findComment&comment=977872

 

i will try the official method of generating token, but i dont hold out much hope.

Link to post
14 hours ago, mehappy said:

@binhex

According to the scripts included in PIAs documentation on manually getting a port, tokens should be generated by sending the POST request to https://privateinternetaccess.com/gtoken/generateToken, rather than 10.0.0.1. Would updating the arch-int-vpn layer to use that URL fix the issue people have been having today where certain PIA endpoints are not generating tokens?

 

For me, this worked.  I tried numerous endpoints and it was completely intermittent weighted on the fails.  Once I made this change, I've restarted numerous times and it hasn't failed.

 

To modify how the docker does this, modify the /root/getvpnport.sh script.

  1. Click the delugevpn docker image, select >_ Console
  2. nano /root/getvpnport.sh
  3. Add the variable in get_incoming_port_nextgen():
    piaTokenUri="https://privateinternetaccess.com/gtoken/generateToken"
  4. Replace the line:
    token_json_response=$(curl --interface "${VPN_DEVICE_TYPE}" --silent --insecure -u "${VPN_USER}:${VPN_PASS}" "https://10.0.0.1/authv3/generateToken")

    with:

    token_json_response=$(curl --interface "${VPN_DEVICE_TYPE}" --silent --insecure -u "${VPN_USER}:${VPN_PASS}" ${piaTokenUri})

 

The top of the get_incoming_port_nextgen function with the changes:

Spoiler


# attempt to get incoming port (pia only)
function get_incoming_port_nextgen() {

	retry_count=12
	retry_wait_secs=10
	#piaTokenUri="https://10.0.0.1/authv3/generateToken"
	piaTokenUri="https://privateinternetaccess.com/gtoken/generateToken"

	while true; do

		# get vpn local ip (not used) and gateway ip
		source /root/getvpnip.sh

		while true; do

			if [ "${retry_count}" -eq "0" ]; then

				echo "[warn] Unable to download PIA json to generate token, exiting script..."
				trigger_failure ; return 1

			fi

			# get token json response AFTER vpn established
			# note binding to the vpn interface (using --interface flag for curl) is required
			# due to users potentially using the 10.x.x.x range for lan, causing failure
			token_json_response=$(curl --interface "${VPN_DEVICE_TYPE}" --silent --insecure -u "${VPN_USER}:${VPN_PASS}" ${piaTokenUri})

			if [ "$(echo "${token_json_response}" | jq -r '.status')" != "OK" ]; then

				echo "[warn] Unable to successfully download PIA json to generate token from URL '${piaTokenUri}'"
				echo "[info] ${retry_count} retries left"
				echo "[info] Retrying in ${retry_wait_secs} secs..."
				retry_count=$((retry_count-1))
				sleep "${retry_wait_secs}"s & wait $!

			else

				echo "[warn] Successfully downloaded PIA json to generate token from URL '${piaTokenUri}'"
				# reset retry count on successful step
				retry_count=12
				break

			fi

		done

 

 

Edited by UnRaid_JAS
Spoiler intro hidden.
Link to post

I have a weird issue that I don't know how to fix. For some reason I can't reach Deluge when connected remotely to my server over Wireguard. All other dockers work fine, and I know Deluge is running fine, but I just can't seem to reach the UI. Any idea how to troubleshoot this?

Link to post
42 minutes ago, UnRaid_JAS said:

For me, this worked.  I tried numerous endpoints and it was completely intermittent weighted on the fails.  Once I made this change, I've restarted numerous times and it hasn't failed.

yeah i too have been playing with the alternative way of generating a token and it does seem more stable, so i have made the change for both port assignment and also wireguard, as both require tokens and both are failing, one failing when connecting to 10.0.0.1 and the other failing when connecting to metadata server on certain endpoints, so it def still does look like a pia outage of some type here, but the alternative method of hitting https://privateinternetaccess.com/gtoken/generateToken, seems to be working ok so i have switched over to that, just generating a test image now...

 

edit - ok test went well, new prod image built, please pull down and try at your convenience.

Link to post
2 hours ago, binhex said:

yeah i too have been playing with the alternative way of generating a token and it does seem more stable, so i have made the change for both port assignment and also wireguard, as both require tokens and both are failing, one failing when connecting to 10.0.0.1 and the other failing when connecting to metadata server on certain endpoints, so it def still does look like a pia outage of some type here, but the alternative method of hitting https://privateinternetaccess.com/gtoken/generateToken, seems to be working ok so i have switched over to that, just generating a test image now...

 

edit - ok test went well, new prod image built, please pull down and try at your convenience.

Looks good so far! THANKS!

Link to post
3 hours ago, binhex said:

yeah i too have been playing with the alternative way of generating a token and it does seem more stable, so i have made the change for both port assignment and also wireguard, as both require tokens and both are failing, one failing when connecting to 10.0.0.1 and the other failing when connecting to metadata server on certain endpoints, so it def still does look like a pia outage of some type here, but the alternative method of hitting https://privateinternetaccess.com/gtoken/generateToken, seems to be working ok so i have switched over to that, just generating a test image now...

 

edit - ok test went well, new prod image built, please pull down and try at your convenience.

This build has appeared to clear up my issues, thanks!

Link to post
On 4/15/2021 at 9:22 AM, binhex said:

nothing to do with privileged mode.

 

Don't you needed privileged mode for Wireguard to function correctly? I've never been able to get it function properly without it. Just want to verify for everyone.

Edited by Roudy
Link to post
5 hours ago, Nimrad said:

I have a weird issue that I don't know how to fix. For some reason I can't reach Deluge when connected remotely to my server over Wireguard. All other dockers work fine, and I know Deluge is running fine, but I just can't seem to reach the UI. Any idea how to troubleshoot this?

Have you added your subnet under LAN_Network? Remember you're on a different network when connecting remotely over wireguard.

Link to post

a little bit of topic: 

I have my Sonarr, Jacket, and Radarr all going through delugevpn with no issues, using the new method.

but I have been trying to get my JDownloader to go through the delugeVPN, but to no joy as I am using the same procedure I used for the other dockers.

 

by placing the ports within deluge and adding the Extra Parameters but when I fire up the docker I am getting the ' New page can be found '

 

Link to post
3 hours ago, chris_netsmart said:

by placing the ports within deluge and adding the Extra Parameters but when I fire up the docker I am getting the ' New page can be found '

 

Is there anything in the JDownloader log about not starting? Can you show the docker settings?

Link to post
2 hours ago, Roudy said:

 

Is there anything in the JDownloader log about not starting? Can you show the docker settings?

I have gotten to start again, but uninstalling it and reinstalling it  but I am still now able to webGUI onto it

 

 

deluge settings

image.png.dc2b5c2c64fd1728af5bf970e457b93c.png

 

image.png.006db69844fda6ef5ab1fed07b2c0c70.png

 

 

jdownloader

settings

image.thumb.png.a0e752ba2d569e43a0350fe268edcb82.png

 

image.png.4102533528643534b662af8ad9c3d513.png

logs

 

Quote

ErrorWarningSystemArrayLogin


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-app-niceness.sh: executing...
[cont-init.d] 00-app-niceness.sh: exited 0.
[cont-init.d] 00-app-script.sh: executing...
[cont-init.d] 00-app-script.sh: exited 0.
[cont-init.d] 00-app-user-map.sh: executing...
[cont-init.d] 00-app-user-map.sh: exited 0.
[cont-init.d] 00-clean-logmonitor-states.sh: executing...
[cont-init.d] 00-clean-logmonitor-states.sh: exited 0.
[cont-init.d] 00-clean-tmp-dir.sh: executing...
[cont-init.d] 00-clean-tmp-dir.sh: exited 0.
[cont-init.d] 00-set-app-deps.sh: executing...
[cont-init.d] 00-set-app-deps.sh: exited 0.
[cont-init.d] 00-set-home.sh: executing...
[cont-init.d] 00-set-home.sh: exited 0.
[cont-init.d] 00-take-config-ownership.sh: executing...
[cont-init.d] 00-take-config-ownership.sh: exited 0.
[cont-init.d] 00-xdg-runtime-dir.sh: executing...
[cont-init.d] 00-xdg-runtime-dir.sh: exited 0.
[cont-init.d] 10-certs.sh: executing...
[cont-init.d] 10-certs.sh: exited 0.
[cont-init.d] 10-cjk-font.sh: executing...
[cont-init.d] 10-cjk-font.sh: exited 0.
[cont-init.d] 10-nginx.sh: executing...
[cont-init.d] 10-nginx.sh: exited 0.
[cont-init.d] 10-vnc-password.sh: executing...
[cont-init.d] 10-vnc-password.sh: exited 0.
[cont-init.d] 10-web-index.sh: executing...
[cont-init.d] 10-web-index.sh: exited 0.
[cont-init.d] jdownloader2.sh: executing...
[cont-init.d] jdownloader2.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] starting s6-fdholderd...
[services.d] starting certsmonitor...
[services.d] starting nginx...
[services.d] starting xvfb...
[nginx] starting...
[certsmonitor] disabling service: secure connection not enabled.
[xvfb] starting...
[services.d] starting logmonitor...
[services.d] starting statusmonitor...
[logmonitor] no file to monitor: disabling service...
[statusmonitor] no file to monitor: disabling service...
[services.d] starting openbox...
[openbox] starting...
[services.d] starting x11vnc...
[services.d] starting app...
[x11vnc] starting...
[app] starting JDownloader 2...
[services.d] done.
[jdsupervisor] JDownloader2 not started yet. Proceeding...
17/04/2021 18:57:18 passing arg to libvncserver: -rfbport
17/04/2021 18:57:18 passing arg to libvncserver: 5900
17/04/2021 18:57:18 passing arg to libvncserver: -rfbportv6
17/04/2021 18:57:18 passing arg to libvncserver: -1
17/04/2021 18:57:18 passing arg to libvncserver: -httpportv6
17/04/2021 18:57:18 passing arg to libvncserver: -1
17/04/2021 18:57:18 passing arg to libvncserver: -desktop
17/04/2021 18:57:18 passing arg to libvncserver: JDownloader 2
17/04/2021 18:57:18 x11vnc version: 0.9.14 lastmod: 2015-11-14 pid: 5128
17/04/2021 18:57:18 Using X display :0
17/04/2021 18:57:18 rootwin: 0x43 reswin: 0x200001 dpy: 0xe30fbb00
17/04/2021 18:57:18
17/04/2021 18:57:18 ------------------ USEFUL INFORMATION ------------------
17/04/2021 18:57:18 X DAMAGE available on display, using it for polling hints.
17/04/2021 18:57:18 To disable this behavior use: '-noxdamage'
17/04/2021 18:57:18
17/04/2021 18:57:18 Most compositing window managers like 'compiz' or 'beryl'
17/04/2021 18:57:18 cause X DAMAGE to fail, and so you may not see any screen
17/04/2021 18:57:18 updates via VNC. Either disable 'compiz' (recommended) or
17/04/2021 18:57:18 supply the x11vnc '-noxdamage' command line option.
17/04/2021 18:57:18 X COMPOSITE available on display, using it for window polling.
17/04/2021 18:57:18 To disable this behavior use: '-noxcomposite'
17/04/2021 18:57:18
17/04/2021 18:57:18 Wireframing: -wireframe mode is in effect for window moves.
17/04/2021 18:57:18 If this yields undesired behavior (poor response, painting
17/04/2021 18:57:18 errors, etc) it may be disabled:
17/04/2021 18:57:18 - use '-nowf' to disable wireframing completely.
17/04/2021 18:57:18 - use '-nowcr' to disable the Copy Rectangle after the
17/04/2021 18:57:18 moved window is released in the new position.
17/04/2021 18:57:18 Also see the -help entry for tuning parameters.
17/04/2021 18:57:18 You can press 3 Alt_L's (Left "Alt" key) in a row to
17/04/2021 18:57:18 repaint the screen, also see the -fixscreen option for
17/04/2021 18:57:18 periodic repaints.
17/04/2021 18:57:18 GrabServer control via XTEST.
17/04/2021 18:57:18
17/04/2021 18:57:18 Scroll Detection: -scrollcopyrect mode is in effect to
17/04/2021 18:57:18 use RECORD extension to try to detect scrolling windows
17/04/2021 18:57:18 (induced by either user keystroke or mouse input).
17/04/2021 18:57:18 If this yields undesired behavior (poor response, painting
17/04/2021 18:57:18 errors, etc) it may be disabled via: '-noscr'
17/04/2021 18:57:18 Also see the -help entry for tuning parameters.
17/04/2021 18:57:18 You can press 3 Alt_L's (Left "Alt" key) in a row to
17/04/2021 18:57:18 repaint the screen, also see the -fixscreen option for
17/04/2021 18:57:18 periodic repaints.
17/04/2021 18:57:18
17/04/2021 18:57:18 XKEYBOARD: number of keysyms per keycode 7 is greater
17/04/2021 18:57:18 than 4 and 51 keysyms are mapped above 4.
17/04/2021 18:57:18 Automatically switching to -xkb mode.
17/04/2021 18:57:18 If this makes the key mapping worse you can
17/04/2021 18:57:18 disable it with the "-noxkb" option.
17/04/2021 18:57:18 Also, remember "-remap DEAD" for accenting characters.
17/04/2021 18:57:18
17/04/2021 18:57:18 X FBPM extension not supported.
Xlib: extension "DPMS" missing on display ":0".
17/04/2021 18:57:18 X display is not capable of DPMS.
17/04/2021 18:57:18 --------------------------------------------------------
17/04/2021 18:57:18
17/04/2021 18:57:18 Default visual ID: 0x21
17/04/2021 18:57:18 Read initial data from X display into framebuffer.
17/04/2021 18:57:18 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
17/04/2021 18:57:18
17/04/2021 18:57:18 X display :0 is 32bpp depth=24 true color
17/04/2021 18:57:18
17/04/2021 18:57:18 Listening for VNC connections on TCP port 5900
17/04/2021 18:57:18
17/04/2021 18:57:18 Xinerama is present and active (e.g. multi-head).
17/04/2021 18:57:18 Xinerama: number of sub-screens: 1
17/04/2021 18:57:18 Xinerama: no blackouts needed (only one sub-screen)
17/04/2021 18:57:18
17/04/2021 18:57:18 fb read rate: 1577 MB/sec
17/04/2021 18:57:18 fast read: reset -wait ms to: 10
17/04/2021 18:57:18 fast read: reset -defer ms to: 10
17/04/2021 18:57:18 The X server says there are 10 mouse buttons.
17/04/2021 18:57:18 screen setup finished.
17/04/2021 18:57:18

The VNC desktop is: 1fbfa8272a95:0

0

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

17/04/2021 18:57:18 passing arg to libvncserver: -rfbport
17/04/2021 18:57:18 passing arg to libvncserver: 5900
17/04/2021 18:57:18 passing arg to libvncserver: -rfbportv6
17/04/2021 18:57:18 passing arg to libvncserver: -1
17/04/2021 18:57:18 passing arg to libvncserver: -httpportv6
17/04/2021 18:57:18 passing arg to libvncserver: -1
17/04/2021 18:57:18 passing arg to libvncserver: -desktop
17/04/2021 18:57:18 passing arg to libvncserver: JDownloader 2
17/04/2021 18:57:18 x11vnc version: 0.9.14 lastmod: 2015-11-14 pid: 5128
17/04/2021 18:57:18 Using X display :0
17/04/2021 18:57:18 rootwin: 0x43 reswin: 0x200001 dpy: 0xe30fbb00
17/04/2021 18:57:18
17/04/2021 18:57:18 ------------------ USEFUL INFORMATION ------------------
17/04/2021 18:57:18 X DAMAGE available on display, using it for polling hints.
17/04/2021 18:57:18 To disable this behavior use: '-noxdamage'
17/04/2021 18:57:18
17/04/2021 18:57:18 Most compositing window managers like 'compiz' or 'beryl'
17/04/2021 18:57:18 cause X DAMAGE to fail, and so you may not see any screen
17/04/2021 18:57:18 updates via VNC. Either disable 'compiz' (recommended) or
17/04/2021 18:57:18 supply the x11vnc '-noxdamage' command line option.
17/04/2021 18:57:18 X COMPOSITE available on display, using it for window polling.
17/04/2021 18:57:18 To disable this behavior use: '-noxcomposite'
17/04/2021 18:57:18
17/04/2021 18:57:18 Wireframing: -wireframe mode is in effect for window moves.
17/04/2021 18:57:18 If this yields undesired behavior (poor response, painting
17/04/2021 18:57:18 errors, etc) it may be disabled:
17/04/2021 18:57:18 - use '-nowf' to disable wireframing completely.
17/04/2021 18:57:18 - use '-nowcr' to disable the Copy Rectangle after the
17/04/2021 18:57:18 moved window is released in the new position.
17/04/2021 18:57:18 Also see the -help entry for tuning parameters.
17/04/2021 18:57:18 You can press 3 Alt_L's (Left "Alt" key) in a row to
17/04/2021 18:57:18 repaint the screen, also see the -fixscreen option for
17/04/2021 18:57:18 periodic repaints.
17/04/2021 18:57:18 GrabServer control via XTEST.
17/04/2021 18:57:18
17/04/2021 18:57:18 Scroll Detection: -scrollcopyrect mode is in effect to
17/04/2021 18:57:18 use RECORD extension to try to detect scrolling windows
17/04/2021 18:57:18 (induced by either user keystroke or mouse input).
17/04/2021 18:57:18 If this yields undesired behavior (poor response, painting
17/04/2021 18:57:18 errors, etc) it may be disabled via: '-noscr'
17/04/2021 18:57:18 Also see the -help entry for tuning parameters.
17/04/2021 18:57:18 You can press 3 Alt_L's (Left "Alt" key) in a row to
17/04/2021 18:57:18 repaint the screen, also see the -fixscreen option for
17/04/2021 18:57:18 periodic repaints.
17/04/2021 18:57:18
17/04/2021 18:57:18 XKEYBOARD: number of keysyms per keycode 7 is greater
17/04/2021 18:57:18 than 4 and 51 keysyms are mapped above 4.
17/04/2021 18:57:18 Automatically switching to -xkb mode.
17/04/2021 18:57:18 If this makes the key mapping worse you can
17/04/2021 18:57:18 disable it with the "-noxkb" option.
17/04/2021 18:57:18 Also, remember "-remap DEAD" for accenting characters.
17/04/2021 18:57:18
17/04/2021 18:57:18 X FBPM extension not supported.
Xlib: extension "DPMS" missing on display ":0".
17/04/2021 18:57:18 X display is not capable of DPMS.
17/04/2021 18:57:18 --------------------------------------------------------
17/04/2021 18:57:18
17/04/2021 18:57:18 Default visual ID: 0x21
17/04/2021 18:57:18 Read initial data from X display into framebuffer.
17/04/2021 18:57:18 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
17/04/2021 18:57:18
17/04/2021 18:57:18 X display :0 is 32bpp depth=24 true color
17/04/2021 18:57:18
17/04/2021 18:57:18 Listening for VNC connections on TCP port 5900
17/04/2021 18:57:18
17/04/2021 18:57:18 Xinerama is present and active (e.g. multi-head).
17/04/2021 18:57:18 Xinerama: number of sub-screens: 1
17/04/2021 18:57:18 Xinerama: no blackouts needed (only one sub-screen)
17/04/2021 18:57:18
17/04/2021 18:57:18 fb read rate: 1577 MB/sec
17/04/2021 18:57:18 fast read: reset -wait ms to: 10
17/04/2021 18:57:18 fast read: reset -defer ms to: 10
17/04/2021 18:57:18 The X server says there are 10 mouse buttons.
17/04/2021 18:57:18 screen setup finished.
17/04/2021 18:57:18

The VNC desktop is: 1fbfa8272a95:0

0

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

 

Link to post

Hello,
I am using Deluge VPN in Docker. It is configured to be connected to my CyberGhost VPN via OpenVPN with UDP. I don't know if my configuration is correct but here my Deluge doesn't want to download anything anymore, it starts at 50 kbps and ends at 0. I even tested with an official ubuntu torrent and I have 0 kbps. I just created a new deleted VPN account and recomposed my container and I have the same problem. I tested OpenVPN on my PC (Windows) and tried downloading the same torrent and it works fine.

 

Here my configuration on my docker-compose.yml :

 

  deluge:
    image: binhex/arch-delugevpn:latest
    container_name: deluge
    restart: unless-stopped
    networks:
      - ${NETWORK}
    cap_add:
      - NET_ADMIN
    ports:
      - 8112:8112
      - 8118:8118
      - 58846:58846
      - 58946:58946
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=Europe/Paris
      - VPN_ENABLED=true
      - VPN_PROV=CUSTOM
      - VPN_USER=${VPN_USER}
      - VPN_PASS=${VPN_PASS}
      - STRICT_PORT_FORWARD=yes
      - ENABLE_PRIVOXY=yes
      - LAN_NETWORK=${LAN_NETWORK}
      - 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
      - UMASK=000
      - DEBUG=true

 

Thank ! 

Edited by sebigeli
Link to post

Having used a few NGINX based reverse proxies, NGINX Proxy Manager is the best by far.

Its clean GUI allows for easier management of hosts and is better if your new to the platform.

However, since its based on GUI and not nitty gritty config files it can make getting troublesome dockers to work.

 

I struggled to get Deluge working and had little issues with the 10+ other dockers.

Now that I have it working I would like to share the solution.

 

NGINX Proxy Manager:

If you use the default location settings for most apps its will work fine but for Deluge you will get.

image.png.22fdb84520bc80d56ea3a471894afa72.png

 

Now you might be inclined to Google your way to the correct custom settings that you can input per location but it will be a long road to nowhere as your actually missing a needed configuration file.

This file is not included with NGINX PM and without it Deluge will not work.

To fix this follow the steps precisely:

 

1. Create a new location for Deluge. If you have one already, delete it and start new.

2. Set the following settings:

  • location: /deluge
  • scheme: http
  • forward hostname / IP: IP address to your docker + trailing slash i.e. 172.16.0.2/
  • forward port: 8112 (unless you have changed the default port)

You must have the trailing slash or it will not work.

You should avoid manually adjusting the .conf file in app folder because NGINX will replace that file if you modify locations via GUI.

 

3. Now we add the needed config file, I have attached this to the post. proxy-control.conf

Using UNRAID console with root access, copy the file to the app directory.

i.e. cp /location/proxy-control.conf <to the destination> /mnt/user/appdata/NginxProxyManager/nginx

Use ls /app/location to confirm its there.

 

4. Create a custom path to your location within docket template.

i.e.

image.png.a8301e802dd565fc023e1abaf67d950f.png

 

Or use the built in app location from template /config

 

5. Now we add the advance settings needed which includes injecting that config file.

In the deluge location click the cog icon to get to the advance settings.

 

This is the example settings provided by Deluge wiki:

proxy_pass http://localhost:8112/;

proxy_set_header X-Deluge-Base "/deluge/";

include proxy-control.conf;

add_header X-Frame-Options SAMEORIGIN;

 

However that's assumed for configuration based NGIX instances and PM is GUI based, we need to tweak it to:

proxy_set_header X-Deluge-Base "/deluge/";
include /docker/variable/path/proxy-control.conf;
add_header X-Frame-Options SAMEORIGIN;

 

Remember to change the "include /docker/variable/path/proxy-control.conf;" to your docker variable path

i.e. /config/nginx/proxy-control.conf;

Or using your custom set variable path

 

6. Click the save and we should be done.

NGINX does not inject config files until reboot so reboot the container.

Follow the logs and confirm there are no errors, if you encounter one it would will be an issue loading the config file and you will need to check the following to resolve:

  • Check your steps for something missed
  • Confirm your variable is working using the dockers console to list the file
  • Ensure the permissions are such the docker has access. i.e. 775

7. Now if you go to https://domain.com/deluge you should get to your docker.

 

Hope this helps 🙂

proxy-control.conf

Edited by ados
Errors
Link to post
2 hours ago, ados said:

Hope this helps 🙂

Nice write-up! I was struggling with this three weeks ago when starting with reverse proxy. In the end I went with swag and did the job understanding that route. But if I had this information then it could have been different. Maybe it should be copied to other places also?

Link to post

@tetrapod thanks for the support. It took a lot of hours but if it helps others that's the idea.

It has been posted to all three Deluge repositories and NGNX PM home too.

I looked at swag but seemed like more effort 'at the time' :P and I wasn't sure if it supported multi proxy hosts with different SSLs which I need.

Link to post

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.