Caddy doesn't seem to start/run or do secure connections

I see what you are saying, if I need to make it respond to internal DNS queries how do I do that?

Something isn’t right in your environment. According to your run of the dig command, the 192.168.1.1 server is available and reachable from the device where Caddy runs. However, it “is not reachable” when Caddy needs it. Moreover, the logs show reference to “72.65.247.150:8096”, even though the config shared here doesn’t have such site block. Can you double-check everything is in order? Are you on the right server/machine? Are the correct files placed where expected and have the right content?

1 Like

Thank you.
Let me explain my setup. I believe this is a ‘typical’ approach/configuration.
My ISP assigns my router 72.65.247.150 via DHCP
My router internal LAN is 192.168.1.1.
In my router I have configured a reserved address for my pi mediaserver to be 192.168.1.34. essentially making this address-machine binding static.
In my router I have created a port forwarding rule for 192.168.1.34, e.g tcp and udp traffic to 192.168.1.34:8096.
8096 is the port that jellyfin is connected to, jellyfin runs on 192.168.1.34.
I use noip web services in which I created a DNS host record that points a host name to a specific IPv4 address. (noip is essentially a DYNDNS workalike) In my case, the chosen domain name is mediaserver.stufftoread.com and the address redirected to is:72.65.247.150 (the address my isp assigned to my router)
Hopefully this answers where the 8096 comes from. If you look at the caddy file, the site block
for mediaserver.stufftoread.com does specify port 8096 so I am not sure why this is a mystery. This is my Caddyfile:

mediaserver.stufftoread.com {
    encode gzip
    reverse_proxy mediaserver.stufftoread.com:8096
}

Caddy and jellyfin reside and execute on the same machine, e.g. RPi4 running Pi OS.e.g. raspian/Debian.
There is one and only one Caddyfile on the machine and the logs indicate that it is correctly picked up and read, and that is the file I edit.
Does this help?

If jellyfin is on the same machine, then you should do reverse_proxy 127.0.0.1:8086. What you’re doing there is telling Caddy to proxy to 72.65.247.150 basically, which doesn’t make sense.

But that still doesn’t explain why Caddy isn’t able to resolve the DNS for Let’s Encrypt’s domain.

1 Like

Whoops, you are correct. Apologies, I copied the wrong screen. This IS my Caddyfile:

pi@raspberrypi:/etc/caddy $ cat Caddyfile
# The Caddyfile is an easy way to configure your Caddy web server.
mediaserver.stufftoread.com {
    encode gzip
    reverse_proxy 127.0.0.1:8096
}
# https://caddyserver.com/docs/caddyfile

Are you saying port 443 and/or 80 in your router are configured to port-forward to 8069?

If yes, then that’s part of the issue. Caddy should be the recipient of those requests.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.