how to install plex media server on ubuntu server

Plex Media Server is a powerful and flexible multimedia solution that allows users to organize and stream their audio and video files seamlessly over a home network or the internet. With smart categorization and a user-friendly interface, Plex offers an outstanding experience for watching movies, series, music, and even photos. Beyond simply a streaming system, Plex provides features like access control, customizable libraries, and content sharing with others.

Ideal for those who want their media collection accessible anytime, Plex can be installed on various devices, including smart TVs, mobile phones, computers, and media players, with access through either its web interface or dedicated Plex apps. In summary, Plex Media Server is an excellent choice for those seeking a comprehensive and personalized solution to manage and stream their multimedia content.

Installing Required Dependencies

Before installing Plex Media Server on Ubuntu, you need to install a few prerequisites to ensure that the server will work correctly without any issues. These prerequisites include basic software packages and tools essential for Plex to function properly. Typically, this involves updating the repository lists, installing package management tools, and setting up specific dependencies.

To start, make sure your Ubuntu server is up-to-date. You can use the following commands to update your system and install the required dependencies:

sudo apt update
sudo apt upgrade

Next, install packages like curl, wget, and ca-certificates to ensure the proper functioning of Plex Media Server. These tools are essential for downloading and managing installation packages from the internet. Use the following command to install these prerequisites:

sudo apt install curl wget ca-certificates -y

After completing these steps, you’re ready to proceed with the next step of downloading and installing Plex Media Server.

Downloading Plex Media Server on Ubuntu

After installing the required dependencies, you can now download the installation file for Plex Media Server. Plex usually provides installation files specifically for Ubuntu and other Linux distributions on its official website. You can visit the Plex website to download the latest version, or you can use command-line instructions to automatically retrieve the suitable version.

To download the latest version of Plex Media Server, use the following command. This command directly downloads the .deb installation file from the Plex server:

wget https://downloads.plex.tv/plex-media-server-new/latest.deb

This command will download the installation file to the current directory. If the download link has changed, you can update it from the Plex website or visit their download page to get the new link.

After downloading the installation file, the next step is to proceed with the installation on your system.

Installing Plex Media Server

After downloading the Plex Media Server installation file, you are ready to install it on Ubuntu. The downloaded file is in .deb format, which you can easily install using the dpkg tool. To do this, use the following command:

sudo dpkg -i latest.deb

This command will run the installer and set up Plex Media Server on your system. If you encounter any errors related to missing dependencies, you can use the following command to resolve them:

sudo apt --fix-broken install

This command will automatically install any required dependencies and fix the installation issues. Once the installation is complete, Plex Media Server will be active on your system and ready for initial configuration.

To ensure that the Plex service is running correctly, you can check its status with the following command:

sudo systemctl status plexmediaserver

This command will show the service status, letting you know whether Plex is running successfully.

Configuring the Firewall for Plex Access

To access Plex Media Server over the network, you need to open the ports used by Plex on the firewall. By default, Plex uses port 32400 for access via a browser and other devices. Opening this port will allow you to access the Plex server on your local network or even remotely.

To open port 32400 on the ufw firewall (if it’s enabled), use the following command:

sudo ufw allow 32400/tcp

This command specifically opens port 32400 for TCP protocol, which is essential for Plex connections. After running this command, the firewall will allow access to Plex.

After opening the port, you can check the firewall status to ensure that the port is open:

sudo ufw status

This command will display the firewall settings, allowing you to verify that access to port 32400 is permitted.

With these steps completed, you now have network access to Plex Media Server and can access its web interface.

Initial Setup and Accessing the Plex Web Interface

After installation and configuring the firewall, you can now set up Plex Media Server and access its web interface. The Plex web interface allows you to manage the server, add media, and configure various settings. To access the Plex web interface, follow these steps:

    • First, find your server’s IP address. You can use the command hostname -I to view your system’s IP address.
  1. In your browser, enter the server’s IP address followed by port 32400. For example:
http://your_server_ip:32400/web
  • This URL will take you to the Plex web interface.
  1. On your first access to the Plex web interface, you will be prompted to sign in to your Plex account. If you don’t have an account, you can easily create one.
  2. After signing in, you’ll go through the initial setup steps, which include naming the server, setting up sharing preferences, and adding media libraries. You can specify the paths to your media, and Plex will automatically detect and categorize them.
  3. Once you complete these steps, Plex Media Server is ready to use, and you can start managing and streaming your media.

By completing these steps, your initial Plex Media Server setup is done, and you can access your content locally or remotely

Updating Plex Media Server on Ubuntu

To ensure Plex Media Server operates with the latest features and improvements, it’s essential to update it regularly. Plex frequently releases new versions with enhanced features, bug fixes, and improved security. To update Plex Media Server on Ubuntu, follow these steps:

First, make sure to download the latest version of Plex from its official website. You can find the download link on the Plex site or use the wget command:

wget https://downloads.plex.tv/plex-media-server-new/latest.deb

After downloading the .deb file, you can install the new version using the dpkg command. This command will replace the old version with the latest one:

sudo dpkg -i latest.deb

If you encounter any errors or missing dependencies during the installation, use the following command to resolve them:

sudo apt --fix-broken install

Once the update is complete, check the status of Plex Media Server to ensure the new version is running correctly:

sudo systemctl status plexmediaserver

These steps complete the update for Plex Media Server, allowing you to enjoy the latest improvements and features.

Uninstalling Plex Media Server

If you no longer need Plex Media Server or plan to reinstall a newer version, you can easily uninstall it from your Ubuntu system. Follow these steps:

  1. Run the following command to completely remove Plex Media Server and its installation files:
sudo apt remove --purge plexmediaserver -y
  • This command removes Plex Media Server entirely along with its settings and related files.

After uninstalling the program, run the following command to clean up any remaining files and dependencies:

sudo apt autoremove -y
  • This command removes any additional files or packages left behind by Plex.
  1. If you have stored your media files and custom settings in specific directories and no longer need them, you can manually delete them from your system.

By following these steps, Plex Media Server will be fully uninstalled from your Ubuntu system.

Conclusion

Plex Media Server is an all-in-one, user-friendly solution for managing and streaming multimedia content, providing an outstanding experience for accessing movies, music, series, and photos. By installing and setting up Plex on Ubuntu Server, users can share and enjoy their media collections locally and even remotely across various networks.

This guide has walked you through the steps of installation, firewall configuration, initial setup, and updating Plex. Now, you have the tools to run a customized Plex server on Ubuntu, taking full advantage of a powerful multimedia platform. In conclusion, Plex Media Server empowers users to access and manage their digital content in an organized and seamless way, making it an ideal choice for anyone looking to create a personal media server.

Share:

More Posts

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments