Jellyfin Forum
Did Caddy change something? Can't access server remotely. - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Did Caddy change something? Can't access server remotely. (/t-did-caddy-change-something-can-t-access-server-remotely)

Pages: 1 2


Did Caddy change something? Can't access server remotely. - 4r5hw45twh - 2024-08-28

So, here is my setup:

I own a domain name. I have the A record pointing to a VPS public IP. From there, I have a Caddyfile that points to my home network's public IP. This always worked just fine on JF but now it isn't. On my domain name, I now get this: https://i.imgur.com/mhN8Z2O.png

It admittedly has been months since I tried to access remotely, and that's how I only just noticed it randomly stopped working. I am puzzled on how to fix this. I have quadruple-checked everything. My DNS record 100% points to the VPS' public IP. I have a Caddyfile at /home on the VPS and then one at /etc/caddy/Caddyfile. The one at /home is simply:
Code:
jellyfin.MY_DOMAIN_NAME.com

reverse_proxy HOME_NETWORK_PUBLIC_IP:8096



And the one at /etc is:
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.MY_DOMAIN_NAME.com {
# 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

Any help/ideas?


RE: Did Caddy change something? Can't access server remotely. - TheDreadPirate - 2024-08-28

Is Jellyfin running? Did your home IP change?


RE: Did Caddy change something? Can't access server remotely. - 4r5hw45twh - 2024-08-29

(2024-08-28, 11:31 PM)TheDreadPirate Wrote: Is Jellyfin running?  Did your home IP change?

Yes, it is running. No, IP is the same.


RE: Did Caddy change something? Can't access server remotely. - TheDreadPirate - 2024-08-29

So how does the caddy file in your home directory get used by Caddy? I don't see any reference to it in /etc/caddy/caddyfile.


RE: Did Caddy change something? Can't access server remotely. - 4r5hw45twh - 2024-08-29

(2024-08-29, 01:09 AM)TheDreadPirate Wrote: So how does the caddy file in your home directory get used by Caddy?  I don't see any reference to it in /etc/caddy/caddyfile.

I really don't remember - it just always worked. What should I do?


RE: Did Caddy change something? Can't access server remotely. - TheDreadPirate - 2024-08-29

Why have two caddy files anyway? Put the contents of the caddy file in your home directory in the caddyfile in /etc/caddy.


RE: Did Caddy change something? Can't access server remotely. - 4r5hw45twh - 2024-08-29

(2024-08-29, 02:21 AM)TheDreadPirate Wrote: Why have two caddy files anyway?  Put the contents of the caddy file in your home directory in the caddyfile in /etc/caddy.

So, copy-and-paste the contents of /home into /etc and then I can delete the /home one? Because I just did that when I reloaded Caddy then refreshed my domain URL, I am getting a blank page instead of that Caddy welcome page now.


RE: Did Caddy change something? Can't access server remotely. - TheDreadPirate - 2024-08-29

Did you replace all of the contents of the one in /etc/caddy? Or just put it at the bottom.

I just noticed this bit in the original version you posted (trimmed all the comments).

Code:
jellyfin.MY_DOMAIN_NAME.com {
# Set this path to your site's directory.
root * /usr/share/caddy
file_server
}



RE: Did Caddy change something? Can't access server remotely. - 4r5hw45twh - 2024-08-29

(2024-08-29, 11:55 PM)TheDreadPirate Wrote: Did you replace all of the contents of the one in /etc/caddy?  Or just put it at the bottom.

I just noticed this bit in the original version you posted (trimmed all the comments).

Code:
jellyfin.MY_DOMAIN_NAME.com {
# Set this path to your site's directory.
root * /usr/share/caddy
file_server
}

I just replaced all the contents. But tbh, I don't even know what all the stuff was in the /etc Caddyfile. Because I don't use a file manager or anything for my domain. I use it as my own e-mail domain, so the site doesn't actually have any content or anything like that - if you visit the direct base URL, it doesn't load anything. So, should I add what you just quoted back to the /etc file?


RE: Did Caddy change something? Can't access server remotely. - TheDreadPirate - 2024-08-30

Your caddyfile literally only needs two lines. Which you already had right.

Code:
jellyfin.MY_DOMAIN_NAME.com

reverse_proxy HOME_NETWORK_PUBLIC_IP:8096

If you made any changes you do need to restart Caddy if you haven't done that already.

https://jellyfin.org/docs/general/networking/caddy/#caddyfile

https://caddyserver.com/docs/conventions#file-locations