This is my caddy configuration for a jellyfin reverse proxy, my local network is 192.168.131.0 and jellyfin runs on another computer (192.168.131.121). If you are running jellyfin on the same PC as caddy then you could reverse proxy 127.0.0.1:8096:
jellyfin.mysubdomain.duckdns.org {
tls myemail@gmail.com
encode gzip
@external {
not remote_ip 192.168.131.0/24
}
log {
output file /var/log/caddy/jellyfin.log {
roll true # Rotate logs, enabled by default
roll_size_mb 5 # Set max size 5 MB
roll_gzip true # Whether to compress rolled files
roll_local_time true # Use localhost time
roll_keep 2 # Keep at most 2 log files
roll_keep_days 7 # Keep log files for 7 days
level error
}
}
reverse_proxy 192.168.131.121:8096
}