Cannot get caddy working at all, no conections go through - 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: Cannot get caddy working at all, no conections go through (/t-cannot-get-caddy-working-at-all-no-conections-go-through) Pages:
1
2
|
Cannot get caddy working at all, no conections go through - aeternalis - 2024-11-22 Hello. I gotta say that I'm very new to anything networking. it's possible I am missing something very obvious. I've tried a few tutorials and can't seem to find a solution that actually works. My setup is an entire machine dedicated to running the jellyfin server directly plugged into my home network running Ubuntu Server headless. I use SSH to connect to it and do configuration. When outside the network, I connect to jellyfin by using my public IP with port 8096. I'm trying to set up a reverse proxy so that the connections are over https and so that I can just point my device to a URL instead of an IP address if I'm using my server outside of home. I've purchased a domain off namecheap and am trying to use cloudflare as my dns. On cloudflare, I have my "A" dns record set up to point to "jellyfin.domain.com" and pointed that to the machine's public IP. I cannot attempt to point it to the 8096 port, as cloudflare just complains that it's not a valid IPv4 address. My caddyfile is set up as below: Code: (my domain) { This is the only uncommented portion of my caddyfile. I've tried different variations of this, including: 1. Replacing just domain.com in the "my domain" field with jellyfin.mydomain.com. 2. Replacing "machine's local IP:8096 to localhost, localhost:8096, the public IP with and without port. No combinations have resulted in success. I left this issue for a couple weeks but coming back to it, I'm having the same issues after about an hour of troubleshooting on top of the time before today. I have verified that the caddy service is running on the machine. I've googled a good bit, and nothing I can find seems to work either or offer troubleshooting steps. Many thanks for help. RE: Cannot get caddy working at all, no conections go through - TheDreadPirate - 2024-11-22 In cloudflare, you do not include the port for the A record. Just the IP. Also make sure you are set for "DNS Only". On your server, did you open ports 443 and 80? Code: sudo ufw status RE: Cannot get caddy working at all, no conections go through - aeternalis - 2024-11-22 I have it set to DNS only, though I have tried both methods. I saw that you told someone else on this forum to set to DNS only. I opened 443 and 80 on my router. ufw status returns as "inactive". RE: Cannot get caddy working at all, no conections go through - TheDreadPirate - 2024-11-22 UFW is a firewall frontend. It is not the firewall itself. UFW being inactive just means that any rules added in it are not applied to the actual firewall. Code: sudo ufw enable RE: Cannot get caddy working at all, no conections go through - aeternalis - 2024-11-22 Done, still not able to access the server through the domain though. Outside connections and local connections seem to work as expected though. RE: Cannot get caddy working at all, no conections go through - TheDreadPirate - 2024-11-22 Is caddy running? Code: sudo systemctl status caddy RE: Cannot get caddy working at all, no conections go through - aeternalis - 2024-11-22 Yes, but there seems to be errors about it not finding A records on my domain. I get something like this from journalctl: Code: Nov 22 20:07:27 jellyfin-server caddy[2653]: {"level":"info","ts":1732306047.0105007,"logger":"tls.obtain","msg":"obtaining certificate","identifier":"MYDOMAIN.COM"} I replaced my domain with "MYDOMAIN.COM". RE: Cannot get caddy working at all, no conections go through - TheDreadPirate - 2024-11-22 Ok. Backed tracked a bit and realized something. You need to setup your A record to be domain.com. THEN you create a CNAME that points to domain.com for your subdomain. jellyfin.domain.com. domain.com ---> A Record jellyfin.domain.com ---> CNAME ---> domain.com RE: Cannot get caddy working at all, no conections go through - aeternalis - 2024-11-22 That worked, but partially. Unless the app you're using automatically tries variations of the target (like adding prefixes like http and the port to attempt a connection) it works, but video is still http only. When attempting to visit it through a web browser, I get SSL_ERROR_INTERNAL_ERROR_ALERT. If it's a browser or an app that doesn't automatically try new things, you must specify http and the 8096 port. If that falls outside of the purview of this forum, thanks in advance for your great help. RE: Cannot get caddy working at all, no conections go through - TheDreadPirate - 2024-11-22 Most of our apps will cycle through various port and protocol combinations if the provided URL doesn't work. http+8096 http+80 https+8920 https+443 "https://jellyfin.domain.tld", with no port specified, should first try port 443, the default https port that caddy should be listening on, before trying 8920. "http://jellyfin.domain.tld" should try port 80 first before trying port 80. And, no, browsers do not try other ports. That would be a security issue. The error you are getting SOUNDS like you are typing in "https://jellyfin.domain.tld:8096". Don't do that. Just type in "https://jellyfin.domain.tld". Caddy handles forwarding it to port 8096 internally. |