VueTorrent / vuetorrent-backend

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

Backend and gluetun #12

Closed r0ckarong closed 5 months ago

r0ckarong commented 5 months ago

I've been trying to configure this on my Synology NAS to use the gluetun/qbittorrent stack with VueTorrent. Using the UI works fine but I can't figure out the configuration for my compose file to actually get the backend to work.

You can't specify the ports both in gluetun and the service definition for the backend. The backend is also hard coded (from what the Dockerfile looks to me) to use port 3000. This is already occupied by Grafana on my host (because it's their default port as well).

Can someone give me some pointers what I must do to correctly change the port that the backend listens to so something like 3034 and then I can bend gluetun to use that port. Right now I'm getting a conflict and honestly overriding my grafana port is more work than having the backend is worth.

Larsluph commented 5 months ago

If you're using docker, you can map the 3000 port of the container to any port you want on your host machine.

If not the PORT environment variable should do the trick.

r0ckarong commented 5 months ago

The mapping conflicts with the host environment so I'll try setting a different port with the environment variable. Thanks.

On Fri, May 3, 2024, 00:31 Rémi Marseault @.***> wrote:

If you're using docker, you can map the 3000 port of the container to any port you want on your host machine.

If not the PORT environment variable should do the trick.

— Reply to this email directly, view it on GitHub https://github.com/VueTorrent/vuetorrent-backend/issues/12#issuecomment-2091856020, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFRJXW2LRHPOMLHGA4HQGLZAK5CLAVCNFSM6AAAAABHEJG5WGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRHA2TMMBSGA . You are receiving this because you authored the thread.Message ID: @.***>

Larsluph commented 5 months ago

You can use docker to map the port to a different port on your host to solve that instead of the variable.

ports:
   - "3034:3000"
r0ckarong commented 5 months ago

This doesn't work in conjunction with gluetun. When I try I get an error preventing the container from starting.

On Fri, May 3, 2024, 11:16 Rémi Marseault @.***> wrote:

You can use docker to map the port to a different port on your host to solve that instead of the variable.

ports:

  • "3034:3000"

— Reply to this email directly, view it on GitHub https://github.com/VueTorrent/vuetorrent-backend/issues/12#issuecomment-2092620133, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFRJXSACTR7Q2TRUZIQUADZANIXNAVCNFSM6AAAAABHEJG5WGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSGYZDAMJTGM . You are receiving this because you authored the thread.Message ID: @.***>

r0ckarong commented 5 months ago

I still can't figure this out. I have tried all permutations that I can think of that involve the gluetun port definitions, the actual port used by the backend container and the mappings.

I can get all containers to come up fine, backend using PORT=3034 and gluetun defined a 3034:3034 mapping. When I access the localhost of my NAS:3034/ping I get the expected pong as an answer. But whatever I enter in the VueTorrent settings I always get the "backend is unreachable".

None of these work: localhost:3034 host.docker.internal:3034 172.23.0.1:3034 (stack network) 172.23.0.3:3034 (specific container IP)

Anyone got an idea what the hell I'm missing here? The container is up and running on the correct port, accessible via browser but not from qBitTorrent running in the same Docker network? I don't get it.

Larsluph commented 5 months ago

The backend URL is the one you use to access it from outside the container.

If your NAS is reachable at the address 192.168.1.99, then you should input http://192.168.1.199:3034 into the backend field.

The backend should be accessible from outside your container and shouldn't be part of your VPN killswitch.

r0ckarong commented 5 months ago

OMG, thanks. This works. Never even thought about using the LAN IP here ...