# Connect Plex

Add Plex to Kochab with Sign in with Plex and default port 32400.

Canonical: https://kochab.io/docs/services/plex/

Plex is a media server. Kochab uses Plex's API with a signed-in token for session and activity data.

## What Kochab exposes through Plex

- **Activity tab:** now playing streams and server reachability, with an **End session** action per stream
- **Detail surface:** live stream count and links to Activity and Library
- **Sign in with Plex:** OAuth token capture in the add flow (no manual token paste in normal use)
- **Push:** newly added media notifications. Kochab registers the webhook in Plex for you when you add the service

## Not exposed through Plex

Plex admin (libraries, users, remote access, server settings) stays in Plex Web or the Plex apps. Kochab can end a stream but cannot pause or resume it (unsupported over Plex's player API).

## Before you start

You need a Plex account with access to the server you want to manage. Kochab obtains a Plex token through **Sign in with Plex** (you do not paste a token manually in normal use).

## Default connection

| Field | Typical value |
|---|---|
| Port | **32400** |
| Scheme | `https` (Plex typically uses TLS) |
| Auth | `X-Plex-Token` from Plex sign-in |

## Add in Kochab

1. Open **Services -> Add service** and choose **Plex**.
2. Enter your **Plex server host** or IP (LAN address for local access).
3. Set port **32400** unless your server uses a custom port.
4. Tap **Sign in with Plex** and complete the browser login.
5. Tap **Test and add**.
6. Choose which libraries Kochab should include when prompted (you can change this later).

## TLS

See [Certificate trust](/docs/cert-trust) if Kochab cannot verify your server's certificate.

## Tips

- For remote access, add an external address on the stack if you reach Plex over a public hostname or VPN away from home.

## Official docs

[Plex support](https://support.plex.tv/)