Plex on Subdomain with LetsEncrypt

  • Hi, tried to configer Plex to use it from outside.
    I already installed nextcloud with LetsEncrypt with the help of macom's great HowTo.


    I started like this


    1. I mounted the LetsEncrypt "keys folder" to the plex docker volume


    2. I set the Plex Network Settings

    • Custom certificate location = /keys/letsencrypt/privkey.pfx
    • Custom certificate encryption key = /keys/letsencrypt/privkey.pem
    • Custom certificate domain = plex.mydomain.de
    • Custom server access URLs = https://plex.mydomain.de:443

    3. I edited the proxy-confs file /letsencrypt/nginx/proxy-confs/plex.subdomain.conf i changed "proxy_pass https://$upstream_plex:32400" to "proxy_pass https://lokalip:32400"


    4. I edited in the LetsEncrypt docker settings ONLY_SUBDOMAINS=true and SUBDOMAINS=www,plex


    5. Plex docker Network changed from "HOST" to "Proxy-Network"


    6. Restart LetsEncrypt --> Server OK


    lokal.ip:32400/web/index.html --> no response


    plex.mydomain.de --> no response


    Is it maybe an config fail with my DNS? I use DynDNS and forwarded plex.mydomain.de to mydomain.de otherwise LetsEncrypt gives me an Error.


    I hope i explained my problem good enough.


    Thx for help
    Niklas

  • I managed to fix this eventually in the following way:


    1. Mounted Let'sEncypt config files to inside the Plex docker config in the following manner: /letsencrypt = /mnt/user/data/letsencrypt/
    2. Plex settings in browser > Network >
      1. Custom certificate location = /letsencrypt/keys/letsencrypt/privkey.pfx
      2. Custom certificate encryption key = /letsencrypt/keys/letsencrypt/privkey.pem
      3. Custom certificate domain = plex.XXXXXX.com
      4. Custom server access URLs = https://plex.XXXXXX.com:443
    3. In the file in /mnt/appdata/letsencrypt/nginx/proxy-confs/plex.domain.conf > change the line "proxy_pass https://$upstream_plex:32400" to proxy_pass https://UnRaidServerIP:32400
    4. Optional - 301 redirect so that it forces https - Go to /mnt/appdata/letsencrypt/nginx/site-confs/default > remove the "#" signs next to the code: server {

      listen 80;

      server_name _;

      return 301 https://$host$request_uri;

      }
    5. Optional - Plex UI in browser > Network > Secure connections = Required.


    Hope this helps someone out there.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!