Jellyfin Forum
Reverse proxy using Caddy questions - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Reverse proxy using Caddy questions (/t-reverse-proxy-using-caddy-questions)



Reverse proxy using Caddy questions - MarcosAquino - 2024-03-24

Hi all,

I am running Emby on my Mac M1 with caddy working perfectly for reverse proxy.

I installed Jellyfin on the same computer. I changed ports of emby to 8097 and kept Jellyfin's ports to default. 

I re-run caddy so I can access it using a hostname I purchased from noip and it still works fine. 

My question is, is it possible for caddy to do reverse proxy for both emby and jellyfin at the same time, using two different website from noip? I am just confused how it will work as I believe when I access the website provided by no-ip, it needed ports 443 and 80 to connect to the computer and then caddy forwards it to Emby's current port of 8097. 
I have tried to also configure caddy to do the same for Jellyfin using different hostname and port but it did not work. It seems like it can only do one? 

If that is the case, any idea how I can do reverse proxy for Jellyfin? Sorry if the question may sound stupid Slightly-frowning-face


RE: Reverse proxy using Caddy questions - conor - 2024-03-24

Use a subdomain for Jellyfin, as in jellyfin.example.com


RE: Reverse proxy using Caddy questions - MarcosAquino - 2024-03-24

I am sorry, what do you mean?


RE: Reverse proxy using Caddy questions - MarcosAquino - 2024-03-24

I created a caddyfile with these lines

jellyfin.domain.com {
reverse_proxy 127.0.0.1:8097
}

emby.domain.com {
reverse_proxy 127.0.0.1:8096
}

Only emby loads but not jellyfin. Any idea?
I used nslookup and both hostnames are working so it looks like it is with caddy when it does reverse proxy in the computer?


RE: Reverse proxy using Caddy questions - pxr5 - 2024-03-24

Not a stupid question at all. However, only the device that caddy runs on needs the ports 80 and 443 forwarding. Caddy itself handles everything else. Your caddyfile looks Ok, but try using the direct ip rather than 127.0.0.1. So for example 192.168.1.xx.

You said "I changed ports of Emby to 8097" but your caddy file has Jellyfin on 8097 and Emby on 8096.

I found sometimes when changing ports often that my router would get a bit messed up that only a reboot of the router would fix it.

I've certainly had 2 servers running on one device before with different ports that worked Ok with Caddy, one was Jellyfin the other Airsonic.