Verified for Ubuntu 24.04 LTS & 22.04 HWE

Build a Rock-Solid Plex Media Server on Ubuntu Linux

Whether you are provisioning a minimal headless Ubuntu Server over SSH or converting an Ubuntu Desktop workstation into a home theater powerhouse, follow our production-tested guides for native APT installation, hardware transcoding, and zero-error storage mounts.

Native .deb (Zero Snap Sandbox Bugs) Intel QSV & NVENC Ready 100% Free Technical Tutorials
# Official Plex APT Repository Quick-Install
curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key \
  | sudo gpg --dearmor -o /usr/share/keyrings/plex.gpg

echo "deb [signed-by=/usr/share/keyrings/plex.gpg] \
  https://downloads.plex.tv/repo/deb public main" \
  | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

sudo apt update && sudo apt install plexmediaserver -y
✓ Active: active (running) on port 32400

Headless Ubuntu Server vs. Ubuntu Desktop (GUI)

Choose the right Ubuntu flavor before you flash your installation media. Both run the exact same Plex Media Server binary, but resource overhead and administration workflows differ.

Architecture Factor Headless Ubuntu Server GUI Ubuntu Desktop
Idle RAM Footprint ~350 MB – 500 MB (Leaves maximum RAM for transcode `/dev/shm` RAM disk) ~1.4 GB – 2.2 GB (GNOME Desktop Environment overhead)
Initial Server Claiming Requires SSH local port tunnel (ssh -L 32400:localhost:32400) Direct via local Firefox/Chrome at http://localhost:32400/web
Storage & Drive Mounting Manual configuration via /etc/fstab using UUIDs Auto-mounts to /media/$USER (requires permission tweak for Plex)
Best Hardware Fit Dedicated mini-PCs (Intel N100/N150), rack servers, cloud VPS, NAS boxes Dual-purpose home PCs, HTPCs connected to a TV, Linux beginners

How to Install Plex Media Server on Headless Ubuntu 24.04 LTS (Without Snap)

Running Plex on a headless Ubuntu Server gives you maximum stability, lower power draw, and zero desktop GUI overhead. While Ubuntu offers a Snap package during installation, experienced Linux admins avoid the Plex Snap because strict filesystem sandboxing frequently blocks external USB drives and hardware transcoding nodes.

Prerequisite Check: Ensure you have SSH access to your Ubuntu machine, a non-root user with sudo privileges, and at least 2 GB of RAM (4 GB+ recommended if transcoding 1080p/4K streams).

Step 1: Add the Official Plex APT Repository

Using Plex's official Debian/Ubuntu repository allows you to update Plex effortlessly alongside your regular system security patches using apt upgrade.

sudo apt update && sudo apt install -y curl gnupg apt-transport-https

curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key | sudo gpg --dearmor -o /usr/share/keyrings/plex.gpg

echo "deb [signed-by=/usr/share/keyrings/plex.gpg] https://downloads.plex.tv/repo/deb public main" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

sudo apt update && sudo apt install -y plexmediaserver

Step 2: Verify the Systemd Service & Open UFW Firewall

Once installed, Ubuntu automatically registers the plexmediaserver daemon under the dedicated plex system user. If you use Uncomplicated Firewall (UFW), allow TCP port 32400:

sudo systemctl enable --now plexmediaserver
sudo systemctl status plexmediaserver --no-pager
sudo ufw allow 32400/tcp

Step 3: Claim Your Headless Server via SSH Tunnel

For security, Plex restricts initial server claiming to localhost connections. Because your server has no monitor or browser, run an SSH local port forward from your personal laptop or desktop:

# Run this on your LOCAL computer, replacing user and server IP
ssh -L 32400:localhost:32400 your_user@192.168.1.50

Keep that terminal window open, open a web browser on your local computer, and navigate to http://localhost:32400/web. Sign in with your Plex account, name your server, and link your media folders. Once claimed, you can close the SSH tunnel and manage the server permanently from https://app.plex.tv.

How to Install Plex on Ubuntu Desktop (GUI Method)

If you are running Ubuntu Desktop (22.04 LTS or 24.04 LTS) on an Intel NUC, older laptop, or home workstation, you can deploy Plex in under five minutes using the graphical interface without touching SSH tunnels.

  1. Download the Official 64-Bit Package: Open Firefox on your Ubuntu desktop and visit plex.tv/media-server-downloads. Select Linux and choose Ubuntu (16.04+) / Debian (8+) - Intel/AMD 64-bit to download the .deb installer into your ~/Downloads folder.
  2. Install via Terminal or App Center: While you can double-click the .deb file to open Ubuntu's graphical installer, installing it via apt automatically resolves missing dependencies and configures the repository cleanly:
cd ~/Downloads
sudo apt install -y ./plexmediaserver_*.deb
  1. Launch the Web Wizard Locally: Because you are already sitting at the host machine, open http://localhost:32400/web directly in your browser. Plex will immediately recognize your local session and prompt you to sign in and create your Movies, TV Shows, and Music libraries.
  2. Prevent Desktop Sleep: Open Ubuntu Settings → Power and set Screen Blank to 5 minutes while changing Automatic Suspend to Off so active family streams don't drop mid-movie.

How to Enable 4K Hardware Transcoding (Intel QuickSync & NVIDIA) on Ubuntu

Software CPU transcoding of a single 4K HEVC HDR stream can pin a modern processor at 100% utilization. Offloading video transcoding to an integrated Intel GPU (QuickSync) or discrete NVIDIA card lets an inexpensive Ubuntu box handle 5 to 10 simultaneous transcodes effortlessly.

1. Grant the Plex User GPU Access

On Ubuntu, GPU render nodes live at /dev/dri/renderD128. Add the plex user to both the render and video groups, then restart the service:

sudo usermod -aG render,video plex
sudo systemctl restart plexmediaserver

2. Modern Intel CPUs (N100 / N150 / 13th–14th Gen) on Older Ubuntu

If you run Ubuntu 22.04 LTS on newer hardware such as an Intel N100 or N150 mini-PC, the stock 5.15 kernel lacks drivers for the integrated GPU. Install Ubuntu's Hardware Enablement (HWE) kernel and reboot:

sudo apt update && sudo apt install -y linux-generic-hwe-22.04
sudo reboot

For discrete NVIDIA GPUs, run sudo ubuntu-drivers autoinstall, reboot, and confirm the card appears with nvidia-smi. Finally, open Plex Web → Settings → Transcoder and check Use hardware acceleration when available. Play a transcoded video and check Activity → Dashboard for the (hw) indicator.

Fixing Empty Plex Libraries: Linux Permissions & Permanent /etc/fstab Mounts

The #1 issue new Ubuntu Desktop users encounter is plugging in an external USB drive, adding /media/username/MediaDrive to Plex, and seeing an empty library. Ubuntu mounts desktop removable media with strict ACL permissions exclusively for your logged-in user—blocking the plex service user from traversing /media/username.

The Clean Production Fix: Mount Under /srv/media

Create a neutral system directory, find your drive's UUID, and configure a persistent mount in /etc/fstab:

# 1. Create clean media mount point
sudo mkdir -p /srv/media

# 2. Identify your external drive's UUID and filesystem type (ext4, exfat, ntfs)
sudo blkid

# 3. Set standard read/execute permissions for Plex
sudo chown -R $USER:plex /srv/media
sudo chmod -R 755 /srv/media

Add your drive's UUID to /etc/fstab (for example: UUID=your-uuid-here /srv/media ext4 defaults,nofail 0 2), run sudo mount -a, and point your Plex libraries to /srv/media/Movies and /srv/media/TV. Including nofail ensures your headless server still boots cleanly even if the USB drive is unplugged.

Frequently Asked Questions

Should I install Plex on Ubuntu using Snap, Docker, or the native .deb package?

Installing the native .deb package via the official Plex APT repository is recommended for most Ubuntu users because it avoids Snap sandboxing permission issues and grants direct access to /dev/dri for hardware transcoding without container device passthrough complexity.

How do I update Plex Media Server on Ubuntu?

Once you configure the official Plex APT repository shown in Guide #1, updating Plex is as simple as running sudo apt update && sudo apt install --only-upgrade plexmediaserver.

How do I check if Plex can read my media folder from the terminal?

Test directory access directly as the plex user by running sudo -u plex ls -la /srv/media/Movies. If that command lists your video files without a "Permission denied" error, Plex will scan them cleanly.