2023-08-16, 07:10 PM
Hello, i'd like some help with that issue that's been bothering me, i was never able to use jellyfin over my SWAG reverse proxy while everything else works, i'm in docker and am using the defaults for both SWAG and Jellyfin, got nothing in logs and it works fine while accessing from my public IP. Below is my docker composes and the Jellyfin subdomain config:
Code:
version: '3.5'
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
user: 1000:1000
network_mode: 'host'
group_add:
- "106"
volumes:
- /mnt/tank/Share/Apps/Jellyfin/config:/config
- /home/Jellyfin/cache:/cache
- /mnt/tank/Share/Plex/Films:/films:ro
- /mnt/tank/Share/Plex/Séries:/series:ro
- /mnt/tank/Share/Plex/4K/Films:/films4k:ro
- /mnt/tank/Share/Plex/4K/Séries:/series4k:ro
- /mnt/Animu/Organized:/organized:ro
- /mnt/Animu/Animus:/animu
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
restart: 'unless-stopped'
# Optional - alternative address used for autodiscovery
environment:
- JELLYFIN_PublishedServerUrl=https://jellyfin.chungusnas.duckdns.org
# Optional - may be necessary for docker healthcheck to pass if running in host network mode
Code:
version: "2.1"
services:
swag:
image: lscr.io/linuxserver/swag:latest
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Paris
- URL=chungusnas.duckdns.org
- VALIDATION=http
- SUBDOMAINS=www, #optional
- CERTPROVIDER= #optional
- DNSPLUGIN=duckdns #optional
- PROPAGATION= #optional
- EMAIL= #optional
- ONLY_SUBDOMAINS=false #optional
- EXTRA_DOMAINS= #optional
- STAGING=false #optional
volumes:
- /mnt/tank/Share/Apps/swag/config:/config
ports:
- 443:443
- 80:80 #optional
restart: unless-stopped
Code:
[color=#d4d4d4][font=Consolas, 'Courier New', monospace][color=#6a9955]## Version 2021/05/18[/color]
[color=#6a9955]# make sure that your dns has a cname set for jellyfin[/color]
[color=#6a9955]# if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is[/color]
[color=#6a9955]# if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app <containername>;"[/color]
[color=#6a9955]# or "set $upstream_app <HOSTIP>;" for host mode, HOSTIP being the IP address of jellyfin[/color]
[color=#6a9955]# in jellyfin settings, under "Advanced/Networking" change the public https port to 443, leave the local ports as is,[/color]
[color=#6a9955]# and set the "Secure connection mode" to "Handled by reverse proxy"[/color]
server {
listen 443 ssl[color=#6a9955];[/color]
listen [::]:443 ssl[color=#6a9955];[/color]
server_name jellyfin.*[color=#6a9955];[/color]
include /config/nginx/ssl.conf[color=#6a9955];[/color]
client_max_body_size 0[color=#6a9955];[/color]
location / {
include /config/nginx/proxy.conf[color=#6a9955];[/color]
include /config/nginx/resolver.conf[color=#6a9955];[/color]
set $upstream_app 192.168.1.40[color=#6a9955];[/color]
set $upstream_port 8096[color=#6a9955];[/color]
set $upstream_proto http[color=#6a9955];[/color]
proxy_pass $upstream_proto://$upstream_app:$upstream_port[color=#6a9955];[/color]
proxy_set_header Range $http_range[color=#6a9955];[/color]
proxy_set_header If-Range $http_if_range[color=#6a9955];[/color]
}
location ~ (/jellyfin)?/socket/ {
include /config/nginx/proxy.conf[color=#6a9955];[/color]
include /config/nginx/resolver.conf[color=#6a9955];[/color]
set $upstream_app 192.168.1.40[color=#6a9955];[/color]
set $upstream_port 8096[color=#6a9955];[/color]
set $upstream_proto http[color=#6a9955];[/color]
proxy_pass $upstream_proto://$upstream_app:$upstream_port[color=#6a9955];[/color]
}
}
[/font][/color]