# RTMP

The settings for the built-in SRT server. Check out our [RTMP guide](https://docs.datarhei.com/core/guides/rtmp) 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](https://docs.datarhei.com/core/configuration/..#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).
