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

Why i got API Error in qbittorrent widget? #18

Closed
uebmaster opened this issue May 23, 2023 · 6 comments
Closed

Why i got API Error in qbittorrent widget? #18

uebmaster opened this issue May 23, 2023 · 6 comments
Labels
question Further information is requested

Comments

@uebmaster
Copy link

uebmaster commented May 23, 2023

image

Here is my docker compose file:

version: "3.9"
services:
  traefik:
    image: traefik:v2.9
    container_name: traefik
    restart: always
    environment:
      - CLOUDFLARE_EMAIL=${CLOUDFLARE_EMAIL}
      - CLOUDFLARE_DNS_API_TOKEN=${CLOUDFLARE_DNS_API_TOKEN}
      - CLOUDFLARE_ZONE_API_TOKEN=${CLOUDFLARE_ZONE_API_TOKEN}
      - LETS_ENCRYPT_EMAIL=${LETS_ENCRYPT_EMAIL}
    command:
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.web-secure.address=:443
      - --entrypoints.web.http.redirections.entryPoint.to=web-secure
      - --entrypoints.web.http.redirections.entryPoint.scheme=https
      - --entrypoints.web.http.redirections.entrypoint.permanent=true
    ports:
      - "8081:80"
      - "443:443"
    volumes:
      - ./letsencrypt:/letsencrypt
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
  sonarr:
    image: lscr.io/linuxserver/sonarr
    container_name: sonarr
    environment:
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
      - TZ=${TIMEZONE}
    volumes:
      - ./sonarr:/config
      - ${DATA_ROOT}:/data
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.sonarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/sonarr`))
      - traefik.http.routers.sonarr.tls=true
      - traefik.http.routers.sonarr.tls.certresolver=myresolver
      - traefik.http.services.sonarr.loadbalancer.server.port=8989
      - homepage.group=Media
      - homepage.name=Sonarr
      - homepage.icon=sonarr.png
      - homepage.href=/sonarr
      - homepage.description=Series management
      - homepage.weight=0
      - homepage.widget.type=sonarr
      - homepage.widget.url=http://sonarr:8989/sonarr
      - homepage.widget.key=${SONARR_API_KEY}
  radarr:
    image: lscr.io/linuxserver/radarr
    container_name: radarr
    environment:
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
      - TZ=${TIMEZONE}
    volumes:
      - ./radarr:/config
      - ${DATA_ROOT}:/data
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.radarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/radarr`))
      - traefik.http.routers.radarr.tls=true
      - traefik.http.routers.radarr.tls.certresolver=myresolver
      - traefik.http.services.radarr.loadbalancer.server.port=7878
      - homepage.group=Media
      - homepage.name=Radarr
      - homepage.icon=radarr.png
      - homepage.href=/radarr
      - homepage.description=Movies management
      - homepage.weight=1
      - homepage.widget.type=radarr
      - homepage.widget.url=http://radarr:7878/radarr
      - homepage.widget.key=${RADARR_API_KEY}
  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    container_name: prowlarr
    environment:
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
      - TZ=${TIMEZONE}
    volumes:
      - ./prowlarr:/config
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.prowlarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/prowlarr`))
      - traefik.http.routers.prowlarr.tls=true
      - traefik.http.routers.prowlarr.tls.certresolver=myresolver
      - traefik.http.services.prowlarr.loadbalancer.server.port=9696
      - homepage.group=Download
      - homepage.name=Prowlarr
      - homepage.icon=prowlarr.png
      - homepage.href=/prowlarr
      - homepage.description=Indexers management
      - homepage.weight=4
      - homepage.widget.type=prowlarr
      - homepage.widget.url=http://prowlarr:9696/prowlarr
      - homepage.widget.key=${PROWLARR_API_KEY}
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:libtorrentv1
    container_name: qbittorrent
    environment:
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
      - TZ=${TIMEZONE}
      - WEBUI_PORT=8080
    volumes:
      - ./qbittorrent:/config
      - ${DOWNLOAD_ROOT}:/data/torrents
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.qbittorrent.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/qbittorrent`))
      - traefik.http.routers.qbittorrent.tls=true
      - traefik.http.routers.qbittorrent.tls.certresolver=myresolver
      - traefik.http.services.qbittorrent.loadbalancer.server.port=8080
      - traefik.http.routers.qbittorrent.middlewares=qbittorrent-strip-slash,qbittorrent-stripprefix
      # https://github.com/qbittorrent/qBittorrent/issues/5693#issuecomment-552146296
      - traefik.http.middlewares.qbittorrent-stripprefix.stripPrefix.prefixes=/qbittorrent
      # https://community.traefik.io/t/middleware-to-add-the-if-needed/1895/19
      - traefik.http.middlewares.qbittorrent-strip-slash.redirectregex.regex=(^.*\/qbittorrent$$)
      - traefik.http.middlewares.qbittorrent-strip-slash.redirectregex.replacement=$$1/
      - traefik.http.middlewares.qbittorrent-strip-slash.redirectregex.permanent=false
      #- com.centurylinklabs.watchtower.depends-on=/vpn
      - homepage.group=Download
      - homepage.name=qBittorrent
      - homepage.icon=qbittorrent.png
      - homepage.href=/qbittorrent
      - homepage.description=Bittorrent client
      - homepage.weight=5
      - homepage.widget.type=qbittorrent
      - homepage.widget.url=http://qbittorrent:8080/qbittorrent      
      - homepage.widget.username=admin
      - homepage.widget.password=adminadmin
  jellyfin:
    image: lscr.io/linuxserver/jellyfin
    container_name: jellyfin
    environment:
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
      - TZ=${TIMEZONE}
      - JELLYFIN_PublishedServerUrl=${HOSTNAME}/jellyfin
    volumes:
      - ./jellyfin:/config
      - ${DATA_ROOT}:/data
    ports:
      - "7359:7359/udp"
      - "1900:1900/udp"
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.jellyfin.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/jellyfin`))
      - traefik.http.routers.jellyfin.tls=true
      - traefik.http.routers.jellyfin.tls.certresolver=myresolver
      - traefik.http.services.jellyfin.loadbalancer.server.port=8096
      - homepage.group=Media
      - homepage.name=Jellyfin
      - homepage.icon=jellyfin.png
      - homepage.href=/jellyfin
      - homepage.description=Media server
      - homepage.weight=3
      - homepage.widget.type=jellyfin
      - homepage.widget.url=http://jellyfin:8096/jellyfin
      - homepage.widget.key=${JELLYFIN_API_KEY}
  homepage:
    image: ghcr.io/benphelps/homepage:latest
    container_name: homepage
    environment:
      - HOMEPAGE_VAR_TITLE=${HOMEPAGE_VAR_TITLE}
      - HOMEPAGE_VAR_SEARCH_PROVIDER=${HOMEPAGE_VAR_SEARCH_PROVIDER}
      - HOMEPAGE_VAR_HEADER_STYLE=${HOMEPAGE_VAR_HEADER_STYLE}
      - HOMEPAGE_VAR_WEATHER_CITY=${HOMEPAGE_VAR_WEATHER_CITY}
      - HOMEPAGE_VAR_WEATHER_LAT=${HOMEPAGE_VAR_WEATHER_LAT}
      - HOMEPAGE_VAR_WEATHER_LONG=${HOMEPAGE_VAR_WEATHER_LONG}
      - HOMEPAGE_VAR_WEATHER_TIME=${TIMEZONE}
      - HOMEPAGE_VAR_WEATHER_UNIT=${HOMEPAGE_VAR_WEATHER_UNIT}
    volumes:
      - ./homepage:/app/config
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ${DATA_ROOT}:/data
    restart: always
    command: [sh, -c, "cp -n /app/config/tpl/*.yaml /app/config && node server.js"]
    labels:
      - traefik.enable=true
      - traefik.http.routers.homepage.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/`))
      - traefik.http.routers.homepage.tls=true
      - traefik.http.routers.homepage.tls.certresolver=myresolver
      - traefik.http.services.homepage.loadbalancer.server.port=3000
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    restart: always
    environment:
      - WATCHTOWER_CLEANUP=true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

networks:
default:
name: docker-compose-nas

Here my .env

COMPOSE_FILE=docker-compose.yml
COMPOSE_PATH_SEPARATOR=:
USER_ID=1000
GROUP_ID=1000
TIMEZONE=America/Mexico_City
DATA_ROOT=./data
DOWNLOAD_ROOT=./data/torrents
HOSTNAME=localhost
SONARR_API_KEY=...
RADARR_API_KEY=...
PROWLARR_API_KEY=...
JELLYFIN_API_KEY=...
HOMEPAGE_VAR_TITLE=Docker-Compose NAS
HOMEPAGE_VAR_SEARCH_PROVIDER=google
HOMEPAGE_VAR_HEADER_STYLE=boxed
HOMEPAGE_VAR_WEATHER_CITY=Mexico City
HOMEPAGE_VAR_WEATHER_LAT=19.4326
HOMEPAGE_VAR_WEATHER_LONG=-99.1332
HOMEPAGE_VAR_WEATHER_UNIT=metric
@uebmaster
Copy link
Author

uebmaster commented May 23, 2023

How can i add a jellyseerr container behind traefik?

i am doing this but doesn't work:

  jellyseerr:
    image: fallenbagel/jellyseerr:latest
    container_name: jellyseerr
    environment:
      - LOG_LEVEL=debug
      - TZ=${TIMEZONE}
    labels:
      - traefik.enable=true
      - traefik.http.routers.jellyseerr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/jellyseerr`))
      - traefik.http.routers.jellyseerr.tls=false
      - traefik.http.routers.jellyseerr.tls.certresolver=myresolver
      - traefik.http.services.jellyseerr.loadbalancer.server.port=5055
      - homepage.group=Media
      - homepage.name=jellyseerr
      - homepage.icon=jellyseerr.png
      - homepage.href=/jellyseerr
      - homepage.description=Media server request
      - homepage.weight=6
      - homepage.widget.type=jellyseerr
      - homepage.widget.url=http://jellyseerr:5055/jellyseerr
      - homepage.widget.key=${JELLYSEERR_API_KEY}
    volumes:
      - ./jellyseerr:/app/config
    restart: unless-stopped 

@AdrienPoupa
Copy link
Owner

Hi, I see that you replaced homepage.widget.url=http://vpn:8080 with homepage.widget.url=http://qbittorrent:8080/qbittorrent so it should work.

Since the user and passwords are hard coded, did you change them in the UI of qBittorrent? By defaut the user is admin, the password is adminadmin.

In qBittorrent Settings > Web UI, I have ticked Bypass authentication for clients on localhost and
Bypass authentication for clients in whitelisted IP subnets.

I also disabled Enable clickjacking protection and Enable Cross-Site Request Forgery (CSRF) protection.

Maybe stop and recreate all your services if this is still not working sudo docker compose down && sudo docker compose up -d

@uebmaster
Copy link
Author

it doesn't work :/

and i neither can make it work jellyseerr, i need to declare the port 5055 in the docker file to see the web interface, but when i try to configure radar and sonarr it can't reach the services.

Anyway thanks

@AdrienPoupa
Copy link
Owner

I just noticed you put the tls attribute of Jellyseer to false, but other than that it should work: it will be accessible at https://hostname/jellyseer.

If you want to set, say, the URL for Sonarr in Jellyseer it should be http://sonarr:8989/sonarr

Other than that, I am not sure what went wrong. Maybe you could check Docker logs.

@uebmaster
Copy link
Author

I figured that out afterwards too, but it didn't work anyway still changing to true.

and the truth is that I changed things and now I can't even connect to jellyfin from jellyseer haha.

I think I'll leave it alone for a while, the truth is that I usually use kodi, but this stack was interesting and striking.
Same and I'll try again later once you add the profile to run it locally.

Anyway thank you very much

@AdrienPoupa
Copy link
Owner

Sorry that did not work out, I have 2 setups and did not have any issue setting up Homepage and its associated services. Hopefully profiles will be better for you.

@AdrienPoupa AdrienPoupa added the question Further information is requested label May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants