Plex media server: remote access without account
Have you checked the Plex knowledge base and searched on the sub and Google: yes
Server version: 1.8.4.4249
OS: Ubuntu 16.04.3 LTS
I am trying to access my plex server from outside my local network. I absolutely do not want to sign up for a plex account; it's my server, I'll handle the authentication, thanks.
To do this I configured an nginx server as a reverse proxy so that plex would see the connection as coming from localhost. However it still redirects me to app.plex.tv/auth when I try and connect. I can connect remotely with a tunnel over ssh so I know it's possible to do this. How can I stop plex from redirecting to the app.plex.tv authentication page when I access the web app remotely?
My nginx config is as follows:
server {
listen 80;
server_name [REDACTED];
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/[REDACTED]/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/[REDACTED]/privkey.pem; # managed by Certb$
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
location /web {
if ($http_x_plex_device_name = '') {
rewrite ^/$ http://$http_host/web/index.html;
}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
# proxy request to plex server
proxy_pass http://127.0.0.1:32400;
proxy_redirect off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 36000s;
}
}
Posted Nov 23, 2017, 10:23 PM UTC · edited
Short answer, you can't. After a recent update Plex now has all auth going through Plex.tv then back to your local server.
False, I've done it using a ssh tunnel. So that will be my method if I can't figure out a better way. I'm just trying to figure out if i can improve it.
If I have to I will have nginx rewrite their client side JS so it tells plex.tv my host name is localhost. Can't stop me now, I'm havin' a good time
Whether you think it's false or not, try rolling back to a much older version of Plex and see for yourself. If it works then you'll know. Good luck with your setup.