How to Install Plex Media Server on Arch Linux
Want a slick, self‑hosted media hub that runs natively on your Arch box? This walk‑through shows exactly how to pull the official Plex server into your system, get the service running, and tweak a few settings so it behaves like home‑grown software.
Prepare the System
- Update everything – Arch is rolling; a fresh kernel often changes library versions that Plex depends on.
sudo pacman -Syu
- Install required tools – You'll need wget or curl to fetch the installer, and an AUR helper (yay, paru, etc.) if you prefer installing straight from the community package.
sudo pacman -S --needed base-devel git wget
Grab Plex From the Official Repository (AUR)
The most reliable way to stay on top of updates is using the official AUR package plex-media-server. It pulls directly from the Plex site and builds a minimal, systemd‑friendly binary.
yay -S plex-media-server
Why not just download a .tar.xz? The build script ensures the correct ownership (the dedicated plex user) and sets up the service unit for you. It also makes future upgrades trivial – just run yay -Syu.
Enable and Start the Service
Plex runs as its own systemd unit (plexmediaserver.service). Enabling it at boot is a one‑liner:
sudo systemctl enable --now plexmediaserver
You can check status with:
systemctl status plexmediaserver
If the service stalls, look for error logs in /var/log/plex. A common hiccup occurs after kernel upgrades; Plex sometimes tries to use outdated libc libraries. Reinstalling (or restarting) usually clears that.
Open Ports and Configure Firewalls
Plex listens on TCP 32400 by default. If you’re behind UFW or another firewall, allow it:
sudo ufw allow 32400/tcp # Ubuntu/Arch with ufw
Or use firewalld:
sudo firewall-cmd --add-port=32400/tcp --permanent
sudo firewall-cmd --reload
Set Up Your Media Library
- Create a shared folder that Plex can read.
sudo mkdir -p /srv/media
sudo chown plex:plex /srv/media - Tell Plex where to look by editing the settings in its web interface (http://localhost:32400/web).
Add the /srv/media path under “Libraries” → “Add Library.”
No need for complicated ACLs; just give the plex user read/write access to the folders you want to stream.
Optional Tweaks
If you want Plex to store its cache elsewhere or change the default config location, drop an override file:
sudo mkdir -p /etc/systemd/system/plexmediaserver.service.d
cat <<EOF | sudo tee /etc/systemd/system/plexmediaserver.service.d/override.conf
[Service]
Environment=PLEX_MEDIA_SERVER_USER=plex
Environment=PLEX_MEDIA_SERVER_HOME=/srv/media
ExecStart=
ExecStart=/usr/bin/plexmediaserver --home-dir $PLEX_MEDIA_SERVER_HOME
EOF
sudo systemctl daemon-reload
sudo systemctl restart plexmediaserver
This keeps your media out of /var/lib, which is handy if you’re using a separate SSD for storage.
What I’ve Seen Happen
After a major Arch update that bumped glibc to 2.36, my Plex server would launch but immediately throw “library unavailable” errors. Restarting the service after reinstalling pulled in the new library and everything fell into place. The AUR package’s rebuild script is lifesaver for these odd kernel‑upgrade quirks.