> For the complete documentation index, see [llms.txt](https://docs.cstplus.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cstplus.org/documentation/getting-started/lines-and-viewer-access.md).

# Lines and Viewer Access

## Lines and Viewer Access

A Line is a set of credentials (username and password) that gives a viewer access to your channels. No line, no stream: the edge server blocks all unauthenticated requests.

***

### Create a line

Go to **Lines** in the sidebar and click **New line**.

| Field               | Notes                                                        |
| ------------------- | ------------------------------------------------------------ |
| Name                | Internal label so you know who this line belongs to          |
| Username / Password | Credentials the viewer enters in their IPTV app              |
| Max connections     | How many simultaneous streams this line allows               |
| Channel access      | All channels by default; restrict to specific ones if needed |
| Expiry date         | Leave blank for no expiry, or set a date to auto-cut access  |
| Contact email       | Optional, for your own records                               |

Click **Save**. The line is active immediately.

{% hint style="success" %}
Create a dedicated line for testing before sharing anything with real viewers. This lets you verify the stream without risking your production credentials ending up in a test app.
{% endhint %}

***

### Share access with your viewer

After saving, the line detail page shows ready-to-copy URLs:

* **M3U playlist**: paste into any IPTV app to get all channels plus EPG
* **Xtream credentials**: server, username, and password for Xtream-compatible apps
* **Web player**: a direct browser link, no app required

{% hint style="info" %}
The M3U playlist already includes the XMLTV EPG URL. The guide loads automatically in apps that support it, with no extra configuration needed.
{% endhint %}

***

### Xtream Codes compatibility

CST+ speaks the Xtream Codes API natively. In any Xtream-compatible app:

```
Server:   http://YOUR_SERVER_IP:8080
Username: the line username
Password: the line password
```

The app pulls the full channel list, stream URLs, and EPG in one go. Works with most IPTV apps on Android, iOS, set-top boxes, and smart TVs.

***

### Connection limits

If a viewer tries to open more streams than their line allows, they receive `429 Too Many Requests`.

{% hint style="success" %}
Active connections are visible in real time on the Dashboard. You can kill a specific connection or blacklist an IP with one click, without affecting other viewers on the same line.
{% endhint %}

***

### Geo-blocking per line

Each line can have its own list of blocked countries. This stacks on top of any global geo rules set in **Settings > Security**.

***

### Monitoring lines

| Where      | What you can see                                            |
| ---------- | ----------------------------------------------------------- |
| Dashboard  | Active connections: IP, country, device, protocol, duration |
| Analytics  | Per-line viewer counts, watch time, and traffic over time   |
| Lines list | Connection count and enabled/disabled status at a glance    |

{% hint style="danger" %}
Disabling a line immediately cuts off all active connections on it. Viewers lose the stream without warning. Use this for emergency cut-off, not routine management.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cstplus.org/documentation/getting-started/lines-and-viewer-access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
