This guide walks you through installing Plex Media Server on CentOS, turning your server into a personal media hub. You’ll add the official Plex repository, install the package, and configure basic settings. By the end, you’ll have a working Plex server accessible from your local network.
What You’ll Need
- A CentOS server (7, 8, or 9) with root or sudo access.
- An internet connection to download the package.
- Optional: A static IP address or a hostname for your server.
- Optional: A Plex account (free) to access your library remotely.
Step-by-Step
- Update your system
Runsudo yum update -y(CentOS 7) orsudo dnf update -y(CentOS 8/9) to ensure all existing packages are up to date. - Add the Plex repository
Plex provides an official RPM repository. Create a repo file:sudo tee /etc/yum.repos.d/plex.repo <<EOF
[plex]
name=Plex Repository
baseurl=https://downloads.plex.tv/repo/rpm/
enabled=1
gpgcheck=1
gpgkey=https://downloads.plex.tv/plex-keys/PlexSigningKey.asc
EOF - Install Plex Media Server
Use your package manager to install:sudo yum install plexmediaserver -y(orsudo dnf install plexmediaserver -yon CentOS 8/9). - Enable and start the service
Plex runs as a systemd service. Enable it to start on boot and launch it now:sudo systemctl enable plexmediaserver
sudo systemctl start plexmediaserver - Verify the service is running
Check status withsudo systemctl status plexmediaserver. You should see “active (running)�. If not, check logs withjournalctl -u plexmediaserver. - Open the firewall (if enabled)
If you have firewalld active, allow Plex’s default port (32400):sudo firewall-cmd --permanent --add-port=32400/tcp
sudo firewall-cmd --reload - Access the Plex web interface
Open a browser and go tohttp://your-server-ip:32400/web. You’ll see the initial setup wizard. - Complete the initial setup
Sign in with a Plex account (or create one), name your server, and add media libraries (e.g., Movies, TV Shows) by specifying folder paths on your server. - Optional: Set up remote access
In Plex settings, enable “Remote Access� to allow streaming outside your local network. This requires port forwarding on your router (TCP 32400) and a Plex account.
Common Mistakes
- Using the wrong repository URL – Ensure the baseurl is exactly
https://downloads.plex.tv/repo/rpm/with a trailing slash. - Forgetting to enable the service – If you don’t run
systemctl enable, Plex won’t start after a reboot. - Ignoring the firewall – Even if Plex is running, a firewall can block access. Always open port 32400.
- SELinux blocking access – CentOS has SELinux enabled by default. If you store media in unusual locations, you may need to adjust SELinux contexts. Use
sudo chcon -R -t httpd_sys_rw_content_t /path/to/mediaor set booleans as needed. - Using a weak password for the Plex account – Since Plex can be accessed remotely, use a strong unique password.
Tips
- Use a static IP – Assign a static IP to your server to avoid connection issues when the IP changes.
- Organize your media folders – Plex scans folders you add. Keep movies and TV shows in separate directories for better metadata matching.
- Update Plex regularly – Check for updates with
sudo yum update plexmediaserver(or dnf) to get new features and security fixes. - Back up your Plex configuration – The configuration is in
/var/lib/plexmediaserver/Library. Back it up before major changes. - Use a dedicated user – Plex runs as the
plexuser. Ensure that user has read access to your media directories.
Troubleshooting
- Web interface not loading – Check that the service is running:
systemctl status plexmediaserver. Also verify port 32400 is open:ss -tuln | grep 32400. If not, restart the service. - Permission denied when scanning media – Ensure the
plexuser has execute and read permissions on the media folders. Usechmod -R o+rx /path/to/mediaorchown -R plex:plex /path/to/media(if appropriate). - SELinux errors – If you see “Permission denied� in logs but file permissions are correct, SELinux may be blocking. Temporarily set SELinux to permissive with
setenforce 0to test. If that fixes it, adjust contexts permanently. - Cannot connect remotely – Ensure your router forwards TCP port 32400 to the server’s IP. Also check that Plex’s “Remote Access� is enabled and shows a green checkmark.
- Plex doesn’t start after reboot – Run
systemctl is-enabled plexmediaserver. If it says “disabled�, re-enable it.
Frequently Asked Questions
Do I need a Plex account to use Plex Media Server?
Yes, a free Plex account is required to access the server’s web interface and to use features like remote access and syncing.
Can I install Plex on CentOS 7?
Yes, the official repository supports CentOS 7. Use yum commands as shown. Note that CentOS 7 is EOL, so consider upgrading to a newer version for security.
How do I update Plex after installation?
Run sudo yum update plexmediaserver (or sudo dnf update plexmediaserver). The repository will fetch the latest version.
What port does Plex use?
Plex uses TCP port 32400 for its web interface and remote access. You must open this port in your firewall and router.
Can I run Plex on a headless server?
Yes, Plex is designed to run headless. You manage it via the web interface from any device on your network.
How do I uninstall Plex?
Use sudo yum remove plexmediaserver (or sudo dnf remove plexmediaserver). Optionally, remove the configuration directory /var/lib/plexmediaserver if you want to delete all data.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Mac Start Up Automatically After Power Failure?
- Expose Self-Hosted Service Securely Without Cloudflare Tunnel
- Nano Delivery for Functional Foods: What It Can and Can’t Do4.00
- Disable Apple Watch Turn-by-Turn Vibration While Driving
- Convert Play FLAC in iTunes: Full Guide
- Soda Foundation Charter: What It Means