linuxserver / docker-pyload-ng

GNU General Public License v3.0
83 stars 10 forks source link

Change Port from 8000 #14

Closed typkrft closed 2 years ago

typkrft commented 2 years ago

linuxserver.io

The ability to change the port from 8000 if possible would be helpful.

Desired Behavior

It would be nice to use an ENV variable change the port from 8000. The reason is that I use gluetun as a vpn in front of various services. Gluetun already uses port 8000 as a api control port. So I can't forward this port, as far as I'm aware, in gluetun.

Current Behavior

NA

Alternatives Considered

NA

github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

goodygh commented 2 years ago

With docker this is already possible, for example like this

docker run -d \
  --name=pyload-ng \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 9000:8000 \
  -p 9666:9666 `#optional` \
  -v /path/to/appdata/config:/config \
  -v /path/to/downloads:/downloads \
  --restart unless-stopped \
  lscr.io/linuxserver/pyload-ng:latest
typkrft commented 2 years ago

I'm specifically talking about a scenario where you are using another container as a network service.

For example Gluetun is a VPN container. In order to use it you need to forward the other containers ports in Gluetun itself. This means I have to use pyload's port 8000.

EG:


services:
  gluetun:
    image: qmcgaw/gluetun
    restart: unless-stopped
    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
      - 8000:8000 # Pyload - Does not Work, beucase it's simply forwarding to HTTP Control port in gluetun
    volumes:
      - /docker_storage/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
      - DOT=off 
      # For Wireguard
      - VPN_ENDPOINT_IP=$END_POINT_IP
      - VPN_ENDPOINT_PORT=$END_POINT_PORT
      - WIREGUARD_PUBLIC_KEY=$PU_KEY
      - WIREGUARD_PRIVATE_KEY=$PI_KEY
      - WIREGUARD_ADDRESSES=$CIDR
      # Timezone for accurate log times
      - TZ=US/Eastern
    dns:
      - 1.1.1.1
      - 1.0.0.1

  pyload-ng:
    image: lscr.io/linuxserver/pyload-ng
    container_name: pyload-ng
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=US/Eastern
    volumes:
      - /docker_storage/pyload:/config
      - complete:/downloads/complete
      - incomplete:/downloads/incomplete
    # ports:
      # - 7011:8000 # Webinterface
      # - 7012:9666 # Click 'N' Load
    restart: unless-stopped 
    network_mode: "service:gluetun"
    depends_on: 
      - gluetun
gelaechter commented 2 years ago

You can change the web port in the pyload config. It is located at /config/settings/pyload.cfg, so in your case /docker_storage/pyload/settings/pyload.cfg. Change this line: int port : "Port" = 8000 in the webui block to whatever port you want pyload to use.

typkrft commented 2 years ago

Perfect I was looking for something like this in the payload docs but must have missed it.