Updated: 18 October 2026 · Applies to: Plex Media Server 1.43.4 on AlmaLinux 10.2 and 9.8 and Rocky Linux 9.8 (tested); replaces the old CentOS 8 guide
CentOS Linux 8 reached end of life on 31 December 2021, so install Plex on AlmaLinux or Rocky Linux 9 or 10 instead. Add Plex's official repository, install the plexmediaserver package, open TCP port 32400 in firewalld and finish the setup in your browser at http://SERVER:32400/web (through an SSH tunnel on a remote server). For Ubuntu, Debian and Linux Mint, follow how to install Plex Media Server on Ubuntu, Debian and Linux Mint.
Before you start
- rpm 4.16 or newer. According to Plex, its RPM repository needs rpm 4.16 or later. AlmaLinux and Rocky 9 have rpm 4.16.1.3, version 10 has 4.19.1.1. Version 8 (the CentOS 8 generation) is too old: on AlmaLinux 8.10 with rpm 4.14.3 the install stopped with
Problem opening package plexmediaserver-1.43.4.10903-e5521bd8c.x86_64.rpmandError: GPG check FAILED. Move such servers to version 9 or 10 first, with a fresh install or AlmaLinux's ELevate in-place upgrade. - systemd must be running. The package refuses to install when systemd is not process 1, for example in a plain container:
Plex Media Server requires systemd. Please upgrade the Operating Sytem version error: %prein(plexmediaserver-1.43.4.10903-e5521bd8c.x86_64) scriptlet failed, exit status 1
A normal VPS or dedicated server is fine. For containers, Plex publishes its own image,plexinc/pms-docker. - Plex changed its repository with version 1.43.0. If you set up the old
downloads.plex.tv/repo/rpmrepository earlier, remove it first:sudo rm -f /etc/yum.repos.d/plex*.
1. Add the Plex repository and install
- Create the repository file (content from Plex's instructions):
sudo tee /etc/yum.repos.d/plex.repo <<'EOF' [PlexTv] name=Plex.tv baseurl=https://repo.plex.tv/rpm/ enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://downloads.plex.tv/plex-keys/PlexSign.v2.key EOF
- Install the package and accept the key when asked:
sudo dnf install plexmediaserver
On AlmaLinux 10.2 the key prompt and result looked like this:Importing GPG key 0x0B9CFFDE: Userid : "Plex Inc. (SHA-512)" Fingerprint: 6EFF EB47 8A65 59D7 5C7C 4FE7 06C5 2179 0B9C FFDE From : https://downloads.plex.tv/plex-keys/PlexSign.v2.key ... plexmediaserver x86_64 1.43.4.10903-e5521bd8c PlexTv 102 M ... Created symlink '/etc/systemd/system/multi-user.target.wants/plexmediaserver.service' → '/usr/lib/systemd/system/plexmediaserver.service'. Complete!
The fingerprint matches the one Plex publishes (6EFFEB478A6559D75C7C4FE706C521790B9CFFDE). On version 9, dnf shows the signing subkey instead (0xE7AFD573, fingerprint ending0A05 F1E6 E7AF D573), which Plex also lists. - The package enables and starts the service by itself. Check it (output shortened, server ID replaced with ...):
$ systemctl status plexmediaserver --no-pager ● plexmediaserver.service - Plex Media Server Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; preset: disabled) Active: active (running) $ curl -s http://127.0.0.1:32400/identity <MediaContainer size="0" apiVersion="1.2.3" claimed="0" machineIdentifier="..." startState="startingPlugins" version="1.43.4.10903-e5521bd8c">
Plex runs as the system user plex and keeps its database and settings in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/. Back up that folder; it holds your libraries and watch history.
2. First setup on a remote server
According to Plex, when your browser is on a different network than the server, the first setup needs an SSH tunnel so that Plex sees you as local (the test server sent /web straight to a #!/setup/ page). Open the tunnel from your computer, browse to http://127.0.0.1:8888/web, sign in to your Plex account, name the server and add libraries. After the setup, you no longer need the tunnel:
ssh -L 8888:127.0.0.1:32400 alice@203.0.113.10
3. Open the firewall (firewalld)
Plex listens on all addresses (0.0.0.0:32400 in the test). TCP 32400 is the only port Plex requires. For a server with a public IP address, open only that port:
sudo firewall-cmd --permanent --add-port=32400/tcp sudo firewall-cmd --reload
firewalld also ships a plex service (found in firewalld 1.3.4 on version 9 and 2.4.3 on version 10), but it opens the discovery and DLNA ports as well. Plex very strongly recommends not opening those extra ports on a machine with a public IP address, including servers in a data centre, so use the service only on a home network:
$ firewall-cmd --info-service=plex plex ports: 32400/tcp 32400/udp 32469/tcp 3005/tcp 8324/tcp 32410/udp 32412/udp 32413/udp 32414/udp includes: ssdp
To allow Plex only from your own address, see how to enable a port for a specific IP address in firewalld.
4. Give Plex access to your media
The plex user must be able to read every media folder. Home folders on AlmaLinux and Rocky are private (mode 700), so a library in /home/alice/Videos fails:
$ sudo -u plex ls /home/alice/Videos ls: cannot access '/home/alice/Videos': Permission denied
Keep media in a shared folder instead, owned by you with the plex group:
sudo mkdir -p /srv/media/Movies "/srv/media/TV Shows" sudo chown -R alice:plex /srv/media sudo chmod -R 2750 /srv/media
The 2 (setgid) makes new files and folders inherit the plex group, so Plex can read what you add later.
5. SELinux
Leave SELinux enforcing. In the targeted policy, systemd starts Plex through /bin/sh (labelled shell_exec_t), which runs in the unconfined initrc_t domain, so SELinux labels do not block its media folders; normal file permissions decide (checked with sesearch and seinfo on AlmaLinux 10.2). The package also loads a small module, plexrsync, which only lets rsync write under /var/lib. You do not need chcon on your media. If something is still denied, look for AVC messages with ausearch -m avc -ts recent or setroubleshoot.
6. Updates
Plex updates arrive with the system updates: sudo dnf upgrade. The package stops Plex during an upgrade and starts it again if it was running. According to Plex, the repository carries public releases only, not Plex Pass beta versions.
Converting video for a device (transcoding) runs on the CPU unless you use hardware acceleration, which according to Plex needs an active Plex Pass and an Intel processor with Quick Sync Video or an NVIDIA GPU (the package already adds the plex user to the video group). For a server that is online all the time, a KVM VPS suits small libraries and direct play, while a dedicated server gives you the CPU and storage for larger libraries. Prefer open source? See how to install Jellyfin.
Official documentation: Plex Media Server container image (plexinc/pms-docker) and CentOS Linux end of life. Plex's repository instructions are in its support article "Enable repository updating for supported Linux server distributions".