Plex Media Server turns your Ubuntu box into a personal Netflix—movies, TV, music, and photos streamed to phones, TVs, and browsers. Ubuntu does not ship a current Plex package in its default archives; you install from Plex’s official APT repository (repo.plex.tv) or a downloaded .deb (Plex Support — Installation).
This guide covers install Plex on Ubuntu and install Plex on Ubuntu Server: add the repo, install plexmediaserver, verify systemd, open the web UI at http://127.0.0.1:32400/web, configure UFW, fix plex user media permissions, and optional Snap install. Commands below were tested on Ubuntu 25.04.
Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic; amd64; Plex Media Server 1.43.2.10687-563d026ea.
Quick command summary
| Task | Command |
|---|---|
| Add Plex GPG key | curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.v2.key | sudo gpg --dearmor -o /usr/share/keyrings/plexmediaserver.gpg |
| Add APT repo (DEB822) | See Step 2 below |
| Install (recommended) | sudo apt update && sudo apt install -y plexmediaserver |
| Install from .deb file | sudo apt install -y ./plexmediaserver_*.deb |
| Check service | sudo systemctl status plexmediaserver |
| Local web UI | http://127.0.0.1:32400/web |
| SSH tunnel (headless setup) | ssh -L 8888:127.0.0.1:32400 user@SERVER_IP → http://127.0.0.1:8888/web |
| Open firewall port | sudo ufw allow 32400/tcp |
| Grant media access | sudo setfacl -R -m u:plex:rx /path/to/media |
| Snap (optional) | sudo snap install plexmediaserver |
| Remove package | sudo apt remove plexmediaserver |
Prerequisites
- Ubuntu 22.04 LTS, 24.04 LTS, or newer (25.04 tested) on amd64, arm64, or armhf (Plex publishes builds for each).
- sudo and outbound HTTPS to
repo.plex.tv/downloads.plex.tv. - cURL,
gpg, andca-certificatesfor the Plex apt repository setup. - A Plex account (free) for server claim and remote features.
- Organized media before scanning—movies as
Movie Name (Year).ext, TV asShow/Season XX/Show s01e01.ext(Plex naming guide). - Filesystem that supports symlinks/hardlinks (standard ext4/xfs is fine).
What you are installing
| Item | Detail |
|---|---|
| Package | plexmediaserver |
| Service | plexmediaserver.service (systemd) |
| Process user | plex (groups: plex, video, render) |
| Application dir | /usr/lib/plexmediaserver/ |
| Data / metadata | /var/lib/plexmediaserver/ |
| Web port | TCP 32400 |
| Web UI path | /web → setup wizard on first run |
Plex is not the Plex desktop player app—it is the server that hosts libraries and transcodes streams.
Choose an install method
| Method | Best for | Updates |
|---|---|---|
APT repo (repo.plex.tv) |
Ubuntu Server & Desktop (recommended) | sudo apt upgrade plexmediaserver |
Direct .deb download |
Air-gapped or one-off install | Manual re-download |
| Snap | Quick trial | snap refresh plexmediaserver (Snap Store) |
Avoid the legacy downloads.plex.tv/plex-media-server-new/debian one-line source if you can—Plex now publishes current builds from https://repo.plex.tv/deb/.
Step 1: Refresh Ubuntu packages
sudo apt update && sudo apt upgrade -yInstall tools for the signed repository:
sudo apt install -y curl gpg ca-certificatesStep 2: Add the official Plex APT repository (recommended)
Import Plex’s signing key (replaces deprecated apt-key):
curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.v2.key | \
sudo gpg --dearmor --yes -o /usr/share/keyrings/plexmediaserver.gpgCreate the DEB822 source file (Plex repository updating):
printf '%s\n' \
'Types: deb' \
'URIs: https://repo.plex.tv/deb/' \
'Suites: public' \
'Components: main' \
"Architectures: $(dpkg --print-architecture)" \
'Signed-By: /usr/share/keyrings/plexmediaserver.gpg' | \
sudo tee /etc/apt/sources.list.d/plexmediaserver.sources > /dev/nullReload indexes and confirm the candidate:
sudo apt update
apt-cache policy plexmediaserverExample on Ubuntu 25.04:
Get:2 https://repo.plex.tv/deb public InRelease [4,069 B]
Get:6 https://repo.plex.tv/deb public/main amd64 Packages [393 B]
---
plexmediaserver:
Installed: (none)
Candidate: 1.43.2.10687-563d026ea
Version table:
1.43.2.10687-563d026ea 500
500 https://repo.plex.tv/deb public/main amd64 PackagesStep 3: Install Plex Media Server
sudo apt install -y plexmediaserverRelevant installer output:
Setting up plexmediaserver (1.43.2.10687-563d026ea) ...
PlexMediaServer install: PlexMediaServer-1.43.2.10687-563d026ea - Installation successful. Errors: 0, Warnings: 0
Created symlink .../plexmediaserver.service → /usr/lib/systemd/system/plexmediaserver.serviceVerify:
dpkg -l plexmediaserver
sudo systemctl is-enabled plexmediaserver
sudo systemctl is-active plexmediaserverii plexmediaserver 1.43.2.10687-563d026ea amd64 Plex organizes all of your personal media...
enabled
activeConfirm the web listener:
ss -tlnp | grep 32400
curl -sI http://127.0.0.1:32400/web | head -8LISTEN 0 1024 *:32400 *:*
HTTP/1.1 302 Moved Temporarily
X-Plex-Protocol: 1.0
Location: http://127.0.0.1:32400/web/index.html#!/setup/...A 302 redirect to #!/setup/ means Plex is ready for the first-run wizard.
Step 4: Install from a .deb file (alternative)
When you prefer a manual package (Plex Support — Ubuntu):
- Download the latest 64-bit
.debfrom plex.tv/media-server-downloads or resolve the URL from Plex’s API:
curl -sL https://plex.tv/api/downloads/5.json | python3 -c "
import json, sys
data = json.load(sys.stdin)
for r in data['computer']['Linux']['releases']:
if r.get('distro') == 'debian' and r['url'].endswith('.deb'):
print(r['url']); break
"wget -O /tmp/plexmediaserver.deb 'https://downloads.plex.tv/plex-media-server-new/1.43.2.10687-563d026ea/debian/plexmediaserver_1.43.2.10687-563d026ea_amd64.deb'
sudo apt install -y /tmp/plexmediaserver.debTested download size: ~84 MB. Use sudo apt install ./file.deb—not dpkg -i file.deb -y (dpkg does not take -y, and apt install fixes dependencies automatically).
To enable future upgrades after a manual .deb, still add the Step 2 repository.
Step 5: Install via Snap (optional)
sudo snap install plexmediaserverSnap stable on Ubuntu matched the deb version in tests (1.43.2.10687-563d026ea, publisher plexinc). Manage at http://localhost:32400/manage per Snapcraft. Pick either Snap or deb/apt—not both on the same host.
Step 6: Complete Plex Web setup
Ubuntu Desktop
Open a browser on the same machine:
http://127.0.0.1:32400/webUbuntu Server (headless)
From your workstation, tunnel Plex’s localhost port (Plex Support — SSH tunnel):
ssh -L 8888:127.0.0.1:32400 username@SERVER_IPThen browse:
http://127.0.0.1:8888/webWizard steps
- Sign in with your Plex account (create one if needed).
- Name the server (e.g.
ubuntu-plex). - Choose whether to enable remote access (Plex relay) or stay LAN-only.
- Add libraries (Movies, TV Shows, Music, Photos) or skip and add later under Settings → Manage → Libraries.
- Click Finish—Plex begins scanning attached folders.
LAN access from another device
On the same network, use the server’s IP:
http://192.168.1.50:32400/webReplace with your server’s address (ip -4 addr show).
Step 7: Grant Plex access to media folders
Plex runs as user plex. It needs read + execute on every directory in the path to your files:
id plexuid=993(plex) gid=977(plex) groups=977(plex),44(video),991(render)ACL approach (keeps your user as owner):
sudo apt install -y acl
sudo setfacl -R -m u:plex:rx /media/movies
sudo setfacl -d -m u:plex:rx /media/movies
sudo -u plex test -r /media/movies && echo "plex can read media"Ownership approach (dedicated Plex disk):
sudo chown -R plex:plex /media/movies
sudo systemctl restart plexmediaserverWithout correct permissions, libraries stay empty even when paths look right in the UI.
Step 8: Firewall (Ubuntu Server)
If UFW is enabled, allow SSH first, then Plex:
sudo ufw allow OpenSSH
sudo ufw allow 32400/tcp
sudo ufw enable
sudo ufw statusTo Action From
-- ------ ----
OpenSSH ALLOW Anywhere
32400/tcp ALLOW AnywhereReload is automatic on rule add. Remote Plex clients on your LAN can now reach port 32400 directly.
Manage, update, and remove
Service control (systemd):
sudo systemctl start plexmediaserver
sudo systemctl stop plexmediaserver
sudo systemctl restart plexmediaserverUpdate (with Plex repo configured):
sudo apt update
sudo apt install --only-upgrade plexmediaserver -y
dpkg-query -W -f='${Version}\n' plexmediaserverRemove package, keep library data:
sudo apt remove plexmediaserverMetadata remains under /var/lib/plexmediaserver/.
Full removal:
sudo apt purge plexmediaserver
sudo rm -rf /var/lib/plexmediaserver
sudo rm -f /etc/apt/sources.list.d/plexmediaserver.sources
sudo rm -f /usr/share/keyrings/plexmediaserver.gpgTroubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
HTTP/1.1 503 on /web |
Service still starting | Wait 10–30 s; sudo systemctl status plexmediaserver |
| Libraries empty after scan | plex cannot read paths |
ACLs or chown; verify with sudo -u plex ls /media/... |
Unit plexmediaserver.service not found |
Install failed or partial | Reinstall plexmediaserver; sudo systemctl daemon-reload |
403 / unsigned repo on apt update |
Legacy downloads.plex.tv source or bad key |
Switch to repo.plex.tv DEB822 source (Step 2) |
| Cannot complete setup on Server | No browser on host | SSH tunnel ssh -L 8888:127.0.0.1:32400 ... |
| Remote clients cannot connect | UFW blocking 32400 | sudo ufw allow 32400/tcp; check router port forward |
| Two Plex instances conflict | Snap + deb both installed | Remove one method completely |
dpkg: error processing missing deps |
Used dpkg -i alone |
sudo apt install -y ./plexmediaserver_*.deb instead |
| Wrong metadata / unmatched episodes | Folder naming | Follow Plex movie/TV folder layout before scanning |
References
- Plex Support — Installation
- Plex Downloads
- Install plexmediaserver Snap (Ubuntu)
- On-site: Install Plex on Debian 11, apt command, wget command, dpkg command
Summary
The reliable way to install Plex on Ubuntu is Plex’s official repo.plex.tv APT repository: import PlexSign.v2.key, add the DEB822 plexmediaserver.sources file, run sudo apt install -y plexmediaserver, then open http://127.0.0.1:32400/web. On Ubuntu Server, tunnel with ssh -L 8888:127.0.0.1:32400 for first-time setup.
Tested install: 1.43.2.10687-563d026ea, service enabled/active, port 32400 listening, web UI returning 302 to the setup wizard. Grant the plex user read access to media, open 32400/tcp in UFW for LAN clients, and use apt upgrade for updates.

