# RTMP

The settings for the built-in SRT server. Check out our [RTMP guide](/core/guides/rtmp.md) for more information.

## Configuration

{% tabs %}
{% tab title="JSON" %}

```
{
   "rtmp": {
      "enable": false,
      "enable_tls": false,
      "address": ":1935",
      "address_tls": ":1936",
      "app": "/",
      "token": ""
   }
}
```

{% endtab %}

{% tab title="ENV" %}

```
CORE_RTMP_ENABLE=false
CORE_RTMP_ENABLE_TLS=false
CORE_RTMP_ADDRESS=":1935"
CORE_RTMP_ADDRESS_TLS=":1936"
CORE_RTMP_APP="/"
CORE_RTMP_TOKEN=
```

{% endtab %}
{% endtabs %}

### enable (bool)

Set this value to `true` in order to enable the built-in RTMP server.

By default the RTMP server is disabled.

### enable\_tls (bool)

Set this value to `true` to enable the RTMPS server that will run in parallel with the RTMP server on a different port. You have to have [tls.enable](/core/configuration.md#tls) set to true in order for enabling the RTMPS server because it will use the same certificate as for the HTTPS server.

By default TLS is disabled.

### address (string)

If the RTMP server is enabled, it will listen on this address. The default address is `:1935`.

{% hint style="info" %}
The default `:1935` will listen on all interfaces on port 1935. To use a specific interface, write additionally it's IP, e.g. `127.0.0.1:1935` to only listen on the loopback interface.
{% endhint %}

### address\_tls (string)

If the RTMPS server is enabled, it will listen on this address. The default address is `:1936`.

{% hint style="info" %}
The default `:1936` will listen on all interfaces on port 1936. To use a specific interface, write additionally it's IP, e.g. `127.0.0.1:1936` to only listen on the loopback interface.
{% endhint %}

### app (string)

Define the app a stream can be published on, e.g. `/live` to require the path in an RTMP URLs to start with `/live`.

The default app is `/`.

### token (string)

To prevent anybody from publish or playing streams, define token to be a secret only known to the publishers and subscribers. The token has to be put in the query of the stream URL, e.g. `/live/stream?token=abc123`.

**As of version 16.12.0** the token can be appended to the path instead of a query parameter, e.g. `/live/stream/abc123`. With this the token corresponds to a stream key.

By default the token is not set (i.e. an empty string).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datarhei.com/core/configuration/rtmp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
