I’ve set up a Plex server a while ago and everything works just pretty fine. I now would like to enable remote access so I can share my library with a friend. Unfortunately this is not trivial because of my specific configuration (I believe). My setup looks like this:
VM on a private Machine (IP: 192.168..) --> VPN Connection (10.8.0.) --> Public Server with public IP-Address with a nginx reverse proxy directing public traffic to 10.8.0.:32400
This works just fine accessing the plex-server via a sub-domain and the reverse proxy but unfortunately when trying to activate remote access, the Application tries to connect to the private 192.168.. address, which is obviously not possible:
192.168.. : 32400 <-- Public ... : 0 X
I believe this is due to the fact that the Plex Media Server does not know anything about the public IP-Address. Is there any way to change the IP-Address of the Plex Media Server from the Private Address to the public Address?
Thank you for this. I’ve already thried this, but this does also not work. When I enter the https://plex.domain.com it still does not enable remote access.
Is there something wrong with my nginx-config? I’m redirecting only 443 to 10.8.0.10:32400. Here is my config:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name page;
error_log /var/log/nginx/page/plex/error.log warn;
access_log /var/log/nginx/page/plex/access.log;
proxy_cache off;
ssl_certificate /etc/letsencrypt/live/page/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/page/privkey.pem;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
ssl_session_tickets off; # Requires nginx >= 1.5.9
ssl_stapling on; # Requires nginx >= 1.3.7
ssl_stapling_verify on; # Requires nginx => 1.3.7
ssl_trusted_certificate /etc/letsencrypt/live/page/chain.pem;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
ssl_dhparam /etc/nginx/ssl/00basic-certificates/dhparams.pem;
# Disalow to read .htaccess-Files
location ~/\.ht {
deny all;
}
#Plex has A LOT of javascript, xml and html. This helps a lot, but if it causes playback issues with devices turn it off. (Haven't encountered any yet)
gzip on;
gzip_vary on;
gzip_min_length 1000;
gzip_proxied any;
gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
gzip_disable "MSIE [1-6]\.";
client_max_body_size 100M;
# Configuration for letsencrypt
location /.well-known {
alias /srv/http/page/plex/.well-known;
}
#Forward real ip and host to Plex
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#When using ngx_http_realip_module change $proxy_add_x_forwarded_for to '$http_x_forwarded_for,$realip_remote_addr'
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#Websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#Disables compression between Plex and Nginx, required if using sub_filter below.
#May also improve loading time by a very marginal amount, as nginx will compress anyway.
#proxy_set_header Accept-Encoding "";
#Buffering off send to the client as soon as the data is received from Plex.
proxy_redirect off;
proxy_buffering off;
location / {
#Example of using sub_filter to alter what Plex displays, this disables Plex News.
#sub_filter ',news,' ',';
#sub_filter_once on;
#sub_filter_types text/xml;
proxy_pass http://10.8.0.18:32400;
}
Ok there seems to be a bug in the remote access-part here. I’ve just read this post here:
He also mentions that the remote access works but it still shows that remote access is not possible. So everything is just perfekt, thanks for your help.