Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set listen_addr of DHT in rqbit #276

Open
shirok1 opened this issue Nov 10, 2024 · 2 comments
Open

How to set listen_addr of DHT in rqbit #276

shirok1 opened this issue Nov 10, 2024 · 2 comments

Comments

@shirok1
Copy link

shirok1 commented Nov 10, 2024

I want to use port mapping to expose DHT in Docker

@shirok1
Copy link
Author

shirok1 commented Nov 10, 2024

My current workaround is to run it in host network mode, and change the listen addr so that only my Traefik reverse proxy in container can access.

services:
  rqbit:
    image: ikatson/rqbit
    network_mode: host
    # ports:
    #   - 3030:3030 # HTTP API port
    #   - 4240:4240 # TCP BitTorrent port
    environment:
      # Replace this with your LAN hostname or IP, resolvable from other devices in your LAN
      # RQBIT_UPNP_SERVER_ENABLE: "true"
      # RQBIT_UPNP_SERVER_FRIENDLY_NAME: rqbit-docker

      # Replace this if you want to change the HTTP/Web UI port
      RQBIT_HTTP_API_LISTEN_ADDR: 172.17.0.1:3030
    volumes:
      - db:/home/rqbit/db
      - cache:/home/rqbit/cache
      # Replace /tmp/scratch with your downloads folder
      - /xxx:/home/rqbit/downloads
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.rqbit.rule=Host(`rqbit.xxx`)"
      - "traefik.http.routers.rqbit.tls=true"
      - "traefik.http.services.rqbit.loadbalancer.server.port=3030"
      - "traefik.docker.network=traefik"
#     networks:
#       - traefik
# networks:
#   traefik:
#     external: true
volumes:
  db: {}
  cache: {}

@ikatson
Copy link
Owner

ikatson commented Nov 14, 2024

You can't at the moment, but it's an easy PR away - to set "dht_config.listen_addr" here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants