3 Plex
Codex edited this page 2026-05-22 13:51:48 -07:00

Plex

Dashboard Status

This module is live. The dashboard reads Plex libraries, active sessions, recent additions, and per-library item counts.

Primary API surfaces:

/library/sections
/status/sessions
/library/recentlyAdded
/library/sections/{key}/all

Admin Fields

  • Plex URL
  • Plex Token
Plex URL: http://plex.example.com:32400
Plex Token: saved-by-sign-in-or-copied-token

Use the URL the dashboard backend can reach. If Plex is on the same Docker network, this might be http://plex:32400. If Plex is on the LAN, use a LAN hostname or IP.

Sign In With Plex

The admin settings page includes a Sign in with Plex button.

  1. Enter the Plex URL first.
  2. Click Sign in with Plex.
  3. Approve the shown Plex code in the opened Plex window.
  4. Return to the dashboard admin page.
  5. Click the confirm button.

The dashboard uses the Plex PIN flow and stores the returned token server-side. The saved token is not sent back to the browser after it is stored.

Manual Token Setup

  1. Open Plex Web and sign in as the Plex server owner or a user with access to the server.
  2. Open a movie, episode, or library item.
  3. Open the item menu.
  4. Choose Get Info.
  5. Click View XML.
  6. Copy the value of X-Plex-Token from the XML URL.

Alternative server-owner method:

  1. Locate Plex Preferences.xml on the Plex server.
  2. Find the PlexOnlineToken value.
  3. Use that as the dashboard token.

Test From The Docker Host

curl -fsSL 'http://plex.example.com:32400/library/sections?X-Plex-Token=YOUR_TOKEN'
curl -fsSL 'http://plex.example.com:32400/status/sessions?X-Plex-Token=YOUR_TOKEN'

A successful library response contains a MediaContainer with library Directory entries.

Common Problems

  • 401 Unauthorized: token is invalid or belongs to a user without access to this server.
  • Empty libraries: token works but the user does not have access to the expected libraries.
  • Active streams lagging: verify /status/sessions returns current sessions from the dashboard host.
  • ENOTFOUND or connection refused: the dashboard cannot reach the Plex URL.
  • HTTPS reverse proxy issues: test the exact URL saved in the dashboard admin page.

Sources