Plex Media Server lets you stream your personal media collection – movies, TV shows, music, and photos – to any device on your network or remotely. This guide walks through installing and configuring Plex Media Server on RHEL 10, Rocky Linux 10, or AlmaLinux 10.
I have been running Plex on RHEL-based systems for years. The setup is straightforward if you follow the steps in order and pay attention to SELinux and firewall configuration.
Prerequisites
Before you begin, make sure you have:
- A running RHEL 10, Rocky Linux 10, or AlmaLinux 10 system
- Root or sudo access
- A free Plex account – sign up at plex.tv if you do not have one
- A stable internet connection for the initial setup
- Storage space for your media files
Update your system packages first:
sudo dnf update -y
Step 1: Add the Official Plex Repository
Plex provides an official YUM/DNF repository. Create the repo file:
cat << 'EOF' | sudo tee /etc/yum.repos.d/plex.repo
[PlexRepo]
name=PlexRepo
baseurl=https://downloads.plex.tv/repo/rpm/$basearch/
enabled=1
gpgkey=https://downloads.plex.tv/plex-keys/PlexSign.key
gpgcheck=1
EOF
Verify the repository was added:
sudo dnf repolist | grep -i plex
Expected output:
PlexRepo PlexRepo
Step 2: Install Plex Media Server
Install the package from the Plex repository:
sudo dnf install plexmediaserver -y
Verify the installation:
rpm -qi plexmediaserver
This prints the package version, release, and other metadata confirming a successful install.
Step 3: Enable and Start the Plex Service
Enable the service so it starts automatically on boot, then start it:
sudo systemctl enable --now plexmediaserver
Verify it is running:
sudo systemctl status plexmediaserver
You should see active (running) in the output. If the service failed to start, check the logs:
sudo journalctl -u plexmediaserver --no-pager -n 50
Step 4: Configure the Firewall
Plex Media Server uses port 32400/tcp for its web interface and streaming. Open it in firewalld:
sudo firewall-cmd --permanent --add-port=32400/tcp
sudo firewall-cmd --reload
Verify the port is open:
sudo firewall-cmd --list-ports
You should see 32400/tcp in the output.
If you also want local network discovery and DLNA to work, open these additional ports:
sudo firewall-cmd --permanent --add-port=1900/udp
sudo firewall-cmd --permanent --add-port=5353/udp
sudo firewall-cmd --permanent --add-port=8324/tcp
sudo firewall-cmd --permanent --add-port=32410-32414/udp
sudo firewall-cmd --reload
Step 5: SELinux Considerations
RHEL 10 and its derivatives run SELinux in enforcing mode by default. Plex typically works fine without changes, but if your media files are stored outside standard locations, SELinux may block access.
Check the current SELinux status:
getenforce
If Plex cannot read your media files, set the correct SELinux context on your media directory. For example, if your media is stored in /data/media:
sudo semanage fcontext -a -t public_content_t "/data/media(/.*)?"
sudo restorecon -Rv /data/media
You need the policycoreutils-python-utils package for the semanage command:
sudo dnf install policycoreutils-python-utils -y
If you run into persistent SELinux denials, check the audit log for details:
sudo ausearch -m avc -ts recent | grep plex
Then generate and apply a custom policy module if needed:
sudo ausearch -m avc -ts recent | audit2allow -M plex_custom
sudo semodule -i plex_custom.pp
Do not disable SELinux entirely. It is a critical security layer. Always fix specific denials instead.
Step 6: Initial Web Setup
Open your browser and navigate to:
http://<your-server-ip>:32400/web
If you are configuring from the server itself, use:
http://localhost:32400/web
Important: For the initial setup, Plex requires you to access the web interface from localhost. If you are setting this up on a remote server with no desktop environment, create an SSH tunnel from your local machine:
ssh -L 32400:localhost:32400 user@your-server-ip
Then open http://localhost:32400/web in your local browser. Sign in with your Plex account and follow the setup wizard:
- Give your server a friendly name
- Skip or configure the initial library setup (we will add libraries in the next step)
- Complete the wizard
Step 7: Add Media Libraries
First, make sure the plex user can read your media directories. The Plex service runs as the plex user:
sudo chown -R plex:plex /data/media
Or if you want to keep your existing ownership, add the plex user to the appropriate group and set group read permissions:
sudo usermod -aG your-media-group plex
sudo chmod -R g+rX /data/media
sudo systemctl restart plexmediaserver
Now add libraries through the web interface:
- Click the + icon next to “Libraries” in the left sidebar
- Select the library type – Movies, TV Shows, Music, Photos, or Other Videos
- Click Browse for media folder and select the path to your files
- Click Add Library
Plex will scan the folder and pull in metadata automatically. For best results, organize your media following Plex naming conventions:
- Movies:
/data/media/Movies/Movie Name (Year)/Movie Name (Year).mkv - TV Shows:
/data/media/TV Shows/Show Name/Season 01/Show Name - S01E01.mkv
Step 8: Configure Remote Access
Remote access lets you stream your media from outside your local network.
- In the Plex web interface, go to Settings (wrench icon) then Remote Access
- Click Enable Remote Access
- If your server is behind a router, you need to forward port 32400/tcp to your server’s internal IP
- Plex will test the connection and show a green checkmark if remote access is working
If automatic port mapping fails, manually specify the external port in the Remote Access settings and configure port forwarding on your router.
Verify remote access works by visiting app.plex.tv from a different network.
Troubleshooting
Plex service fails to start
Check the logs for errors:
sudo journalctl -u plexmediaserver -xe --no-pager
Common causes include permission issues on the Plex data directory. Fix with:
sudo chown -R plex:plex /var/lib/plexmediaserver
Cannot access the web interface
Confirm the service is running and the port is open:
sudo systemctl status plexmediaserver
sudo ss -tlnp | grep 32400
sudo firewall-cmd --list-ports
If ss shows nothing listening on 32400, the service is not running properly. Restart it and check the logs.
Media files not showing up
This is almost always a permissions issue. Verify the plex user can read the files:
sudo -u plex ls -la /data/media/
If you get “Permission denied”, fix the ownership or group permissions as shown in Step 7. Also check for SELinux denials as described in Step 5.
Remote access not working
Verify port 32400 is reachable from outside your network. From an external machine:
curl -I http://your-public-ip:32400/web
If that times out, check your router’s port forwarding configuration and any cloud provider firewall rules (security groups, network ACLs).
Plex using too much CPU during transcoding
If your server struggles with transcoding, try:
- Adjusting the transcoding quality in Settings – Transcoder
- Using Direct Play/Direct Stream on your clients when possible
- Storing media in formats your client devices support natively (H.264 MP4 is the most compatible)
Updating Plex Media Server
Since we installed from the official repo, updates come through dnf:
sudo dnf update plexmediaserver -y
sudo systemctl restart plexmediaserver
Conclusion
You now have Plex Media Server running on your RHEL 10, Rocky Linux 10, or AlmaLinux 10 system. The server will start automatically on boot, the firewall is configured to allow access, and SELinux is set up to permit Plex to read your media files. Point your Plex clients at your server and start streaming.




























































