Setting up a Plex Media Server on Ubuntu not only organizes your media collection but also allows you to stream it to various devices, both locally and remotely. Ubuntu's robust, user-friendly, and open-source nature makes it an excellent choice for this task.
Before we proceed, ensure your Ubuntu system is up-to-date. Open a terminal and run the following commands:
Installing Plex Media Server
To begin, we'll add the Plex repository to your system's sources list and install the Plex package.
In the terminal, run:
wget -P /tmp/ https://downloads.plex.tv/plex-2.74.6-588b265f0-linux-x86_64.tar.gz
sudo mkdir -p /opt/plex
sudo tar -C /opt/plex --strip-components 1 -xzf /tmp/plex-*.tar.gz
sudo ln -s /opt/plex/PlexMediaServer /usr/bin/plex
sudo chown -R root:plex /opt/plex/
sudo chmod -R 775 /opt/plex/
Now that Plex is installed, let's configure it.
Setting Up Plex Media Server
Start the Plex server with the command:
sudo /usr/bin/plex
Your browser should open automatically with the Plex setup page. If not, navigate to
Complete the setup, create a Plex account if you don't have one, and sign in.
Setting Up Your Media Libraries
Next, you'll need to tell Plex where to find your media files. Click on "Add New Library". Choose the type of library (Movies, TV Shows, Music, etc.) and select the folder containing your media files.
You can personalize your library by adding posters, fan art, and other metadata. You can also limit the content to specific device/release year, etc.
Accessing and Managing Your Server Remotely
To access your Plex server remotely, you'll need to set up port forwarding on your router and enable remote access in Plex.
In Plex, go to Settings > Server > Remote Access and click "Connect". Follow the on-screen instructions to connect and verify your server.
Installing Plex Companion App
To manage your server and stream content, install the Plex Companion app on your devices. It's available on various platforms, including iOS, Android, Windows, and macOS.
Log in to the app using your Plex account, and you'll see your server along with all the content you've made available.
There you have it! Your Plex Media Server is now set up and ready to stream your movies, TV shows, and music. Happy watching! Remember to keep your server and Ubuntu system up-to-date for the best performance and security.