Skip to content

Plex

Plex is Librariarr’s primary integration, providing both authentication and media server connectivity.

Plex OAuth is the primary way to sign in to Librariarr.

  1. Click Sign in with Plex on the login page
  2. Authorize Librariarr in the Plex popup
  3. Your Plex account is linked and your accessible servers are discovered automatically

After Plex OAuth sign-in, Librariarr stores your Plex token securely for API calls.

If you set Librariarr up with a local username and password, you can link a Plex account later:

  1. Go to Settings → Authentication
  2. Under Plex Connection, click Connect Plex Account to start Plex OAuth

Once an account is linked the section shows Connected as … instead. Signing in with Plex again refreshes the stored Plex token.

Linking needs a sign-in from the last 15 minutes, because a linked Plex account is a way into Librariarr that outlasts the session. If it has been longer, Librariarr asks you to confirm it’s you — with your password, or by signing in again with Plex or SSO in a pop-up — and then links the account, without signing you out. Signing in with Plex is offered only while Allow Plex Login is on.

With a Plex account linked, Settings → Authentication → Plex Connection shows an Allow Plex Login toggle (on by default; off by default when the first admin was created with a local password). Turning it off hides the Sign in with Plex button from the login page but keeps your Plex token attached, so server discovery and library sync keep working. Librariarr refuses a change that would leave no usable sign-in method (Plex, local login or SSO), and turning Plex login back on needs a sign-in from the last 15 minutes.

Linking an account never changes this setting. When you link Plex — under Settings → Authentication, from Add Server → Plex, or during onboarding — while Plex login is off, Librariarr asks Allow signing in with Plex?: Enable Plex login turns it on, Keep it off leaves it as it is. Keep it off if other people share the Plex account, since anyone who can sign in to it could then sign in to Librariarr.

When signed in via Plex OAuth, Librariarr can automatically discover the Plex servers your account owns (servers shared with you are not listed). Add one from Settings → Media Servers → Add Server → Plex, or during onboarding. For each server it shows:

  • Server name and version
  • Platform (Linux, Windows, macOS, etc.)
  • Available connections (local and remote URLs)

A discovered server’s access token is never sent to your browser: when you add the server, Librariarr looks the token up from your Plex account itself. That lookup, and later changing a Plex server’s URL or turning on Skip TLS Verification (the stored token stays in place), needs a sign-in from the last 15 minutes, because the token then goes to the address you entered, or to whoever answers there unverified — and a Plex token is enough to sign in to Librariarr. If it has been longer, Librariarr asks you to confirm it’s you and then carries on.

Plex servers are always added through your linked Plex account — there is no field for pasting a Plex token. After adding one, you can edit it in Settings → Media Servers:

  • URL: Base URL (e.g., http://192.168.1.100:32400 or https://plex.example.com); the server’s known addresses from plex.tv are offered as one-click choices
  • External URL (optional): A browser-facing address used for “Open in” links; falls back to URL
  • Skip TLS Verification: Enable for self-signed certificates

Librariarr fetches comprehensive metadata for each media item:

  • Core metadata: title, year, rating, studio, genres, content rating, duration
  • Play data: play count, last played date, date added — reconciled from every user’s plays in the server’s watch history, not only your own account’s
  • Watchlist: whether an item is on your plex.tv watchlist (read during full syncs; if plex.tv can’t be reached, the stored flags are kept)
  • Video details: resolution, format, frame rate, HDR type, and more
  • Audio details: format, channels, quality, and language
  • Subtitles: language and settings
  • File info: size, format, and location
  • External IDs: TMDB, TVDB, and IMDB (used to match with Sonarr/Radarr)

By default, watch history comes from the server’s own history API, which records each play with its user, timestamp, and device for every account on the server. A server can instead take its history from Tracearr, which adds completion, transcode, and stream detail per play. See Watch History Sources.

Librariarr keeps a live connection to each Plex server, so new streams, finished plays, and added or removed items are picked up within seconds instead of waiting for the next scheduled sync. See Real-time sync.

Posters and backgrounds are resized by Plex’s photo transcoder to the size Librariarr displays, then cached locally under /config/cache/images.

Dynamic range is detected from a combination of stream metadata and filename patterns:

  • Dolby Vision: Stream tags or filename patterns like DV, DoVi
  • HDR10+: Stream metadata or filename patterns like HDR10+, HDR10Plus
  • HDR10: Detected from video metadata
  • HLG: Detected from video metadata
  • SDR: Everything else

Audio profiles are normalized from stream metadata and filenames:

  • Dolby Atmos: Detected from stream metadata or Atmos in filename
  • Dolby TrueHD: truehd codec
  • DTS-HD MA: dts codec with MA profile
  • DTS:X: Detected from stream metadata

Plex libraries map to Librariarr’s types:

Plex Library Type Librariarr Type
Movies MOVIE
TV Shows SERIES
Music MUSIC

A library that no longer exists on the server is removed from Librariarr on the next full sync, together with its items, their play history, and any rule matches or exceptions attached to them (the removal is logged under System → Logs). Before this, a library deleted or re-created in Plex lived on in Librariarr indefinitely: its items were still listed and still evaluated by lifecycle rules, with play dates that could never advance again. As a safeguard, nothing is removed when the server reports no libraries at all, since that is far more likely a bad answer than a genuinely emptied server.

Each Plex library can be independently enabled or disabled for syncing in Settings → Media Servers.

Lifecycle rule sets can maintain Plex collections — a “Leaving Soon” shelf, for example — whose membership follows the rules’ matches. This is Plex-only. See Plex Collections.

With Plex, the Stream Manager can:

  • View all active Plex streams in real time
  • See conversion details and hardware acceleration status
  • Terminate individual sessions
  • Enable maintenance mode to pause all streaming

The Preroll Manager sets preroll paths via the Plex API.

  • Plex tokens can expire — re-authenticate if you encounter access issues
  • Large libraries (50,000+ items) may take significant time for the initial sync
  • Dynamic range and audio quality detection from filenames may not be 100% accurate for unusual naming conventions
  • External ID availability depends on Plex’s own metadata agents — some items may not have TMDB/TVDB/IMDB IDs