How to Setup a Raspberry Pi Plex Server

Ben
Ben
@benjislab

Setting up a Plex server on a Raspberry Pi is a cost-effective way to stream your media collection to various devices within your home network. Plex is a popular media server that organizes your personal media libraries and streams them to any device from where you have an internet connection. This guide will walk you through the steps to set up a Plex server on your Raspberry Pi.

Equipment Needed

  • Raspberry Pi 3 or later (preferably Raspberry Pi 4 for better performance)
  • MicroSD card with Raspberry Pi OS installed
  • External hard drive or USB stick with your media collection
  • Internet connection
  • Access to the command line (via monitor and keyboard or SSH)

Step 1: Install Raspberry Pi OS

If you haven't already, you'll need to install the Raspberry Pi OS on your MicroSD card. You can download the Raspberry Pi Imager from the official Raspberry Pi website. Follow the instructions to install the OS on your MicroSD card.

Step 2: Update and Upgrade Your Raspberry Pi

Before installing Plex, ensure your Raspberry Pi is up to date.

  1. Open a terminal on your Raspberry Pi or SSH into it.
  2. Run the following commands to update and upgrade your system:
sudo apt update
sudo apt upgrade -y

Step 3: Install Plex Media Server

To install Plex Media Server, you need to add the Plex repository to your Raspberry Pi.

  1. Download the Plex Media Server package from the official Plex website. Replace <version> with the latest version number found on the Plex download page.
wget https://downloads.plex.tv/plex-media-server-new/<version>/debian/plexmediaserver_<version>_armhf.deb
  1. Install the downloaded package:
sudo dpkg -i plexmediaserver_<version>_armhf.deb
  1. If there are dependency issues, run the following command to fix them:
sudo apt --fix-broken install

Step 4: Configure Plex Media Server

  1. After the installation, start the Plex Media Server:
sudo systemctl start plexmediaserver
  1. Enable Plex to start on boot:
sudo systemctl enable plexmediaserver
  1. Open a web browser on your computer and navigate to the following URL to access the Plex web interface. Replace <your_raspberry_pi_ip> with the IP address of your Raspberry Pi:
http://<your_raspberry_pi_ip>:32400/web
  1. Sign in with your Plex account or create a new account if you don't have one.

Step 5: Add Media to Your Plex Library

Now that your Plex server is running, you can add your media library.

  1. Connect your external hard drive or USB stick containing your media files to the Raspberry Pi.
  2. In the Plex web interface, click on the Add Library button.
  3. Select the type of media you want to add (e.g., Movies, TV Shows, Music).
  4. Follow the prompts to browse and add the folder containing your media files.

Step 6: Optimize Your Plex Server

To ensure smooth streaming, you may want to adjust some settings in Plex:

  1. In the Plex web interface, go to Settings > Server > Transcoder.
  2. Adjust the transcoder settings to match the capabilities of your Raspberry Pi. For example, you might want to set the transcoder quality to Prefer Higher Speed Encoding to reduce the CPU load.

Step 7: Access Your Plex Server

You can now access your Plex server from any device with the Plex app installed, such as smartphones, tablets, smart TVs, or streaming devices like Roku or Amazon Fire Stick. Simply sign in with your Plex account, and you'll see your media library ready to stream.

Conclusion

Setting up a Plex server on your Raspberry Pi is an excellent way to centralize and stream your media collection. With this guide, you should have a fully functional Plex server running on your Raspberry Pi, providing you with easy access to your media files from any device. Enjoy your personalized media streaming experience with Plex!