An empty Plex library after installation can point to a simple mismatch: the server is up, but its service account cannot read the media path. I wanted to know how Plex links that background process to the library shown in its apps.
You’ll set up Plex to serve the media in the folder you chose, while keeping the files under your control. The key is how the server scans folders and makes the resulting collection available.
What Plex Media Server does on Ubuntu
Plex Media Server runs as a background service on Ubuntu, scans folders you add to a library, and serves that collection to Plex apps, which you manage through Plex Web rather than a separate desktop window.
You can add a library after the package is installed. Plex’s own installation guidance recommends organizing movie and television files in clearly named folders so the library agent can match them.

What you need before installing Plex
Use a supported Ubuntu DEB-based system, an account with sudo access, and an internet connection. If sudo is not configured for your account, review the sudoers setup guide before continuing. Decide which directory will hold your media, but do not change ownership of an existing library just to make Plex see it.
| Requirement | Why it matters |
|---|---|
| Ubuntu with apt | Plex documents its Debian repository for Ubuntu and other DEB-based distributions. |
| sudo privileges | Repository keys, apt sources and the package are installed system-wide. |
| Public Plex release | Plex repository updates do not support Plex Pass preview or beta releases. |
| A media folder | The plex service account needs permission to traverse its parent folders and read the media files. |
If a Plex apt source is already configured, inspect the files under /etc/apt/sources.list.d/ before adding another one. If its URL is downloads.plex.tv/repo/deb, back up and remove that specific Plex source file before adding the current one. A wildcard removal could erase unrelated configuration.
Install Plex from its official Ubuntu repository
I chose the manual setup because it shows which signing key apt trusts and where the repository is configured. Plex also provides an automatic setup script that runs with sudo, while these commands expose each change.
Step 1. Add Plex’s signing key and repository
Install curl and GnuPG if they are missing, then store Plex’s dearmored signing key in apt’s keyring directory. The source entry limits that key to Plex’s repository through the signed-by option. The curl command guide covers its download flags.
sudo apt update
sudo apt install -y curl gnupg2
sudo install -d -m 0755 /etc/apt/keyrings
curl -L https://downloads.plex.tv/plex-keys/PlexSign.v2.key | sudo gpg --yes --dearmor -o /etc/apt/keyrings/plexmediaserver.v2.gpg
echo "deb [signed-by=/etc/apt/keyrings/plexmediaserver.v2.gpg] https://repo.plex.tv/deb/ public main" | sudo tee /etc/apt/sources.list.d/plex.list
I ran GnuPG on Plex’s published key. Its primary fingerprint is 6EFF EB47 8A65 59D7 5C7C 4FE7 06C5 2179 0B9C FFDE, and the signing subkey is B406 F089 7A39 A570 8042 6054 0A05 F1E6 E7AF D573.
Download the key file and ask GnuPG to show its fingerprints, then compare both values with the Plex repository instructions. The screenshot shows the output from these exact commands.
curl -sSO https://downloads.plex.tv/plex-keys/PlexSign.v2.key && gpg --show-keys --with-subkey-fingerprints PlexSign.v2.key

Step 2. Install the Plex Media Server package
Refresh apt’s package index after adding Plex’s source. The repository tracks public releases, so Plex Pass preview and beta builds are outside this update path.
sudo apt update
sudo apt install -y plexmediaserver
APT installs the package and its service unit. Check the service state after installation because package setup does not prove that Plex is running.
Step 3. Check and start the service
Ask systemd for the service state. An active, running line means the process is up. If it is inactive, start it and enable it for the next boot.
sudo systemctl status plexmediaserver
The status image shows systemd output, but its 2021 process IDs and resource figures are not expected values. See the Linux service commands guide if you need to start or enable a unit.

sudo systemctl enable --now plexmediaserver
That command starts the service now and enables its next boot start. If systemd reports a failure, inspect its logs before changing repository or media-folder permissions.
Open Plex Web and add a media library
Plex’s web interface is served on the machine running Plex. Open http://127.0.0.1:32400/web in a browser on that machine, or use the server’s LAN address followed by port 32400 from another device on the same network.
Find the server’s LAN address with the Linux IP address guide before opening Plex Web.
These captures are from 2021. Plex Web labels and control placement can differ, but each image shows the task named in its caption.
Plex’s quick-start flow asks you to sign in or create an account, then opens a setup wizard. This account screen is an illustration of that first sign-in step.

After signing in, continue through the introductory screen to reach the server setup options.

Plex may show an optional Plex Pass offer during setup. A subscription is not required to install the public server package or create a basic library.

Choose a name that helps you identify this server in Plex apps. The screen below illustrates the naming step, not a guarantee of the current layout.

Choose the media type for the library, such as Movies or TV Shows, so Plex applies the matching organization rules.

Use Add Library to create the selected library before browsing to its folder.

Browse to the directory that contains the files for this library. The next screen illustrates the folder picker.

Select the folder that holds these files and confirm Plex can read it before continuing.

The next screen confirms your library type and selected media folder before the wizard advances. Check the path.

Finish the setup wizard after the library path and type are set.

Return to the server home page and check whether Plex has started indexing the library. If it appears empty, troubleshoot the mount and filesystem permissions before rebuilding the library.

I found that an active Plex service can still show an empty library when the service account cannot traverse the media path.
Fix repository and media-folder access problems
Separate package-source errors from library visibility. APT errors happen before the server is installed. A library that opens but contains no files points toward the path, mount or permissions.
| Symptom | Check | Next action |
|---|---|---|
| APT cannot find plexmediaserver | Confirm /etc/apt/sources.list.d/plex.list contains the repo.plex.tv/deb/ public main source, then review apt update output. | Edit the source entry, then run apt update. |
| Signature or key error | Check that the source’s signed-by path matches the installed keyring file. | Repeat the current Plex key setup and inspect the official fingerprint. |
| Service is inactive | Run systemctl status plexmediaserver and inspect the service logs. | Start the service and enable it at boot after fixing the reported cause. |
| Library path opens but files are missing | Check that the mount is present and plex can traverse every parent directory and read the files. | Grant only the required group or ACL access. Avoid recursive ownership changes as a first fix. |
Use a shared group or ACL to grant Plex access while your account keeps ownership, as the chown reference explains. Home-directory parents may still block Plex because Linux checks execute permission on every path component.
namei -l /srv/media
The namei output lists each component’s owner and permissions, so check execute access on parent directories and read access on files.
Give Plex access to the folder, not ownership of your files
A package install does not prove that Plex can read the folder, so test access as the plex account. Keep the media directory under your control and grant the service only the access its scan requires.
sudo -u plex test -r /srv/media && echo "Plex can read the media directory"
Run the check against the directory you added to the library. If it fails, inspect each path component before adjusting group or ACL access.
Plex installation questions
Can I install Plex Media Server with apt on Ubuntu?
Yes. Add Plex’s current Debian repository and signing key, run sudo apt update, then install the plexmediaserver package. Plex’s repository supports public releases, not Plex Pass preview or beta builds.
How do I open Plex Web on Ubuntu?
Open http://127.0.0.1:32400/web on the Ubuntu server itself. From another device on the same network, use the server’s LAN address with port 32400.
Why can Plex not see files in my Ubuntu media folder?
The plex service account needs read permission on the files and execute permission on every parent directory. Check the mount and path permissions before changing file ownership.
