Jellyfin Forum
Setup Reverse Proxy? - 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: Setup Reverse Proxy? (/t-setup-reverse-proxy)

Pages: 1 2


Setup Reverse Proxy? - 4r5hw45twh - 2024-04-05

How can I setup a reverse proxy with JF? I self-host it on Windows 10 when my PC boots. Some friends want access but I don't want to give my public IP to them. I own 2 domain names, can I use those? If so, how?


RE: Setup Reverse Proxy? - TheDreadPirate - 2024-04-05

Even if you use your domain, that domain will resolve to your IP. So if the goal is for these friends to not have your IP using a reverse proxy alone won't change that. Except if your friends don't know this fact.

If you truly want them to not know your home IP, you would need to rent a VPS and have that host your reverse proxy.

To answer your question, though, you would need to setup Caddy. Which we have docs for, linked below. There are other apps you could use like Nginx or Apache, but those are harder to configure. Caddy is simple to setup and can automate requesting certificates for easy HTTPS.

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

First you would need to update the DNS record for your domains to point to your public IP. Your domain registrar should have an interface in your control panel to set that up.


RE: Setup Reverse Proxy? - 4r5hw45twh - 2024-04-05

(2024-04-05, 03:58 PM)TheDreadPirate Wrote: If you truly want them to not know your home IP, you would need to rent a VPS and have that host your reverse proxy.
To answer your question, though, you would need to setup Caddy. 
First you would need to update the DNS record for your domains to point to your public IP. Your domain registrar should have an interface in your control panel to set that up.

Hi! So, I actually have 2 VPS'. But how would I link my local hard drive with all my media on it to the VPS if people connect to my VPS' public IP?

Actually just setup Caddy locally before reading this. I have server running and my A record pointed to my local public IP. When I visit the new subdomain I made, though, I get, "This site can't be reached." Am I supposed to see something here? My localhost Caddy config file is loaded on port 2019 fine, though. Just tested it on cellular and my domain name lets me into my server! Nice. But how do I make the VPS connect to my hard drive if I use the VPS?


RE: Setup Reverse Proxy? - TheDreadPirate - 2024-04-05

You would run the reverse proxy (caddy) on your VPS and have one of your domains point to the public IP for that VPS. You would configure Caddy to point to your home public IP (you would need to port forward port 8096). Optionally, you can setup a VPN to secure the reverse proxy/VPS <-> Jellyfin connection.

In this setup your friends only have the IP of your VPS.


RE: Setup Reverse Proxy? - Daemon - 2024-04-05

it would be quicker and easier to setup a tunnel on cloudflare i think


RE: Setup Reverse Proxy? - TheDreadPirate - 2024-04-05

(2024-04-05, 04:37 PM)Daemon Wrote: it would be quicker and easier to setup a tunnel on cloudflare i think

It is against their TOS to use a free tier cloudflare tunnel for video.


RE: Setup Reverse Proxy? - 4r5hw45twh - 2024-04-05

(2024-04-05, 04:36 PM)TheDreadPirate Wrote: You would run the reverse proxy (caddy) on your VPS and have one of your domains point to the public IP for that VPS. You would configure Caddy to point to your home public IP (you would need to port forward port 8096). Optionally, you can setup a VPN to secure the reverse proxy/VPS <-> Jellyfin connection.

In this setup your friends only have the IP of your VPS.

Hmmm. So, using FileZilla, I transferred my Caddyfile file from Windows to /home/ on my Ubuntu VPS. I than ran "caddy run" and I get:

[Image: tttt.png]


RE: Setup Reverse Proxy? - TheDreadPirate - 2024-04-05

You used "localhost" before when it was on the same machine. That is not going to work since it is not on the same machine anymore. You'd have to change it to use your public home IP or VPN IP, if you go that route.


RE: Setup Reverse Proxy? - 4r5hw45twh - 2024-04-05

(2024-04-05, 04:54 PM)TheDreadPirate Wrote: You used "localhost" before when it was on the same machine. That is not going to work since it is not on the same machine anymore. You'd have to change it to use your public home IP or VPN IP, if you go that route.

Ok, weird...I changed "localhost" in my config file, moved the new Caddyfile to my VPS, but getting error/info still when running the run command and it's still saying "localhost" on the info messages, even though I triple checked and it's not set to that anymore. Seems to be less errors/info, though?

[Image: rrrr.png]

So right now I have: A record pointing to public VPS IP. VPS Caddyfile pointing to my home public IP. 8096 port forwarded on home router (already was), which I know works because connecting to it with my home public IP was fine.


RE: Setup Reverse Proxy? - TheDreadPirate - 2024-04-05

That error message indicates you have another process that is listening on port 80 so Caddy isn't able to start. Do you have another web server running already?