I wanted to document the instructions shared on Episode 459 to supplement the episode.
On the show, Jeff and I demonstrated how to turn a Raspberry Pi 3 with Raspbian Jessie into a Plex Media Server, giving you the chance to stream your entire video and music library to all your devices.
I won’t get into the full details here, since this is only a supplement to give you some copy-and-paste instructions, but I’d encourage you to watch the video.
What You Need
- A Raspberry Pi 3 Micro Computer. Please consider purchasing it through our store to support what we do: https://cat5.tv/pi
- Raspbian Jessie – A free download from raspberrypi.org
- Obvious stuff like a good MicroSD card, Ethernet cable (preferred as opposed to wifi), keyboard and mouse… etc.
How to Do The Do
Updated February 7, 2018 due to some evolution of the process. These steps are more current than those used in the video (a new video will be coming soon).
- In terminal, upgrade your distro to the latest and greatest.
sudo apt update sudo apt upgrade sudo apt dist-upgrade
- Reboot the Pi.
- Add the ability for apt to use https repositories. If you already have this, it’ll report as “already the current version” and you can move on.
sudo apt install apt-transport-https
- Add the Plex Media Server repository provided by Universität Leipzig.
echo "deb https://dev2day.de/pms/ jessie main" | sudo tee /etc/apt/sources.list.d/pms.list
- Add the GPG key for the repository.
This is the “easy” method (which didn’t work for us because my keyboard was in some weird mode with no pipe character):
wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -
Alternate method (which I had to use on the show since I didn’t have a pipe character… I’ve cleaned it up a bit since the live show so it is cleaner since it was an unexpected twist and I kinda made it seem more confusing than it should):
wget -O /tmp/pms.key https://dev2day.de/pms/dev2day-pms.gpg.key sudo apt-key add /tmp/pms.key
- Update apt.
sudo apt update
- Install Plex Media Server.
sudo apt install plexmediaserver-installer
- Create the default config file so Plex knows what user to operate under.
echo "PLEX_MEDIA_SERVER_USER=pi" | sudo tee -a /etc/default/plexmediaserver sudo chown -R pi:pi /var/lib/plexmediaserver sudo service plexmediaserver restart
(Thanks to Steve for submitting this additional step)
- Reboot one final time.
And there you have it! All the commands we used to get Plex Media Server installed on a Raspberry Pi 3 in a nice clean blog post 🙂
Optional: Use External Storage for Media
From there, we plugged in the USB flash drive (don’t do it! Use a proper external hard drive–this was only a demonstration) and after it mounted we used the following command to see its /dev assignment:
Since our drive was /dev/sda1, and of the filesystem type “fat32” this is what I did to make it work as the media library for Plex Media Server:
sudo nano /etc/fstab
and add the following line:
/dev/sda1 /mnt/library fatfs defaults 0 0
I then created the mountpoint:
sudo mkdir /mnt/library
and made it so it can only be written to if mounted:
sudo chattr +i /mnt/library
and finally, mounted the drive:
sudo mount -a
From there, I could easily add folders on my external drive to Plex using the web interface, which you’ll find on Port 32400 in the /web subfolder on your Pi.
To get my IP address, I brought up the terminal on the Pi and typed:
That showed the IP address of my Pi under “Ethernet”… 192.168.0.105
So to open Plex in my browser, from my computer I entered:
The IP address will most likely be different for yours, and you might even want to set it up as a static IP. Easiest way to do that would be to use your router’s DHCP reservations to hard-set the Pi to something outside your DHCP pool. For me, that’d be 192.168.0.5 or something like that, since the pool seemingly starts at 100.
Good luck, and if you have any questions or comments, please leave them below. Don’t forget, if this has helped you out, or if you just love supporting nice guys who wanna keep giving knowledge for free, please head over to our Patreon page, or throw a bit in the tip jar. Thanks!