How to create a Plex Server on Raspberry Pi 4

Plex is a great toolkit, a media server software that allows you to stream movies and TV shows directly to any Plex client. Learn how to build an independent Plex server from your Raspberry Pi 4 and hard drive.

Plex is a great toolkit, a media server software that allows you to stream movies and TV shows directly to any Plex client. The Plex client can be a page in a browser on a computer, an app on a tablet or phone, an Android TV box or even an app on a Smart TV.

Either way, this server software is neat, flexible and fast, helping to keep your movie and program collection organized and accessible.

In this article, TipsMake.com will read the feasibility of creating and actually building an independent Plex server from Raspberry Pi 4 and a hard drive with readers.

How to create a Plex Server on Raspberry Pi 4 Picture 1How to create a Plex Server on Raspberry Pi 4 Picture 1
Create Plex Server on Raspberry Pi 4

Create a Pi Plex server

To build this server, you need the following:

  1. A Raspberry Pi 4 (preferably placed in a case with a heat sink or cooling fan)
  2. USB C power (preferably official power)
  3. SD card has sufficient capacity
  4. Ethernet cable or WiFi
How to create a Plex Server on Raspberry Pi 4 Picture 2How to create a Plex Server on Raspberry Pi 4 Picture 2
USB power C

First, install Raspbian on the card. Download the image here and burn it to the SD card with the appropriate software, such as the great multi-platform balenaEtcher.

Insert the SD card into the Pi as usual and launch it.

Prepare Pi

When you see a command prompt, enter it with the ID pi and password raspberry to log in to the Pi.

Now, you need to make sure that the Pi is fully updated. Type the following:

 sudo apt-get update sudo apt-get upgrade 

Then you should reboot.

How to create a Plex Server on Raspberry Pi 4 Picture 3How to create a Plex Server on Raspberry Pi 4 Picture 3
You should reboot

Now you need to download the correct repository containing Plex server for Raspberry Pi Linux. Enter the following command:

 sudo apt-get install apt-transport-https 

Before you can download a Plex repo, you must add the Plex GPG key or PlexSign.key directly to the repo with the following commands:

 curl https://downloads.plex.tv/plex-keys/PlexSign.key sudo apt-key add - 

Now the key has been added. You can download server software with the following commands:

 echo deb https://downloads.plex.tv/repo/deb public main sudo tee /etc/apt/sources.list.d/plexmediaserver.list 

Once that is done, you need to run the update command again to refresh Pi:

 sudo apt-get update 

Once that is done, you should be able to install server software on the Pi.

Install Plex server

The software installation itself is fairly easy. Just enter:

 sudo apt-get install plexmediaserver 

And if the repo is in place, the software will be installed easily and normally. Now, you need to make sure that the IP address on the network is still static. First, you do this by finding out what the current IP address is, then editing the cmdline.txt file .

Find your current IP address by typing:

 hostname -I 

In the example case, the IP address is 192.168.0.53.

Now open the file cmdline.txt and edit it. Open nano editor and file by typing:

 sudo nano /boot/cmdline.txt 

. and add the line:

 ip=IP CỦA BẠN 

. at the bottom of this file and save it with Ctrl + X (Enter Y at the prompt.)

Now type:

 reboot 

Pi will reboot. The setup is complete and the Pi can now run a headless Plex server (without the need for a monitor). Use Plex client or access by web browser to port 32400 as follows:

 192.168.0.53:32400/web/ 

Where the first part is your IP address.

If you succeed, the server will display as one of the options.

How to create a Plex Server on Raspberry Pi 4 Picture 4How to create a Plex Server on Raspberry Pi 4 Picture 4
The server will display as one of the options

Finally, you can add media files. Selecting the type of movie library or TV show will change the way files are organized in a database.

How to create a Plex Server on Raspberry Pi 4 Picture 5How to create a Plex Server on Raspberry Pi 4 Picture 5
Selecting the library type will change the way the database is organized
4.5 ★ | 6 Vote