Securing your Jellyfin install (https) with Caddy Server

#1

Disclaimer:
I can’t say I’m an authority on this but I thought I’d share my setup for securing Jellyfin through Caddy Server. Please review every single thing I’ve posted before using it and read up on the finer details on the Caddy website.

This is assuming you have a Windows install.

  • Create an account with a DNS service. I use DuckDNS myself.

  • Open ports 80 & 443 (required to generate the SSL certs) on your router/firewall.

  • Untick the Enable automatic port mapping option within Jellyfin > Settings > Advanced

  • ensure you have a strong password set within Jellyfin

  • Close port 8096 or whatever port you use to access Jellyfin on your router/firewall.

  • Download and install (to C:\caddy) Caddy Server - https://caddyserver.com/

  • Create a file called Caddyfile (no file extension) within the installation folder. The Caddyfile can reside anywhere but for ease of use it’s best to leave it within the installation folder for now.

Now open the Caddyfile in your favourite text editor and input the following:

yourdomain.duckdns.org {            # your DNS address
     root c:\caddy                  # root of your install
     basicauth / user password      # user/pass authorisation
}

jellyfin.yourdomain.duckdns.org {   # the domain used to access jellyfin
    proxy / localhost:8096 {        # the location of your install
	
		transparent         # shorthand for passthru info, details on caddy site
	}
	
}

Now open an elevated command prompt and do:

cd c:\caddy
caddy

The output below should now be shown.

Activating privacy features... done.
http://yourdomain.duckdns.org
https://yourdomain.duckdns.org
http://jellyfin.yourdomain.duckdns.org
https://jellyfin.yourdomain.duckdns.org

And you’re good to go.

1 Like
#2

Big thanks to you TravisBickle, reverse proxy now works with your help.
Did Nginix, Apache, and ended up with Caddy for reverse proxy.

Thanks again! :wink:

1 Like
#3

Excellent. I wasn’t sure if I’d left something out. For the simple setup I have Caddy is more than enough.

1 Like