I have two Plex servers: one on a VPS, and one on my home PC. They are both 3.67.1.
Today, I tried setting up Cloudflare in front of the VPS to improve the peering and stuttering. It worked so well that I decided to also do it for my home PC. However, try as I might, doing everything exactly the same as much as possible, I cannot get iOS and Android apps to see my home PC’s Plex server – although the web client works fine.
Here’s what I’ve done:
First, I created a subdomain pointing to my public home IP. On my home router, I forwarded the external port 2095 to the internal port 80, so that http://plex.example.com:2095 hits nginx. I told nginx to set the Host, X-Real-IP, X-Forwarded-For, and X-Forwarded-Proto headers, set the HTTP version to 1.1, and make the websocket upgrade. proxy_redirect and proxy_buffering got turned off, and then the location / was proxy-passed to http://127.0.0.1:32400. In Plex’s settings, I added http://plex.example.com:2095 as a custom URL, and I disabled remote access.
Result: requests to http://plex.example.com:2095 from over the internet correctly load my Plex web interface, and I can stream videos perfectly.
Problem: iOS and Android see the server as offline, unless they’re on the LAN with it.
What’s weird: this is step for step exactly what I did on my VPS – I’m using the exact same nginx config file, even, with only the server_name property changed – and the VPS works perfectly. iOS and Android apps will happily connect to it and the performance has drastically improved. But when I try it at home, nothing.
I’ve obviously missed something, misunderstood something, or screwed something up. But I’ve spent hours poring over it, Googling, tweaking, trying to guess at what it might have been. And I honestly have no idea, nothing stands out.
If anyone could suggest things for me to check I would really appreciate it.