Jellyfin Forum
SOLVED: Jellyfin & Caddy not working - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: SOLVED: Jellyfin & Caddy not working (/t-solved-jellyfin-caddy-not-working)



Jellyfin & Caddy not working - Ghostly_Ghost - 2025-03-11

So I have followed the instructions in this guide (https://forum.jellyfin.org/t-access-your-jellyfin-anywhere-with-caddy) to try to get Caddy working with my Jellyfin, but it's defeating me Slightly-frowning-face .

Current set up - Jellyfin 10.10.6 is installed on a Fujitsu Esprimo 556 running Ubuntu Mate.  Not using docker for JF.  I installed caddy and before I edited the caddyfile when I entered jellyfin.mydomain.net I got a page saying caddy was installed and working.  I altered the caddyfile and it's all gone pear-shaped and I'm tearing my hair out  Weary-face Weary-face

Here's the caddyfile contents:

Code:
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.

jellyfin.mydomain.net {
reverse_proxy 127.0.0.1:8096
}

# Set this path to your site's directory.
#root * /usr/share/caddy

# Enable the static file server.
#file_server

# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080

# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

When I try to access jellyfin.domain.tld I get this (screenshot from firefox)

Please help before I go around the twist!


RE: Jellyfin & Caddy not working - M0RPH3US - 2025-03-11

(Yesterday, 03:53 PM)Ghostly_Ghost Wrote: So I have followed the instructions in this guide (https://forum.jellyfin.org/t-access-your-jellyfin-anywhere-with-caddy) to try to get Caddy working with my Jellyfin, but it's defeating me Slightly-frowning-face .

Current set up - Jellyfin 10.10.6 is installed on a Fujitsu Esprimo 556 running Ubuntu Mate.  Not using docker for JF.  I installed caddy and before I edited the caddyfile when I entered jellyfin.mydomain.net I got a page saying caddy was installed and working.  I altered the caddyfile and it's all gone pear-shaped and I'm tearing my hair out  Weary-face Weary-face

Here's the caddyfile contents:

Code:
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.

Censored {
reverse_proxy 127.0.0.1:8096
}

# Set this path to your site's directory.
#root * /usr/share/caddy

# Enable the static file server.
#file_server

# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080

# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

When I try to access jellyfin.rexmax.net I get this (screenshot from firefox)

Please help before I go around the twist!

Not an answer but a word of caution. You should censor your domain name in both the caddy file and the screenshot.


Also, there is a } hanging at the bottom of the caddy file


RE: Jellyfin & Caddy not working - gccalvin - 2025-03-11

(Yesterday, 03:53 PM)Ghostly_Ghost Wrote: So I have followed the instructions in this guide (https://forum.jellyfin.org/t-access-your-jellyfin-anywhere-with-caddy) to try to get Caddy working with my Jellyfin, but it's defeating me Slightly-frowning-face .

Current set up - Jellyfin 10.10.6 is installed on a Fujitsu Esprimo 556 running Ubuntu Mate.  Not using docker for JF.  I installed caddy and before I edited the caddyfile when I entered jellyfin.mydomain.net I got a page saying caddy was installed and working.  I altered the caddyfile and it's all gone pear-shaped and I'm tearing my hair out  Weary-face Weary-face

Here's the caddyfile contents:

Code:
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.

jellyfin.mydomain.net {
reverse_proxy 127.0.0.1:8096
}

# Set this path to your site's directory.
#root * /usr/share/caddy

# Enable the static file server.
#file_server

# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080

# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

When I try to access jellyfin.mydomain.net I get this (screenshot from firefox)

Please help before I go around the twist!

Is 443 open on your server firewall?

You could try adding:
Code:
mydomain.net {
                respond "Caddy is working!"
}

Then navigate to https://mydomain.net and you should see a page with "Caddy is working!"


RE: Jellyfin & Caddy not working - TheDreadPirate - 2025-03-11

Ensure that UFW is enabled and that port 443 is open. Ensure that your server has a static IP assignment from your router. Ensure that port 443 in your router is forwarded to the server. Ensure that your domain name is pointed to your public IP.


RE: Jellyfin & Caddy not working - Ghostly_Ghost - 2025-03-11

Thanks guys - rather oddly it's all started working and I have absolutely zero idea how!? I had double checked the router firewall (correct ports open); UFW was disabled on my server for testing purposes (my initial troubleshooting), all DNS stuff was correct.

Was all this caused by that rogue } in the caddyfile?

Cheers fellas, that has been driving me dotty all day!