Hi, I am running Jellyfin for movies/series which is really great. Also jfa-go to manage accounts which is just as awesome.
All connected with Traefik is a dream, works like a charm.
Except password resetting...
You have to be on a local ip to change a password but I never am.
In the jfa-go wiki he describes how to set a rule with nginx:
location /Users/ForgotPassword {
proxy_pass http://<jellyfin address>/Users/ForgotPassword;
proxy_set_header X-Forwarded-For <any local ip address>;
}
location /Users/ForgotPassword/Pin {
proxy_pass http://<jellyfin address>/Users/ForgotPassword/Pin;
proxy_set_header X-Forwarded-For <any local ip address>;
}
I want to do exactly that in my Traefik configuration if that is possible but I am really struggling how to do that since I am very new to Traefik still.
Could somebody help maybe?
My docker-compose looks like this:
version: "3.8"
services:
jellyfin:
build:
context: ./jellyfin
dockerfile: Dockerfile
container_name: jellyfin
networks:
- proxy
ports: #could delete this but want to be able to reset passwords on local ip
- 8096:8096
volumes:
- ./Container-Daten/jellyfin/config:/config
- ./Container-Daten/jellyfin/cache:/cache
- ./Container-Daten/jellyfin/jellyfin-web:/jellyfin/jellyfin-web :ro
- /media/media:/media
restart: "unless-stopped"
# Optional - alternative address used for autodiscovery
environment:
- JELLYFIN_PublishedServerUrl=http://filme.secureserver.de
- NVIDIA_DRIVER_CAPABILITIES=all
- NVIDIA_VISIBLE_DEVICES=all
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
labels:
- "traefik.enable=true"
- com.centurylinklabs.watchtower.enable=false
- "traefik.http.routers.jellyfin.rule=Host(`filme.secureserver.de`)" #|| Host(`test.secureserver.de`)" #set url (cloud.example.com)
- "traefik.http.routers.jellyfin-secure.rule=Host(`filme.secureserver.de`)" #|| Host(`test.secureserver.de`)"
- "traefik.http.routers.jellyfin.entrypoints=http"
- "traefik.http.middlewares.jellyfin-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.jellyfin.middlewares=jellyfin-https-redirect"
- "traefik.http.routers.jellyfin-secure.entrypoints=https"
- "traefik.http.routers.jellyfin-secure.tls=true"
- "traefik.http.routers.jellyfin-secure.tls.certresolver=http"
- "traefik.http.routers.jellyfin-secure.service=jellyfin"
- "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
- "traefik.docker.network=proxy"
- "traefik.http.routers.jellyfin-secure.middlewares=secHeaders@file"
networks:
proxy:
external: true
My middleware secHeaders@file looks like this:
http:
middlewares:
secHeaders:
headers:
browserXssFilter: true
contentTypeNosniff: true
frameDeny: true
sslRedirect: true
#HSTS Configuration
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 31536000
customFrameOptionsValue: "SAMEORIGIN"