Sei sulla pagina 1di 8

Install Plex Media Server Ubuntu

16.x and Later

Install Plex Media Server Ubuntu 16.x for your home media server. Ubuntu 16.04 LTS
(long-term support) was released the other day and I wanted to make sure Plex is
working on it. Plex has grown in popularity because of its ease of use, people think its
interface is Netflix-like. I have set up Plex for friends and family because even nontechies are able to navigate and use Plex with ease. Another reason for Plexs
popularity is the amount of clients they support: Chromecasts, iPad, iPhone, Android
tablets, Roku, Raspberry Pi RasPlex and even older hardware youve re-purposed as
an HTPC. Lets install Plex Media Server Ubuntu 16.x in using the official Plex
repository. In this tutorial I have also outlined how to fix Plex permissions so if your Plex
cant see your video folders on your hard drive then you will be able to solve that
problem here.

Install Plex Media Server Ubuntu 16.x and Later


Add the Plex repository GPG key and add Plex the plex repository, you can copy and
paste the whole block into your SSH session
If you get the key is not found error then it may have changed name, find the .key file
from here and replace it in the wget line
wget -O - http://shell.ninthgate.se/packages/shell.ninthgate.se.gpg.key | sudo
apt-key add echo "deb http://shell.ninthgate.se/packages/debian jessie main" | sudo tee -a
/etc/apt/sources.list.d/plex.list
sudo apt update

Install the Plex Media Server on Ubuntu 16.x and later


sudo apt install plexmediaserver y

See if you can connect at http://ip.address:32400/web


or http://ip.address:32400/manage/index.html#!/setup
Plex Media Server will autostart on boot.

Fix Plex Permission Issues


If you are getting permission issues it is because Plex runs as its own user, there are
two options: change permissions of the downloads folders or change the user Plex runs
as you can do both but option 1 should suffice.
If Plex isnt showing your folder so you can add you videos then this will fix it.

Option 1
To change permissions of your media folders, first add the plex user to your main users
group
sudo usermod -aG htpcguides plex
Then set the permissions of your media folders to 775 so your group (and the plex user
member of that group) can execute files
sudo chmod -R 775 /path/to/media

Option 2
You can change the user Plex Media Server runs as to fix the permission issues you get
from CouchPotato, SickRage, Sonarr, Headphones and others.
sudo nano /etc/default/plexmediaserver
Find this line that tells the init.d script which user to run Plex as
PLEX_MEDIA_SERVER_USER=plex
Change plex to your regular user e.g. htpcguides
PLEX_MEDIA_SERVER_USER=htpcguides
Ctrl+X, Y and Enter to save the configuration

Now tell the Plex systemd service to use the same user we just modified in the
/etc/default/plexmediaserver file
Using this method the Plex user will not change back after you update Plex
sudo mkdir -p /etc/systemd/system/plexmediaserver.service.d
sudo nano /etc/systemd/system/plexmediaserver.service.d/local.conf
Add these lines, the blank user and group lines are to reset the value of the user and
group Plex is running as in the systemd script
[Service]
User=
User=htpcguides
Group=
Group=htpcguides
Ctrl+X, Y and Enter to save

Restart the Plex Media Server service


sudo systemctl daemon-reload
sudo service plexmediaserver restart
Plex not being able to access your files or the folder appearing as blank in the Plex web
interface should now be solved.

Now you can Configure Plex Media Server


Consider using Dynamic DNS to access Plex and avoid problems when using plex.tv

How to Share Folders in Ubuntu & Access them from Windows 7

Enable File Sharing & Configure the Workgroup


In order for Ubuntu and Windows 7 to share files, they have to be configured to be part
of the same Workgroup. Also, file sharing needs to be enabled in Ubuntu.
To change your Windows 7 workgroup, see: How to Change the Workgroup in Windows
7 & Windows 8.
To configure Ubuntu, see: How to Enable File Sharing & Change the Workgroup in
Ubuntu Linux.
Once these items are set up correctly, proceed with this tutorial.
How to Share Folders in Ubuntu

First, open the Home Folder in Ubuntu, found in the Places menu.

Browse to the folder you want to share. Right-click on it to open the contextual menu
and click on Sharing Options.

The Folder Sharing window will open. Check the box next to Share this folder. Then, in
the Share name field, type the share name you want to use. In the Comment field type
anything you want or just leave it empty - theres no need to complete it. If you want to
allow others to create and delete files in the folder you are sharing, check the box next
to Allow others to create and delete files in this folder. Also, if you want to allow Guest
access, check the box next to Guest access (for people without a user account). When
done, click on Create Share to actually share the folder.

If you have selected the option Allow others to create and delete files in this folder a
pop-up shows up, asking if you want to add some permissions to the folder you are
sharing. Click on the Add the permissions automatically button. Now, the folder is
shared with the rest of the network.

Note: We recommend that you only share folders found or created in the Home
Folder because those are folders on which your username has ownership. If you try to
share a folder outside the Home Folder, you will receive the following error
message: net usershare returned error 255: net usershare add: cannot share path as
we are restricted to only sharing directories we own." This error appears because you
dont have ownership on those folders. In order to share any of them you have to go
through a complicated procedure that has the potential to add security risks to your
Ubuntu computer.

Access Ubuntu Shared Folders from Windows 7

After you shared a folder in Ubuntu, lets see how to access that folder from a Windows
7 computer.
Open Windows Explorer. Click on Network to view a list with all computers available
(turned on at that time) in the network.

Double click the Ubuntu computer you want to access. A list with all the shared folders
and devices from that computer opens.

Double click the folder that you want to access. If you havent setup the shared folder to
allow Guest access, you are asked to introduce a username and password.
In the first input field, type the name of the Ubuntu computer followed by a backslash
(\") and the name of the user account with access to the shared folder. In the second
input field type the password. If you want Windows to remember your username and
password, check the box next to Remember my credentials. When done, click on OK.

Now the content of the shared folder is shown.

Conclusion

On a network with Windows 7 and Ubuntu computers, you can configure Ubuntu to
share files and folders which are easily accessible from a Windows PC. If you want to
know more about setting up other PCs on a local network, or how to further utilize the
networking features between Ubuntu Linux and Windows 7, check out the articles listed
below.

Potrebbero piacerti anche