My server works on app.plex.tv but not iOS/Android

I’m trying to put my server behind Cloudflare using a reverse proxy, rather than the Remote Access feature directly, similarly to this.

I have a domain pointed at my server’s IP. On my server, nginx listens at port 80 and proxies to Plex at port 32400. Plex has the custom server URL specified. This is my nginx config, obviously using my actual domain instead of myplexdomain.com:

upstream plex_backend {
    server 127.0.0.1:32400;
    keepalive 32;
}

server {
        listen 80 ;
        server_name myplexdomain.com;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_redirect off;
        proxy_buffering off;
        location / {
                proxy_pass http://plex_backend;
        }
}
~

Remote Access is then disabled, per the guide mentioned.

With this setup, I can access my Plex server’s web interface using my domain name and an outside connection (so it’s not over LAN). I can also log into https://app.plex.tv, see my server there, and stream everything just fine. It’s all going over Cloudflare and the performance and buffering is greatly improved compared to before.

However, my iOS and Android apps do not see the server at all. If I install the apps using my phone’s connection, the server just isn’t there. If I connect to my LAN, the server becomes visible and streams fine, but when I disconnect, it goes offline. (Not ‘unreachable’ or anything else, the label is actually Offline.)

I’ve done this setup before on other machines and it was successful, so I’m not sure what’s going wrong here specifically. I also can’t find any way to get useful error messages out of the app, and the server log displays nothing at all. The one thing I’m not sure about is what ports I’d need to forward for a configuration like this; I’ve experimented with only 80 for nginx, with outright blocking 32400 on the server’s machine to make sure it has to go over 80, with forwarding 32400 through, with re-enabling the Remote Access option. Nothing seems to work.

What can I try next? Thanks to anyone who can offer a tip regarding something I’m missing here.

Check what connections Plex sees as available for your server:
#1
Find a Plex authentication token by following https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

#2
Go to https://plex.tv/api/resources?includeHttps=1&includeRelay=1&X-Plex-Token=xxxxxxxxxx

#3
Check the connection items listed under your server.

<Device name=“[server name]” product=“Plex Media Server” […]>
<Connection […]/>
</Device>

What does that show?

A personal note: I would not run PMS remote access over http. For me, any remote access has to use https.

Thanks for the reply. Under the device info for my server, there are two Connections (using “XXXX” to hide info):

<Device name="Pineapple Grove 2.0"
        product="Plex Media Server"
        productVersion="1.13.8.5395-10d48da0d"
        platform="Windows"
        platformVersion="10.0 (Build 17134)"
        device="PC"
        clientIdentifier="XXXX"
        createdAt="1539503616"
        lastSeenAt="1539593163"
        provides="server"
        owned="1"
        accessToken="XXXX"
        publicAddress="XXXX (my public IP)"
        httpsRequired="0"
        synced="0"
        relay="0"
        publicAddressMatches="1"
        presence="1">
        
        <Connection protocol="https"
                    address="192.168.1.103"
                    port="32400" uri="https://192-168-1-103.9e2c75XXXX6d3caa7d.plex.direct:32400"
                    local="1"/>
        <Connection protocol="http"
                    address="XXXX (my domain)"
                    port="80"
                    uri="http://XXXX (my domain)"
                    local="0"/>
</Device>

192.168.1.103 is the address my router uses to address my PC. The time I checked this was 1539609733 if the timestamps are important.

What is notable here is that I also have a second, separate Plex server associated with my account, where I have done this same thing, and which works normally with apps; that server shows only one Connection entry, to its custom domain on port 80. That seems worth mentioning.

As for HTTPS: I do intend to use HTTPS instead, I just thought I’d get it up and running with HTTP first, then handle the SSL/TLS stuff once I knew it was all working, to avoid overlapping problems.

Quick questions: What setting are you using for Secured connections under Network?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.