PyLoad Through Gluetun does not work

Hello everybody,

I’m having a little trouble running another container through a container network.
I want to host a PyLoad Container but run all the traffic through another gluetun container. These are the composes I have:

This is my Gluetun Compose:

services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 8888:8888/tcp # HTTP proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
      - 9666:9666     # PyLoad Click'n'Load
      - 2003:8000     # PyLoad
    volumes:
      - ./config:/gluetun
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VPN_SERVICE_PROVIDER=airvpn
      - VPN_TYPE=wireguard
      - SERVER_COUNTRIES=Germany
      - WIREGUARD_PRIVATE_KEY=PRIVATE_KEY
      - WIREGUARD_PRESHARED_KEY=PRESHARED_KEY
      - WIREGUARD_PUBLIC_KEY=PUBLIC_KEY
      - WIREGUARD_ADDRESSES=IP/SUBNET
      - WIREGUARD_MTU=1320
      - FIREWALL_OUTBOUND_SUBNETS=172.16.1.0/24
      - UPDATER_PERIOD=24h
      - DNS_ADDRESS=1.1.1.1

And this is my PyLoad Compose:

services:
  pyload-ng:
    image: lscr.io/linuxserver/pyload-ng:latest
    container_name: pyload-ng
    network_mode: "container:gluetun"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - ./config:/config
      - /mnt/DDL/incomplete:/downloads
      - /mnt/DDL/complete:/complete
    restart: unless-stopped

When I try to open my PyLoad through my browser I get the message “Unauthorized”.
Through the logs I get this:

[2025-03-02 11:43:49]  INFO          pyload.webui  Starting webserver: http://0.0.0.0:8000
[2025-03-02 11:43:49]  DEBUG               pyload  *** pyLoad is up and running ***
[2025-03-02 11:43:49]  CRITICAL      pyload.webui  ** FATAL ERROR ** Could not start web server - Address Already in Use | Exiting pyLoad

I first thought this was a problem with the Container Config / Compose itself but I changed my PyLoad-NG to this:

services:
  pyload-ng:
    image: lscr.io/linuxserver/pyload-ng:latest
    container_name: pyload-ng
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - ./config:/config
      - /mnt/DDL/incomplete:/downloads
      - /mnt/DDL/complete:/complete
    ports:
      - 2003:8000
      - 9666:9666 #optional
    restart: unless-stopped

And after this I could open the PyLoad WebGUI.

[2025-03-02 11:45:46]  INFO          pyload.webui  Starting webserver: http://0.0.0.0:8000
[2025-03-02 11:45:46]  DEBUG               pyload  *** pyLoad is up and running ***
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
[ls.io-init] done.
[2025-03-02 11:45:51]  DEBUG               pyload  ADDON ClickNLoad: Backend found on http://127.0.0.1:8000
[2025-03-02 11:45:51]  INFO                pyload  ADDON ClickNLoad: Proxy listening on 0.0.0.0:9666

Has anyone an idea why I cannot connect to the WebGUI while the traffic is running through Gluetun and how to fix this?

This basically says that the port can not be bound, as it’s bound by another process.

I assume you have more than one container attached to the network namespace of your gluetan container. Most likely one of the other containers attached to gluetan’s network namespace already binds port 8080, if gluetun itself is not doing it already (I have no idea if it does, I am not using it).

I tried to check for Port 2003:

pi@Test-Server:/opt/PyLoad$ sudo netstat -tuln | grep :2003
tcp        0      0 0.0.0.0:2003            0.0.0.0:*               LISTEN     
tcp6       0      0 :::2003                 :::*                    LISTEN     
pi@Test-Server:/opt/PyLoad$ sudo lsof -i :2003
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 44306 root    7u  IPv4 115328      0t0  TCP *:2003 (LISTEN)
docker-pr 44313 root    7u  IPv6 115329      0t0  TCP *:2003 (LISTEN)

This is when only Gluetun is running.

May I ask what your last post is about?

The error does not take place at the host level. You need either need to check from inside the gluetan container, or a container that is attached to the gluetan container’s network namespace. If netstat is missing in the gluetan container, you can use netshoot and attach it to the gluetan conainer’s network namespace: https://github.com/nicolaka/netshoot?tab=readme-ov-file#netshoot-with-docker

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.