Closed rkabrick closed 1 year ago
Hello, I'm glad you like it! I would create a sabnzbd
folder and add the following service:
sabnzbd:
image: lscr.io/linuxserver/sabnzbd:latest
container_name: sabnzbd
environment:
- PUID=${USER_ID}
- PGID=${GROUP_ID}
- TZ=${TIMEZONE}
volumes:
- ./sabnzbd:/config
- ${DATA_ROOT}:/data
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.sabnzbd.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/sabnzbd`) || PathPrefix(`/sabnzbd`))
- traefik.http.routers.sabnzbd.tls=true
- traefik.http.routers.sabnzbd.tls.certresolver=myresolver
- traefik.http.services.sabnzbd.loadbalancer.server.port=8080
In Sabnzbd you will also need to set the url_base
param to /sabnzbd
. I haven't tried it, let me know if it works :)
Hey! So I used that service however I get "Bad Gateway" when I go to connect to nas.mydomain.com/sabnzbd
. Is this perhaps an issue with qbittorrent also using port 8080?
There is no option to change the web UI port in this image I'm afraid. But given it's not exposed to the host it should work. Did you change the url_base?
Unfortunately I did change the urlbase but to no avail...
When you refer to 'this image' do you mean qbit? When I've configured the two together (not using traefik) I've always had
ports:
- 8081:8081
and then left qbit as 8080.
Is this possible? If not, is it possible for me to spin up a second vm and connect it to the same domain? ie. having two ubuntu vms (currently only have one) and then have it still be resolvable from the same domain? This is something I'd like to do regardless of if I can work out sab on the same host for something like notifiarr.
When you refer to 'this image' do you mean qbit?
No, I meant sabnzbd. There is no way to change the port the container is using (8080). When using Traefik or any reverse proxy for that matter, you only need to expose the reverse proxy's port and not the proxified containers, so the mapping above should not be necessary.
What we could try to do is change qBittorrent's web UI port (given this one is configurable) and see if Sabnzbd is happier:
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:libtorrentv1
container_name: qbittorrent
environment:
- PUID=${USER_ID}
- PGID=${GROUP_ID}
- TZ=${TIMEZONE}
- WEBUI_PORT=8081 # I changed the port here
volumes:
- ./qbittorrent:/config
- ${DOWNLOAD_ROOT}:/data/torrents
restart: always
network_mode: "service:vpn"
depends_on:
- vpn
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
# I changed the port here
- traefik.http.services.qbittorrent.loadbalancer.server.port=8081
- 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
I tried the service configuration I pasted in the previous comment, I can access sabnzbd's wizard:
Also, checking sabnzbd.ini, I can see the url_base
parameter was already filled: url_base = /sabnzbd
.
Thus I'm not sure where the Bad Gateway is coming from, maybe check Traefik's logs?
For good measure, you could try to recreate the whole stack, including networks: docker compose down && docker compose up -d
I really appreciate your time. I was finally able to solve it by doing an rm -rf ./sabnzbd
. It must've been pulling some cached value or something... but once I deleted that and did docker compose down && docker compose up -d
it finally worked. Thank you!
That's great, thanks for testing. I'll add it as an optional service!
I was able to get this up and running , thanks.
I wanted to leave a comment to say that when the service first started, SABnzbd was reporting an unknown host error with a link to this page: https://sabnzbd.org/wiki/extra/hostname-check.html
To fix, I edited /sabnzbd/sabnzbd.ini
by adding my host value (nas.example.com
) to host_whitelist
. Be sure to use a comma separator if some other value is currently there and restart the container after the change.
Hey!
Love this repo... wondering how I would go about modifying it such that I have a sabnzbd container that can be resolved via 'nas.mydomain.com/sabnzbd'
Unsure which parts of the config need to change and how but would appreciate any guidance :)