How to Install Plex Media Server on Ubuntu 18.04 LTS Server or Desktop

This tutorial will be showing you how to install Plex media server on Ubuntu 18.04 LTS server/desktop. Plex is a free piece of software that allows you to organize your movies, TV shows, music and photos in one beautiful interface and stream those media files on your PC, tablet, phone, TV, Roku, etc on the network or over the Internet. Plex can be installed on Linux, FreeBSD, MacOS, Windows and various NAS systems.

Install Plex Media Server on Ubuntu 18.04

First, go to Plex server download page, select Linux and choose Ubuntu (16.04+) / Debian (8+)with 32-bit or 64-bit.

plex-ubuntu-18.04

If you are going to install Plex on a headless Ubuntu 18.04 server, then you can go to your browser’s download history, then copy the Plex download link and use wget to download Plex from command line like below.

wget https://downloads.plex.tv/plex-media-server/1.13.5.5332-21ab172de/plexmediaserver_1.13.5.5332-21ab172de_amd64.deb

Once the Plex deb package is downloaded, cd to the download directory. For example, my Plex is downloaded to the Downloads directory under Home, so I run the following command. The tilde (~) represents home directory.

cd ~/Downloads

On Debian based Linux distros (Ubuntu, Linux Mint, etc), dpkg  is the standard command-line tool to install deb packages. So run the following command to install the Plex deb package.

sudo dpkg -i plexmediaserver_1.13.5.5332-21ab172de_amd64.deb

The -i is short for --install. Note that when you type the following

sudo dpkg -i plex

You can press the Tab key, which will autocomplete the filename.

plex ubuntu install

Now Plex media server is installed. We can check its status with:

systemctl status plexmediaserver

As you can see, it’s running on my Ubuntu 18.04 system. (Press q to take back control of terminal.)

ubuntu server plex guide

If Plex media server isn’t running, you can start it with:

sudo systemctl start plexmediaserver

Enable Plex Repository

By enabling the official Plex repo, you can update Plex on Ubuntu with apt package manager. The Plex deb package ships with a source list file. To see a list of files installed from a package, run dpkg with -L flag.

dpkg -L plexmediaserver

Open this file with the following command.

sudo nano /etc/apt/sources.list.d/plexmediaserver.list

By default, its content is commented out. Uncomment the last line. (Remove the beginning # symbol).

plex ubuntu repo

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 -

Now update software repository index.

sudo apt update

Plex Media Server Initial Setup

If you run the following command:

sudo netstat -lnpt | grep Plex

You can see that Plex media server is listening on 0.0.0.0:32400 and 127.0.0.1:32401.

install plex media server ubuntu ppa

The web-based management interface is available at port 32400. The first time you configure Plex, you must visit Plex via 127.0.0.1:32400/web or localhost:32400/web. If you installed Plex on your Ubuntu 18.04 desktop, then you can search Plex Media Manager in your application menu. It will take you to Plex web interface, which in turn will take you to https://app.plex.tv because you need to sign in with a plex.tv account.

plex on ubuntu server

Note that if Plex is installed on a remote Ubuntu 18.04 server, you need to set up a SSH tunnel by executing the following command on your local computer. Replace 12.34.56.78 with the IP address of the remote Ubuntu server.

ssh 12.34.56.78 -L 8888:localhost:32400

Then you can access Plex web interface via the following URL.

http://localhost:8888/web

This HTTP request will be redirected to http://localhost:32400/web on the remote server through SSH tunnel. This SSH tunnel is only needed for the initial setup. After the initial setup, you can access Plex web interface via server-ip-address:32400. Replace server-ip-address with your real server IP address.

Once signed in, you will be redirected to localhost:32400 to do the initial setup. If you don’t see the setup wizard, you can enter localhost:32400/web/index.html#!/setup in the address bar to launch it.

install plex media server ubuntu 18.04

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.

plex ubuntu 18.04 repository

Now you can add libraries. Click Add Library button.

plex ubuntu 18.04 server

Select a library type, then click browse for media folder button to add your media folders.

plex media server ubuntu 18.04 setup guide

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.)

sudo setfacl -m u:plex:rx /media/linuxbabe/

You may also need to assign permission on individual media directories like below.

sudo setfacl -m u:plex:rx /media/linuxbabe/directory-name

It can be tempting to add the recursive flag (-R), which gives plex read and execute permission on every file and sub-directory on the drive.

sudo setfacl -R -m u:plex:rx /media/linuxbabe/

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.

Redo the Initial Setup

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/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml

sudo systemctl restart plexmediaserver

Now visit localhost:32400/web again. Plex will tell you there’s an unclaimed server. Click claim it now.

Where to Download Movie and TV Shows

  1. Use a torrenting client like Deluge.
  2. Learn how to download from Usenet.

Advantages of Usenet

  1. It gives you better privacy because others can’t see what you are downloading.
  2. Superfast download speed.
  3. Files on Usenet are usually kept much longer than torrent files. For example, Newsdemon stores files for 4430 days (more than 12 years), so you can download old content at a very fast speed.

Create Nginx Reverse Proxy

If you don’t have a real domain name, I recommend going to NameCheap to buy one. The price is low and they give whois privacy protection free for life.

If you prefer to use a domain name rather than typing http://localhost:32400 to access your Plex media server, then you need to set up a reverse proxy. We can use Nginx for this purpose. Install Nginx from the default Ubuntu software repository.

sudo apt install nginx

Then create a server block file for Plex.

sudo nano /etc/nginx/conf.d/plex.conf

Put the following lines into the file. Replace plex.example.com with your own domain name. Remember to create an A record for the sub-domain in your DNS manager. (If your ISP gives you a dynamic IP address rather than a static IP address, you need to set up dynamic DNS and port forwarding, or use PageKite. )

server {
      listen 80;
      server_name plex.example.com;

      location / {
          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;

          #upgrade to WebSocket protocol when requested
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "Upgrade";
      }
}

Save and close this file. Then test Nginx configuration.

sudo nginx -t

If the test is successful, reload Nginx for the change to take effect.

sudo systemctl reload nginx

Now you can access Plex media server via plex.example.com.

Create Apache Reverse Proxy

If you prefer Apache over Nginx, then install Apache web server by using the following command.

sudo apt install apache2

To use Apache as a reverse proxy, we need to enable the proxy modules and the header module.

sudo a2enmod proxy proxy_http headers proxy_wstunnel

Then create a virtual host file for Plex.

sudo nano /etc/apache2/sites-available/plex.conf

Put the following configurations into the file. Replace plex.example.com with your actual domain name. Don’t forget to create DNS A record for this sub-domain.

<VirtualHost *:80>
   ServerName plex.example.com
   ErrorDocument 404 /404.html

   #HTTP proxy
   ProxyPass / http://localhost:32400/
   ProxyPassReverse / http://localhost:32400/

   #Websocket proxy
   SSLProxyEngine on
   <Location /:/websockets/notifications>
        ProxyPass wss://localhost:32400/:/websockets/notifications
        ProxyPassReverse wss://localhost:32400/:/websockets/notifications
   </Location>

   Header always unset X-Frame-Options
</VirtualHost>

Save and close the file. Then enable this virtual host.

sudo a2ensite plex.conf

Restart Apache

sudo systemctl restart apache2

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 18.04.

sudo apt install certbot

If you use Nginx, then you also need to install the Certbot Nginx plugin.

sudo apt install python3-certbot-nginx

Next, run the following command to obtain and install TLS certificate.

sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email [email protected] -d plex.example.com

If you use Apache, then you need to install the Certbot Apache plugin.

sudo apt install python3-certbot-apache

Next, run the following command to obtain and install TLS certificate.

sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email [email protected] -d plex.example.com

Where:

  • --nginx: Use the nginx plugin.
  • --apache: Use the Apache plugin.
  • --agree-tos: Agree to terms of service.
  • --redirect: Force HTTPS by 301 redirect.
  • --hsts: Add the Strict-Transport-Security header to every HTTP response. Forcing browser to always use TLS for the domain. Defends against SSL/TLS Stripping.
  • --staple-ocsp: Enables OCSP Stapling. A valid OCSP response is stapled to the certificate that the server offers during TLS.

The certificate should now be obtained and automatically installed.

home media server plex

And you can access Plex web interface via HTTPS.

install plex media server ubuntu 18.04 linux

How to Upgrade Plex on Ubuntu 18.04

When a new version of Plex media server comes out, you can upgrade it by executing the following commands.

sudo apt update

sudo apt upgrade

Then restart Plex.

sudo systemctl restart plexmediaserver

I hope this tutorial helped you install Plex media server on Ubuntu 18.04. As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Rate this tutorial
[Total: 32 Average: 4.8]

63 Responses to “How to Install Plex Media Server on Ubuntu 18.04 LTS Server or Desktop

  • Jonathan
    5 years ago

    Nice guide! Very thorough!

    For those setting up a Plex server not on localhost, the statement “After the intitial setup, you can access Plex web interface in the usual way.” is a little confusing. It might be clearer to say “After the initial setup, you can access Plex web interface using port 32400 on the IP address of the remote machine.”

    Also, for some reason when I tried an SSH proxy on OSX with “ssh x.x.x.x -L 8888:localhost:32400” the browser refused my connection. I used this command on a Linux box instead:

    ssh -NL 8888:localhost:32400 x.x.x.x

  • Thanks for this nice guide, it works. Just a question, I access it from Raspbian (on Rapsberry). Is there a way to avoid to open the SSH tunnel each time before accessing it? I mean a way to make it permanent.

    Thanks.

    • Xiao Guo An (Admin)
      5 years ago

      The SSH tunnel is only needed for the initial setup. After the initial setup, you can access Plex web interface via server-ip-address:32400. Replace server-ip-address with your real server IP address.

  • One of the most thorough guides I have seen for Plex setup. The SSH tunnel was really helpful for me, as I installed on a headless Ubuntu 18.04 setup.

    For those using Windows as a client, you can install the

    ssh

    command from “Git for Windows” (search on Google), and enabling the option to use Linux CLI tools in the Windows CMD prompt during setup.

    Thanks for the guide!

  • Super easy to follow and get up and running, thank you! I was afraid switching from Windows 7 as a media server to Ubuntu was going to be hard, several of your guides now have got me running smoothly!

  • Richard Ragon
    5 years ago

    Got a question on setfacl. I’m using a QNAP Nas server for ALL the files that my Plex is using.

    What permissions in file sharing do I need?

    • Xiao Guo An (Admin)
      5 years ago

      Plex needs read and execute permissions on your media files.

      Just run the setfacl command, replace /media/linuxbabe/ with the mount directory of your NAS.

      • Richard Ragon
        5 years ago

        Which is why Im confused. The NAS controls who has access to the files, not the outside unit like the Plex.

    • Xiao Guo An (Admin)
      5 years ago

      I don’t have a QNAP, so can’t help with this.

  • When I use the command

    ssh 12.34.56.78 -L 8888:localhost:32400

    on a local Linux Mint computer, I get the following output:

    [email protected]'s password:

    . Whether I use the password for the remote linux or the local linux, I continue to get permission denied. I’m very confused by this step. For the initial command, I am using the correct IP address for the remote machine as verified by ifconfig.

    • I realized that by adding the user to the command, it works.

      ssh [email protected] -L 8888:localhost:32400

      However, after performing this succesfully I am not able to load the webpage. After I try to load the webpage each time the command prompt shows

      channel 3: open failed: connect failed: Connection refused

      Any thoughts?

    • Xiao Guo An (Admin)
      5 years ago

      That usually means Plex media server isn’t running. Please check

      sudo systemctl status plexmediaserver

      And see if Plex is listening on port 32400.

      sudo netstat -lnpt | grep Plex
      • The plex server is running and listening to port 32400 on localhost and 32401 on 127.0.0.1

        I couldn’t access a different server I had installed but figured out I needed to allow the connection through ufw. I’ve ensured I have done that for Plex too.

  • Thanks for this! Plex was one of the last pieces of switching my server from Windows 10 to Linux. It’s been challenging, but the reduced footprint on my ageing HP Gen 7 Microserver has been greatly appreciated!

  • great tutorial.
    I do not understand why you install reverse proxy, it is already integrated, loging to plex.tv/web with your credential will show you all yours servers…

    • Xiao Guo An (Admin)
      5 years ago

      Because I like using my own domain name and with my own domain name I can integrate Plex with other useful web applications like Plex Requests 🙂

  • Bafplus
    5 years ago

    Whats the deal with updating?
    PMS is telling me there is a new version, so i did sudo apt update.
    I get the “Conflicting distribution….” error, as expected, but also NO new available version to update.

    So how do i update PMS to the recent new version?

    • Xiao Guo An (Admin)
      5 years ago

      The new version isn’t in the repository yet. If you can’t wait, you need to download the deb package from Plex download page and install it with dpkg, just like when you first install it. Then restart Plex.

  • Satonne
    5 years ago

    Hi

    If you have this error when you try to connect to ssh 12.34.56.78 -L 8888:localhost:32400
    connect failed: Connection refused

    Open SSH connection with putty and add a tunnel SSH Proxy directly with this configuration : in Category – Connexion – SSH – Tunnels : Less empty “Port forwarding” and “Add new forwarded port”
    Source port = 1080
    Under Destination : empty description – Dynamic and Auto

    Click Add and vérify forwarded port to 1080D
    After save your configuration !

    After add proxy configuration 127.0.0.1 SOCKS 5 with 1080 port in your browser or windows proxy for exemple.

    Try to connect to 127.0.0.1:32400 or localhost:32401 !

  • I am using Linux Mint 19.1 Cinnamon and PMS Version 1.16.5.1554.
    2 weeks ago my PMS quit working, the app reported no server could be found, while I was using the server in PMS control panel to find out why I couldn’t access my media. I finally gave up and uninstalled PMS and purged my config data and started from scratch. Now the PMS control panel recognizes my server, but, I am unable to claim it. No matter how many times I click the button to claim it, it shows this message after a few minutes. “This server is unclaimed and not secure
    Claiming this server will associate it with your Plex account. This helps your devices find each other and helps keep your media safe.”

  • great tutorial! the detail of the ssh tunnel is amazing bro, thanks a lot

  • Hey, First of all I would like say thank you for this (and all) guides. I have only one small problem and I hope you can solve it. 🙂
    I’ve mounted my hdd to a “data” folder and it contains a movies and a series folder. I’ve installed qbittorrent and I download content in these folders.
    After a successful download I refresh my plex library and nothing happens. If I connect to my server and set the setfacl again for the folders, it works perfectly.
    My question is how can I avoid to set setfacl after every download (or new file/folder)?

    • Xiao Guo An (Admin)
      4 years ago

      Have you used the -R option in setfacl command? like below:

      sudo setfacl -R -m u:plex:rx /path/to/your/data/folder
    • Xiao Guo An (Admin)
      4 years ago

      You can create a cron job.

      sudo crontab -e

      Add the following line in the crontab file to automatically grant permissions every minute.

      * * * * * setfacl -R -m u:plex:rx /path/to/your/data/folder

      Save and close the file. And you are done.

      • Thank you so much! It looks like it’s gonna be solve my problem. 🙂

  • John Dowd
    4 years ago

    So I’ve been using plex for quite some time. But now it will not install on my remote server. I’ve followed your step up to “Plex Media Server Initial Setup” step where I must got the URL: http://localhost:8888/web. I am using a headless remote server so I perform the extra step where I redirect my localhost to the one on the remote server by executing your command: ssh 12.34.56.78 -L 8888:localhost:32400 (I do use the headless server’s IP address).

    This initiates the ssh connection with this error:

    “Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings”

    I’m assuming that this is a red herring since the connection does in fact work.

    I then go on to access the Plex web page with the URL: http://localhost:8888/web

    I get the following errors showing up on the console that I did the redirection with:

    jdowd@mercury:~$ channel 3: open failed: connect failed: Connection refused
    channel 4: open failed: connect failed: Connection refused
    channel 3: open failed: connect failed: Connection refused
    channel 3: open failed: connect failed: Connection refused
    channel 4: open failed: connect failed: Connection refused
    channel 3: open failed: connect failed: Connection refused

    I’m hoping to get some guidance here.

    Thanks in advance for any help.

    Cheers!!

    • Xiao Guo An (Admin)
      4 years ago

      Make sure Plex media server is running. You can check its status with

      systemctl status plexmediaserver

      Sample output:

      ● plexmediaserver.service - Plex Media Server for Linux
         Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
         Active: active (running) since Mon 2019-09-30 05:39:57 UTC; 10s ago
       Main PID: 9578 (sh)
          Tasks: 125 (limit: 1109)
      

      If Plex media server isn’t running, you can start it with:

      sudo systemctl start plexmediaserver
  • John Dowd
    4 years ago

    So here’s the output from that command. As I mentioned before, all of the instructions were followed and the system appears to be up.

    jdowd@mercury:~$ systemctl status plexmediaserver
    ● plexmediaserver.service - Plex Media Server for Linux
       Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
       Active: active (running) since Sun 2019-09-29 20:51:29 UTC; 1 day 5h ago
     Main PID: 2931 (sh)
        Tasks: 60 (limit: 4915)
       CGroup: /system.slice/plexmediaserver.service
               ├─2931 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server"
               ├─2932 /usr/lib/plexmediaserver/Plex Media Server
               ├─3009 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-21ab172de/Framework.bundle/Contents
               ├─3063 /usr/lib/plexmediaserver/Plex DLNA Server
               └─3064 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediase
    
    Sep 29 20:51:29 mercury systemd[1]: Starting Plex Media Server for Linux...
    Sep 29 20:51:29 mercury systemd[1]: Started Plex Media Server for Linux.
    
    • Xiao Guo An (Admin)
      4 years ago

      If Plex is running, I don’t think it would refuse connection from localhost.

    • Xiao Guo An (Admin)
      4 years ago

      If you use Putty on Windows, you might find this comment useful.

  • Hey, nice tutorial. But how can I deactivate that my server is reachable with Plex.tv/web? Regards.

  • maximumwarp
    4 years ago

    As usuall, very great tutorial, thank you!

    One question: I installed Plex server on Ubuntu 18.04 LTS (server with Xfce GUI), the UFW firewall is enables, everything works like a charme but do I need to open other ports besides the 32400 TCP? What do I need for server discovered by DLNA clients over the LAN?

  • Hi,

    Thanks for a great, straightforward tutorial for those of us that are new to both. Really easy to follow.

    But…

    Everything works fine but I keep getting “No write access to destination” in the recordings, so it’s not actually recording, but thinks it is. I’m guessing it’s a permissions problem. I’ve reinstalled three times without success.

    Can you please help me get it going? I literally spent all day and night. I’m about to start fresh again but I know it’ll do the same thing, I just want to begin fresh again since I’ve tried a million things and I don’t want my installation to be sloppy or have unneeded ‘fluff’.

    Ideally, I’d like to:
    – keep recordings on the same machine in a drive called “MyData” so when I mess things up, I can just either reinstall or copy my shows to elsewhere (or whatever the issue is).
    – Have plex also have access to my media directories on two other machines that already have files that I’d really like to keep separated.

    I’m running a headless Ubuntu 18 server with nothing else on it from scratch and watching on Amazon Fire TV & computers, phone or whatever. Again, all gets going except the ability for PMS to access the drives.

    Thanks!

  • Cristian
    4 years ago

    …when configuring the plex server…and add library….how you can I specify network paths?….e.g. my media files are located in my LAN on a NAS equipment with another IP….how can I declared this?

  • Mauricio
    4 years ago

    Greate, excellent thank you.

  • Juanchi
    4 years ago

    After looking all over the internet for clear instructions about plex in Ubuntu I have to say this are the best ever!!!! Thank you so much!!!!!!

  • Mustafa
    4 years ago

    Thanks so much. Whenever I google for a guide, there is always 1 step wrong and I end up remembering this website because of its unique name and the fact that none of your guides have ever let me down. I had an issue this time with Plex saying “No soup for you, the server doesn’t want to let you in” and then I remembered when I set up my old server, I had to create a SSH tunnel, so that’s what brought me back. Your instructions fixed that issue instantly. I went on your home page and wow you have so many guides, so many interesting things I can do with my server beyond plex/web hosting. I can already see a replacement to my 1Password subscription for example. Will definitely try to make a bigger contribution than this comment when I can 🙂

  • John Birckmold
    4 years ago

    hi all, thanks for the great guide on how to install the plexmedia. works perfect.

    After i run plex app from windows to login in the ubuntu plexmedia works also good but when i use putty to do some remote login stuff it seems the user and pasword i use wont work at all in putty.

    how ever before i start plex app from windows 10 computer i can login with putty like it always work but not after start plex app. i get acces denied all the time while the plex app is running. Even after i close the plex app i cant login with putty on my linux system. only after a reboot.

    is there a sollution for it ?

    Grtz, John

  • snap install plexmediaserver

    There. …fixed it for ya!

  • First, thanks so much for your contributions to the community. You do a great job and I’ve learned tons from your posts.

    Second, have an issue enabling repo & update. See below. Any ideas if I’ve done something incorrect or suggestions for a fix? If it matters this is bionic server and connected with ssh windows powershell.

    gg@gse:/$ wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add -
    OK
    gg@gse:/$ sudo apt update
    Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
    Ign:2 https://downloads.plex.tv/repo/deb public InRelease
    Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
    Get:4 https://downloads.plex.tv/repo/deb public Release [5,815 B]
    Get:5 https://downloads.plex.tv/repo/deb public Release.gpg [821 B]
    Ign:5 https://downloads.plex.tv/repo/deb public Release.gpg
    Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
    Get:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
    Reading package lists... Done
    W: GPG error: https://downloads.plex.tv/repo/deb public Release: The following signatures were invalid: BADSIG 97203C7B3ADCA79D Plex Inc.
    E: The repository 'https://downloads.plex.tv/repo/deb public Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    • Xiao Guoan (Admin)
      4 years ago

      No idea. The commands works perfectly on my Ubuntu 18.04 server.

      Maybe you can try adding the public key in two steps.

      wget https://downloads.plex.tv/plex-keys/PlexSign.key
      
      sudo apt-key add PlexSign.key
      • Xiao
        Thanks for reply, worked fine this way so now it is good to go.

        Fyi had to add sudo to wget line. Without sudo there was error on download “PlexSign.key: Permission denied” | “Cannot write to ‘PlexSign.key’

        All worked fine after that. Thanks again

  • Michael
    4 years ago

    I am getting

    channel 3: open failed: administratively prohibited: open failed

    I’m guessing that this is due to something fishy with what netstat is reporting…

    sudo netstat -lnpt | grep Plex
    tcp        0      0 127.0.0.1:42375         0.0.0.0:*               LISTEN      2377/Plex Plug-in [
    tcp        0      0 127.0.0.1:46412         0.0.0.0:*               LISTEN      2197/Plex Plug-in [
    tcp        0      0 127.0.0.1:32401         0.0.0.0:*               LISTEN      2069/Plex Media Ser
    tcp        0      0 127.0.0.1:32600         0.0.0.0:*               LISTEN      2347/Plex Tuner Ser
    tcp6       0      0 :::32400                :::*                    LISTEN      2069/Plex Media Ser

    The system is not listening on 0.0.0.0 –

    At a total loss. I’m trying to set up Plex on an Ubuntu 16.04 LTS server, have a Raspberry Pi, a Windows 8.1 and a Windows 7 (I know) laptop available for this initial setup.

    This is one of the multiple reasons why I have been using kodi/OSMC for as long as I have…

    The next step is trying to figure out how to make plex work with my substantial media library without totally hosing the preexisting shares/users/permissions. If Plex is as fun with permissions as it has been during these first ten minutes, I’m going to stick with kodi!

  • Basic Brian
    4 years ago

    Been following the guide. Unfortunately I’m getting stuck at the point where I can add media to the library. I’ve decided to do this on an old laptop I have that has two drive bays, an A drive and a B drive. I’ve installed the OS on the A drive and have the B drive connected as well for additional space. I already had all my movies and TV shows on the B drive formatted ntfs from my previous version of my media server, so I figured I could just mount that. I get down through the process of getting things setup, but when I attempt to browse to the correct media folder, I can see the name of the drive and the path to it (the drive is named “Main”, the mount point is “/media/fam/Main”) but it doesn’t show the contents of the drive at all (no Movies folder or anything). Instead of navigating, I manually enter in the path, /media/fam/Main/Movies, still nothing. I add the library, but it finds no files. I followed your suggestion to give “plex” read/write access, this doesn’t help. I’ve ensured the drive is mounted and it does appear to be available, partition /dev/sda1. Since it was NTFS I decided maybe it was the format, so I moved all the videos off of the drive and formatted it to ext4. Then I moved just the movies onto Main and put the TV shows into the generic Videos folder on the primary drive where the OS is installed. I tried navigating to and adding the TV Shows library and that added instantaneously. I didn’t have to do anything for it to work, I can see all my shows in the Plex library. I’ve been trying again with the movies on the 2nd drive, Main and it just won’t show up. Not sure what else to try, I can’t see anything wrong, but than again, I am pretty new to Linux still so it could be something I missed that someone else would have known to do already.

  • Can take a look here: https://github.com/JustGoodOldHaroldHere/PlexConfiguration

  • I love this website so much. Thanks

  • I installed this on a headless ubuntu 18 machine. Can access the web ui but dont get any option to setup a server an get a message saying no soup for you. I tried the step to use the port forward an get cant bind address port 8888 in use. I’m using putty on my windows laptop. I think plex doesn’t allow connections unless on the same network. An I’m assuming this is why I’m getting the error no soup for you. Has anyone any pointers to get this working remotely from my windows laptop to my dedicated sever. Any help is greatly appreciated

    • Xiao Guoan (Admin)
      4 years ago

      If port 8888 is already in use on your Windows laptop, then use a different port.

  • In the section Enable HTTPS:
    Next, run the following command to obtain and install TLS certificate.

    sudo certbot –nginx –agree-tos –redirect –hsts –staple-ocsp –email [email protected] -d plex.example.com

    I’m confused. I put one of my emails in, but what do I put for plex.example.com?

    • Xiao Guoan (Admin)
      4 years ago

      You need a registered domain name and create a sub-domain for plex.

  • Steve B
    3 years ago

    FYI when using Plex with Sonos

    I found that I needed to enable UPNP on my router for Plex to be accessible from my Sonos. Bit odd that Sonos needs to talk on the outside.
    Backstory….
    Previously I was using Sonos to directly use my MP3 library that was shared on Ubuntu 18.04. On Upgrade to 20.04 CIFS\SMB 1.0 is no longer supported as it is insecure. But Sonos Local Library ONLY supports smb1.0 – despite many threads nagging them.
    So I decided to use Plex as the go-between. Seems to work OK and the album art is good.

  • This application is at 192.168.0.1 and is not hosted by Plex. Continue only if you recognise this server and wish to grant access.

  • latestmodapks
    11 months ago

    Plex is a great media server for organizing and streaming your media. It’s easy to set up and use, and can be installed on Ubuntu 18.04 LTS servers or desktops.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here