How To Install Plex Media Server On Ubuntu 20.04 LTS Server - Desktop
How To Install Plex Media Server On Ubuntu 20.04 LTS Server - Desktop
04 LTS Server/Desktop
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 1/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
wget https://downloads.plex.tv/plex-me
dia-server-new/1.19.3.2843-e3c1f7bcd/d
ebian/plexmediaserver_1.19.3.2843-e3c1
f7bcd_amd64.deb
cd ~/Downloads
The -i is short for --install . Note that when you type the
following
You can press the Tab key, which will autocomplete the
filename.
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 2/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
ships with a source list file. To see a list of files installed from
a package, run dpkg with -L flag.
dpkg -L plexmediaserver
Then save and close the file. To save a file in Nano text editor,
press Ctrl+O , the press Enter to confirm. To exit, press
Ctrl+X . After that, run the following command to import
Plex public key to apt package manager.
wget -q https://downloads.plex.tv/plex
-keys/PlexSign.key -O - | sudo apt-key
add -
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 4/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
Then you can access Plex web interface via the following
URL.
http://localhost:8888/web
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 6/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
On the next screen, enter a name for your Plex server. Make
sure Allow me to access my media outside my
home is checked. Then click Next .
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 7/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
Note that the plex user needs to have read and execute
permission on your media directories. For example, my 2T
external hard drive is mounted under /media/linuxbabe/ ,
which is owned by root. Users not in group root can’t access it,
so I run the following command to give user plex read and
execute permission. (I do not recommend changing ownership
with chown or chgrp command. Using the setfacl
command will suffice.)
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 8/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
If your external hard drive is only used for storing media files,
then you can do so, but if you have sensitive files on the
external hard drive, don’t do it.
Once you finish adding your media folders, click Next and
then click Done . You can always add more libraries later.
If you made a mistake in the initial setup, you can delete the
Preferences.xml file and start it over.
sudo rm /var/lib/plexmediaserver/Libra
ry/Application\ Support/Plex\ Media\ S
erver/Preferences.xml
Advantages of Usenet
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 9/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
server {
listen 80;
server_name plex.example.com;
location / {
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 10/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
proxy_pass http://127.0.0.1:
32400;
proxy_set_header Host $host;
proxy_set_header X-Real-IP
$remote_addr;
proxy_set_header X-Forwarded
-For $proxy_add_x_forwarded_for;
sudo nginx -t
<VirtualHost *:80>
ServerName plex.example.com
ErrorDocument 404 /404.html
#HTTP proxy
ProxyPass / http://localhost:32400/
ProxyPassReverse / http://localhos
t:32400/
#Websocket proxy
SSLProxyEngine on
<Location /:/websockets/notificatio
ns>
ProxyPass wss://localhost:3240
0/:/websockets/notifications
ProxyPassReverse wss://localho
st:32400/:/websockets/notifications
</Location>
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 12/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
Save and close the file. Then enable this virtual host.
Restart Apache
Now you can access Plex media server using the domain name.
Enable HTTPS
To encrypt the HTTP traffic when you visit Plex server from
outside, we can enable HTTPS by installing a free TLS
certificate issued from Let’s Encrypt. Run the following
command to install Let’s Encrypt client (certbot) on Ubuntu
20.04.
If you use Nginx, then you also need to install the Certbot
Nginx plugin.
If you use Apache, then you need to install the Certbot Apache
plugin.
Where:
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 14/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
When a new version of Plex media server comes out, you can
upgrade it by executing the following commands.
[Total: 1 Average: 5]
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 15/16
17/3/2021 How to Install Plex Media Server on Ubuntu 20.04 LTS Server/Desktop
https://www.linuxbabe.com/ubuntu/install-plex-media-server-ubuntu-20-04 16/16