media server logo
Toggle documentation navigation
Callaba home

RTMP servers

Use RTMP servers to receive OBS, encoder, and guest publishers at stable RTMP ingest endpoints. Control publishing and playback access, then inspect live bitrate and connection data.

What it doesReceive an RTMP contribution feed

Choose this whenOBS, an RTMP encoder, or a guest needs a stable push URL, access control, and live connection analytics.

Use another module whenUse SRT Servers for SRT transport and failover; use Streams only for identities inside an existing server.

1RTMP publisher2Control access3Route or playback
POST /api/rtmp-servers/create
10 endpoints

Before you start

All management methods require a valid x-access-token. Reserve a reachable listen port and choose the server's stream-control and access settings before sharing connection details.

What you can do

  • create and update configure the listen port, player buffer, and stream access policy.
  • getAll, getCount, and getById inspect servers and allowed stream records.
  • start and stop control the RTMP listener.
  • getStatistics reports input and output bitrate, publisher and receiver counts, plus available client address, region, and application metadata.
  • getStatisticHistory returns the available recent statistics history.
  • remove deletes the server.

Example workflow

  1. Create the RTMP server with its listen port and player buffer.
  2. Choose stream-key or IP-based access, or allow guest connections only when the workflow calls for it.
  3. Start the listener and give each publisher the intended connection details.
  4. Call getStatistics to verify bitrate, roles, and connection origin.
  5. Connect the ingest to a recording, restream, or web player.

Common use cases

  • Receive recurring OBS or encoder contributions at one stable endpoint.
  • Let approved guest publishers and receivers create their own stream keys under the selected access policy.
  • Monitor customer or venue connections by bitrate, role, address, and region.
  • Turn an RTMP contribution feed into HLS or DASH browser playback.

Limits and troubleshooting

The port must be free and reachable. Access rules, stream keys, and publisher or receiver roles must match the connection. Recent statistics are operational data rather than a durable analytics store; export them when longer retention or alerting is required.

Next steps

Validate a publisher with getStatistics, then connect the server to Restreams, Recordings, or Web players.

REST solution recipe

Accept RTMP publishers and inspect live bitrate

Provision an RTMP entry point with the required access policy, start it, and read current and recent process statistics from the same server resource.

  1. Create RTMP ingestChoose the listen port, buffer, and open, stream-id, or IP access pattern.POST /api/rtmp-servers/create
  2. Start the serverEnable the entry point before connecting OBS, an encoder, or another publisher.POST /api/rtmp-servers/start
  3. Read live statisticsInspect current bitrate and connection data, then use history for recent samples.POST /api/rtmp-servers/getStatistics

A successful create response confirms configuration, not media health. Start the resource, then verify its runtime statistics before sending production traffic.

See the RTMP Server product
POST
/api/rtmp-servers/create
API token required

Create an RTMP ingest server with its listen port, player buffer, active state, and optional stream-key or IP access rules. Send the dashboard-issued JWT in the x-access-token header.

server_buflen is measured in seconds. The default is 5, and accepted values are 1 through 120.

When stream_control_type and access_settings are supplied, Callaba creates the access rules with the server. The create response can still contain access: []; call getById to read the populated access list.

Request examples

Choose a preset for open ingest, explicit stream keys, or fixed IP addresses. A vMix Script example is available for operator-driven provisioning.

Common use cases

  • Give OBS or another software encoder a stable RTMP contribution endpoint.
  • Restrict partner or studio publishing with stream keys or an IP allowlist.
  • Provision an ingest boundary that can feed browser playback through its associated HLS or DASH delivery.
Allow only specified stream keys

Use this pattern when publishers and receivers should authenticate with explicit RTMP stream keys instead of open ingest. It mirrors the dashboard preset that seeds one publisher key and one receiver key.

Allow only specified stream keys
Copy code
curl --request POST \
--url http://localhost/api/rtmp-servers/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"server_name": "Live Protected",
"server_type": "SERVER_TYPE_RTMP",
"server_port": 1945,
"server_buflen": 5,
"server_active": true,
"stream_control_type": "CONTROL_ACCESS_STREAM_ID",
"access_settings": [
{
"stream_id": "rtmp-stream-01",
"role_name": "publisher"
},
{
"stream_id": "rtmp-stream-01",
"role_name": "receiver"
}
]
}'
Allow only specified IP addresses

Use this pattern when the RTMP peers are known fixed hosts. The dashboard preset creates publisher and receiver rules keyed by host instead of stream id.

Allow only specified IP addresses
Copy code
curl --request POST \
--url http://localhost/api/rtmp-servers/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"server_name": "Live Allowlisted",
"server_type": "SERVER_TYPE_RTMP",
"server_port": 1945,
"server_buflen": 5,
"server_active": true,
"stream_control_type": "CONTROL_ACCESS_IP_ADDRESS",
"access_settings": [
{
"host": "127.0.0.1",
"role_name": "publisher"
},
{
"host": "127.0.0.1",
"role_name": "receiver"
}
]
}'
Request body parameters
Basic settings
server_name
string
Copy direct link

Dashboard label: Name.

The form defaults to Live. Validation requires a non-empty value and rejects slashes.

server_type
string
Copy direct link

Current validated API contract accepts SERVER_TYPE_RTMP.

server_active
boolean
Copy direct link

Dashboard label: Enable once created.

Enabled is the server state. Turning it off disconnects all publishers and receivers attached to the RTMP server.

Runtime settings
server_port
integer
Copy direct link

Dashboard label: Port.

The dashboard starts at 1945. The REST API accepts ports from 1 to 65535. Choose a free port that is reachable by your publishers and viewers.

server_buflen
integer
Copy direct link

Dashboard label: Buffer length (s).

This value is configured in seconds. The dashboard starts at 5 and the accepted range is 1 to 120.

This setting controls how much media the player buffers before playback starts.

Access control
stream_control_type
string
Copy direct link

Dashboard section: Allowed streams.

Controls whether the RTMP server validates incoming publishers and receivers by explicit stream key or by host allowlist. The live create flow currently uses values such as CONTROL_ACCESS_STREAM_ID and CONTROL_ACCESS_IP_ADDRESS.

access_settings
array
Copy direct link

Optional set of access rules to create together with the server.

For stream-key mode, each item typically contains stream_id and role_name. For IP-based mode, each item uses host and role_name.

Create RTMP server
Copy code
curl --request POST \
--url http://localhost/api/rtmp-servers/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"server_name": "Live",
"server_type": "SERVER_TYPE_RTMP",
"server_port": 1945,
"server_buflen": 5,
"server_active": true
}'
Response
Identity and runtime
_id
string
Copy direct link

Resource id returned when you create or list the RTMP server.

id
string
Copy direct link

Convenience alias for _id.

server_name
string
Copy direct link

Name stored for the RTMP server.

server_type
string
Copy direct link

Type of the server. The live product returns SERVER_TYPE_RTMP.

server_port
string
Copy direct link

Listening RTMP port returned by the product.

server_buflen
integer
Copy direct link

Configured RTMP buffer length.

server_active
boolean
Copy direct link

Current running state flag stored on the server object.

server_port_id
string
Copy direct link

Port document attached to the RTMP listener.

server_created
string
Copy direct link

Creation timestamp.

server_modified
string
Copy direct link

Last modification timestamp.

Access control
stream_control_type
string
Copy direct link

Access-control mode stored on the RTMP server, when provided.

access
array
Copy direct link

The live create response currently returns this as an empty array even when access_settings were submitted. Use getById to retrieve the populated related access records.

Operation result
success
boolean
Copy direct link

The model exposes success: true as a virtual field in successful responses.

Response: Create RTMP server
JSON
Copy code
{
"_id": "69c1fb0128c95839e0e022d5",
"__v": 0,
"access": [],
"server_active": true,
"server_buflen": 5,
"server_created": "2026-03-24T02:46:25.044Z",
"server_name": "Docs RTMP Server",
"server_port": "1945",
"server_type": "SERVER_TYPE_RTMP",
"server_user_id": "69360341db559495f643de6a",
"server_port_id": "69c1fb0128c95839e0e022d7",
"server_modified": "2026-03-24T02:46:25.056Z",
"id": "69c1fb0128c95839e0e022d5",
"success": true
}
POST
/api/rtmp-servers/getCount
API token required
POST
/api/rtmp-servers/getAll
API token required
POST
/api/rtmp-servers/getById
API token required
POST
/api/rtmp-servers/getStatistics
API token required
GET
/api/rtmp-servers/:serverPort/getStatisticHistory
API token required
POST
/api/rtmp-servers/update
API token required
POST
/api/rtmp-servers/start
API token required
POST
/api/rtmp-servers/stop
API token required
DELETE
/api/rtmp-servers/remove
API token required