Hello,
I have set up traefik as reverse proxy to my services. My ISP blocks port 80 and 443 so I use other ports as port forwarding. I have an ASUS router so I use ASUS DDNS as hostname for pointing to my services running on forwarded ports since I have dynamic WAN IP. ASUS has a built-in letsencrypt certresolver so I export those certs from my router to my docker host using a custom ssh-script.
my current setup is
https://xxxxxx.asuscomm.com:52800
> Plex
https://xxxxxx.asuscomm.com:52801
> qBittorrent web ui
https://xxxxxx.asuscomm.com:52802
> Radarr
https://xxxxxx.asuscomm.com:52801
> Sonarr
All this works as expected. But when I use https://EXTERNALIP:PORT
then it opens "404 page not found" with self signed traefik default certificate. I tried using sniStrict=true
, but now I was unable to reach my services at https://xxxxxx.asuscomm.com:PORT
, I got unrecongnized name error.
So my question is,
- Is there a way to redirect
https://EXTERNALIP:PORT
to point tohttps://xxxxxx.asuscomm.com:PORT
? (Eg.https://EXTERNALIP:52800
tohttps://xxxxxx.asuscomm.com:52800
OR - Is there any other way to make
sniStrict=true
work with my existing certs?
I am open to any suggestions for improvement pf my set up.
Regards
traefik docker-compse
version: '3.8'
services:
traefik:
image: traefik:v2.10
container_name: traefik
networks:
default:
ipv4_address: 10.0.0.100
environment:
TZ: Etc/UTC
labels:
- com.centurylinklabs.watchtower.enable=false
ports:
- 8080:8080 # (optional) expose the dashboard !don't use in production!
- 52800:52800
- 52801:52801
- 52802:52802
- 52803:52803
extra_hosts:
- host.docker.internal:172.17.0.1
volumes:
- /etc/traefik:/etc/traefik
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
networks:
default:
external: true
name: servarr
services docker-compose
version: '3.8'
services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
restart: unless-stopped
network_mode: host
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- VERSION=latest
labels:
- traefik.enable=true
- traefik.http.routers.plex.entrypoints=plex
- traefik.http.routers.plex.rule=Host(`xxxxxx.asuscomm.com`)
- traefik.http.routers.plex.tls=true
- traefik.http.services.plex.loadbalancer.server.port=32400
volumes:
- /mnt/hdd/docker/plex/config:/config
- /mnt/hdd/Media/data/:/data
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:libtorrentv1
container_name: qbittorrent
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- WEBUI_PORT=8112
ports:
- 52804:52804
labels:
- traefik.enable=true
- traefik.http.routers.qbit.entrypoints=qbit
- traefik.http.routers.qbit.rule=Host(`xxxxxx.asuscomm.com`)
- traefik.http.routers.qbit.tls=true
- traefik.http.services.qbit.loadbalancer.server.port=8112
volumes:
- /mnt/hdd/docker/qbittorrent/config:/config
- /mnt/hdd/Media/data:/data
networks:
default:
ipv4_address: 10.0.0.3
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
labels:
- traefik.enable=true
- traefik.http.routers.radarr.entrypoints=radarr
- traefik.http.routers.radarr.rule=Host(`xxxxxx.asuscomm.com`)
- traefik.http.routers.radarr.tls=true
- traefik.http.services.radarr.loadbalancer.server.port=7878
volumes:
- /mnt/hdd/docker/radarr/config:/config
- /mnt/hdd/Media/data:/data
networks:
default:
ipv4_address: 10.0.0.4
sonarr:
image: lscr.io/linuxserver/sonarr:develop
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
labels:
- traefik.enable=true
- traefik.http.routers.sonarr.entrypoints=sonarr
- traefik.http.routers.sonarr.rule=Host(`xxxxxx.asuscomm.com`)
- traefik.http.routers.sonarr.tls=true
- traefik.http.services.sonarr.loadbalancer.server.port=8989
volumes:
- /mnt/hdd/docker/sonarr/config:/config
- /mnt/hdd/Media/data:/data
networks:
default:
ipv4_address: 10.0.0.6
networks:
default:
external: true
name: servarr
traefik.yml
global:
checkNewVersion: true
sendAnonymousUsage: false # true by default
api:
dashboard: true # true by default
insecure: true # Don't do this in production!
entryPoints:
plex:
address: :52800
http:
redirections:
entryPoint:
to: plex
scheme: https
permanent: true
priority: 1
qbit:
address: :52801
http:
redirections:
entryPoint:
to: qbit
scheme: https
permanent: true
priority: 1
radarr:
address: :52802
http:
redirections:
entryPoint:
to: radarr
scheme: https
permanent: true
priority: 1
sonarr:
address: :52803
http:
redirections:
entryPoint:
to: sonarr
scheme: https
permanent: true
priority: 1
tls:
certificates:
- certFile: /etc/traefik/certs/xxxxxx.cert
keyFile: /etc/traefik/certs/xxxxxx.key
options:
default:
minVersion: VersionTLS12
# sniStrict: true
providers:
docker:
exposedByDefault: false
file:
directory: /etc/traefik
watch: true