I moved to another HA server. Because of that a new token. Deleted integration, restated, added Plex integration again, Plex web login to get the token, successfull, but then always:
No servers linked to Plex account
There is a server linked. It worked before as well.
Sounds like youâre using the manual config setup. Have you tried the automatic flow which obtains a new token for you by redirecting you to Plex to login?
And yes, restarted before, removed HA from former integration/server inside Plex before, ⌠And yes, if I log into plex.tv with this credentials, the server is there.
Can you create a new issue at Issues ¡ home-assistant/core ¡ GitHub and add logs? Bumping up the log levels to debug for homeassistant.components.plex and plexapi would be a good start. Make sure you donât share any tokens.
Now you can access Plex internally or externally with the same URL with a reverse proxy, and you donât have to enable remote access on the Plex server
@Deckoz2302 I am very grateful. Not sure if you have the time to answer the below
port forward 80 and 443 to NPM on your router, 80 so you can rewrite http â https
Do I also enable port 80 in NPM â currently it is disabled
create a proxy host for plex.yourdomain.whatever â internal Plex IP, port 32400
I can create a proxy host â currently using duck DNS which as I understand will accept wild card sub domains. Do I also create a separate reservation on my router â currently my HA is 192.168.88.72 so should it be a reserved IP or the can I continue to use 192.168.88.72
I think I can google the rest and try to figure it out. Will post detailed instructions once I get it to work.
Yes, and then on the proxy host config enable https redirect.
This way you could say just type in plex.yourdomain in a browser and it will automatically forward to https://plex.yourdomain
If you donât do this you canât just type plex.yourdomain as that will resolve as http://plex.yourdomain which isnât serving anything on http port 80
The only NAT ports(port forwarding) reservation on your router you should need is 80 and 443. Which will forward to your NPM host.
Letâs say you have a Plex stack, radarr, sonarr etc. You are only forwarding to NPM 80 and 443 once from your router. NPM handles the FQDN and then forwards to the backend IP and port for the service configured in the proxy config.
Now letâs say you have
plex.yourdomain
radarr.yourdomain
sonar.yourdomain
tautulli.yourdomain
jackett.yourdomain
overseerr.yourdomain
DNS records only hold records, not Ports. So all three of the above sub domains will have the same underlying A record(IP) or CNAME record(pointing to another FQDN) meaning they all resolve to the same host in a residential scenario where you have one ISP. Provider giving you one IP or one NAT
So they all navigate to your NPM proxy via port 80(http://plex.yourdomain when you type plex.yourdomain in a browser. If in NPM you have HTTPs redirect on it redirects to 443 or https://plex.yourdomain
Now on the backend your hosts might be different hosts or the same, and different ports. Thatâs what the proxy does, it serves a SSL certificate and acts as the front end to the backend server/microservice without actually exposing that service to the Internet, as there is a proxy in front of it.
I quoted this again. To mention IP reservations. While you only need two ports open to NPM only, not the actual service ports like Plex on 32400. You should make IP reservations and static IPs for your servers and micro services, so that your router always and only forwards 80 and 443 to a static IP where NPM resides. And then for each of your micro services, NPM always forwards to a static IP the service resides on. This way your services arenât on DHCP and the configurations will always resolve to the correct host.
Thank you for the detailed instructions, plus the explanation how things work were amazing and insightful. I followed them in detail. I tried to setup a static IP but one of the requirements is a MAC or Client ID. So I tried and abandoned it. I setup the forwards, filters and the URL re-write. I can now access PLEX outside my network and within my network goes to my local HA IP at port 32400.
The one problem I am faced with is when I access outside my network through my Duck DNS domain then it isnât secure. My HA instance is still secure how can I leverage to use Lets Encrypt for my plex domain. I have looked around but couldnât find a solution
The second problem but not a deal breaker is, outside my network when I click on âopen Web UIâ in the Plex media Server âAdd Onâ it resolves to myha.duckdns.org:3400 not to plexmyha.duckdns.org:3400 hence doesnât go anywhere.