Leo
Leo
Docs/home server/media automation/installation/install plex

Last updated Jul 1, 2026

Install & Configure Plex#

This page covers Plex. If you chose Jellyfin instead, see the Jellyfin page — the install process is different.

With the Plex LXC running and storage mounted, install Plex Media Server and connect it to your libraries.

Install Plex on Debian#

Open a shell inside the Plex LXC and run:

apt update && apt install -y curl apt-transport-https
 
# Add the Plex repository key
curl https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor -o /usr/share/keyrings/plex-archive-keyring.gpg
 
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/plex-archive-keyring.gpg] https://downloads.plex.tv/repo/deb public main" \
  | tee /etc/apt/sources.list.d/plexmediaserver.list
 
# Install
apt update && apt install -y plexmediaserver
 
# Enable and start
systemctl enable plexmediaserver
systemctl start plexmediaserver

Verify it is running:

systemctl status plexmediaserver

Claim your server#

Go to https://plex.tv/claim and copy your claim token (it expires after 4 minutes).

Set the token and restart:

PLEX_CLAIM="claim-xxxxxxxxxxxxxxxxxxxx" systemctl restart plexmediaserver

Plex will register the server to your account automatically.

Open the web UI#

From a browser on your LAN:

http://<plex-lxc-ip>:32400/web

The setup wizard will guide you through the initial configuration.

Add media libraries#

In the Plex web UI, go to Settings → Libraries and add:

Library typePath
Movies/mnt/media/movies
TV Shows/mnt/media/tv

These paths match what was mounted in the Mount Storage step.

Plex will scan the directories on startup. They will be empty until Sonarr and Radarr download something.

Automatic library updates#

To make Plex scan immediately when Sonarr or Radarr imports a file:

  1. In Plex, go to Settings → Library and enable "Scan my library automatically"

This triggers an instant library update after each import instead of waiting for a scheduled scan.

Note: this only works if Plex accesses the media files via a local bind mount. Automatic scanning relies on inotify, and inotify does not propagate over NFS. If your arr stack and Plex run on separate machines connected by NFS (for example, arr inside a TrueNAS VM and Plex in a separate LXC), the filesystem event never reaches Plex and automatic scanning will not fire.

In that case, use the Sonarr/Radarr built-in Plex connection instead:

  1. In Sonarr or Radarr, go to Settings → Connect and add a Plex Media Server connection
  2. Enable On Import and On Upgrade

Sonarr/Radarr will call the Plex API directly after each import, which works regardless of how Plex accesses the files and is generally faster than filesystem monitoring.

Result#

Plex is installed and connected to your media libraries. No media is available yet — that comes after configuring the download services.

Continue to Configure Download Client (SABnzbd).