Plex Media Server
Installing Plex
Install Plex using
sudo apt-get -y install curl
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install plexmediaserver
Accept the default if asked for options.
sudo ufw reload
Go to the internal IP address of your server on a browser SERVER_IP_ADDRESS:32400/web
Login to Plex (or create an account if you do not have one. Go to Library and add the media files you have.
Issuing SSL Certificates
You may need to stop apache/nginx before being able to install the let’s encrypt certificate using:
sudo systemctl stop nginx
sudo certbot certonly --standalone --agree-tos -m admin@website.com -d plex.website.com
Then select
2 Automatically use a temporary webserver (standalone)
Don’t forget to start the apache/nginx afterward!
sudo systemctl start nginx
Make sure you do the port forwarding for 32400 on you router. Then run
-inkey /etc/letsencrypt/live/plex.arashbox.com/privkey.pem \
-in /etc/letsencrypt/live/plex.arashbox.com/cert.pem \
-certfile /etc/letsencrypt/live/plex.arashbox.com/chain.pem
Next, you'll be asked to enter a password to encrypt the .pfx file. Enter a password you won't mind saving in the Plex settings in plaintext.
sudo chown plex:plex /var/lib/plexmediaserver/certificate.pfx
Visit the Plex UI on your server: https://plex.website.com:32400
Go to Settings (icon on top right corner), then Server (tab), then Network (left navigation column).
Click "SHOW ADVANCED" to see the necessary fields.
Enter the following values:
- Custom certificate location: /var/lib/plexmediaserver/certificate.pfx
- Custom certificate encryption key: The password you entered on step 2 of last section
- Custom certificate domain: https://plex.website.com:32400