VueTorrent / vuetorrent-backend

Simple backend service to store configuration server-side
GNU General Public License v3.0
10 stars 3 forks source link

[REQUEST] Provide a Docker Compose example with Gluetun #44

Closed seth100 closed 1 month ago

seth100 commented 1 month ago

Hi,

I use Gluetun and I was not able to configure correctly the backend with my existing Gluetu + qBittorrent stack configuration, could you please update the Wiki providing a working example?

Thanks

Larsluph commented 1 month ago

I don't use gluetun. Please provide your old and new configuration so that I can assist you in the migration process.

seth100 commented 1 month ago

E.g.

services:
  gluetun:
    image: qmcgaw/gluetun:v3
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
      - VPN_ENDPOINT_IP=
      - VPN_ENDPOINT_PORT=
      - VPN_DNS_ADDRESS=
      - WIREGUARD_PRIVATE_KEY=
      - WIREGUARD_PUBLIC_KEY=
      - WIREGUARD_ADDRESSES=
      - VPN_PORT_FORWARDING=on
      - VPN_PORT_FORWARDING_PROVIDER=
      - HTTP_CONTROL_SERVER_ADDRESS=:8123
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - /data/gluetun:/gluetun
    ports:
      - 8033:8123/tcp # Gluetun API
      # - 8225:8225 # qbittorrent
      - 8226:3001 # vuetorrent-backend
    restart: unless-stopped

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
      - WEBUI_PORT=8225
    volumes:
      - /data/qbittorrent/config:/config
      - /downloads:/downloads
      # - /data/qbittorrent/themes:/themes
    restart: unless-stopped
    network_mode: 'service:gluetun'

  vuetorrent-backend:
    image: ghcr.io/vuetorrent/vuetorrent-backend:latest
    container_name: vuetorrent-backend
    environment:
      - CONFIG_PATH=/config
      - PORT=3001
      - QBIT_BASE=http://qbittorrent:8225
      - VUETORRENT_PATH=/vuetorrent
    volumes:
      - '/data/qbittorrent/themes/vuetorrent/vuetorrent-backend/config:/config'
      - '/data/qbittorrent/themes/vuetorrent/theme:/vuetorrent'
    restart: unless-stopped
    network_mode: 'service:gluetun'

when running http://localhost:8226 I try to login and I get Unable to find vuetorrent installation, please make sure it is accessible at /vuetorrent/public

Larsluph commented 1 month ago

This looks like the same as #42, I just pushed a fix, try again with 2.0.2

seth100 commented 1 month ago

This looks like the same as #42, I just pushed a fix, try again with 2.0.2

it works now thanks, but then I had to make some more changes:

gluetun:
    ...
    ports:
      - 8033:8123/tcp # Gluetun API
      - 8226:3000 # vuetorrent-backend

vuetorrent-backend:
    ...
    environment:
      - QBIT_BASE=http://localhost:8225
      - CONFIG_PATH=/config
      - VUETORRENT_PATH=/vuetorrent

to fix other issues and now I get Login failed! Error code: 401 (Unauthorized) that I cannot understand:

Larsluph commented 1 month ago

Because you're not using the same port for qbittorrent and the backend, it's the "host header validation" error mentioned in the wiki.

seth100 commented 1 month ago

if I use the same port I get this from qbittorrent container:

Connection to localhost (::1) 8225 port [tcp/*] succeeded!
WebUI will be started shortly after internal preparations. Please wait...
"WebUI: Unable to bind to IP: *, port: 8225. Reason: The bound address is already in use"
Larsluph commented 1 month ago

That's because you're binding both container to gluetun. The only way to make it work is to disable host header validation in the qbittorrent webui settings. That way you can use different ports for qbit and the backend.

seth100 commented 1 month ago

thanks, it works now