# tiangolo/nginx-rtmp-docker for Self-Hosted RTMP Streaming

> tiangolo/nginx-rtmp-docker packages Nginx and nginx-rtmp-module in Docker for live RTMP publishing with OBS Studio and playback with VLC or ffplay. The default configuration is small and direct, while custom configurations and RTMPS require operator-managed setup.

**tiangolo/nginx-rtmp-docker** — Docker image with Nginx using the nginx-rtmp-module module for live multimedia (video) streaming.

- Repository: https://github.com/tiangolo/nginx-rtmp-docker
- Stars: 1,360 · Forks: 383
- Language: Shell
- License: MIT
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/tiangolo-nginx-rtmp-docker

## What `tiangolo/nginx-rtmp-docker` Solves

`tiangolo/nginx-rtmp-docker` provides a Docker image for running an RTMP server for live multimedia and video streaming. Its documented path starts with OBS Studio, which publishes a stream to the container, and ends with a viewer such as VLC or ffplay. The project is aimed at operators who want a direct RTMP endpoint without assembling Nginx and `nginx-rtmp-module` themselves.

The image is focused on streaming distribution. The default configuration exposes an RTMP application named `live` on port `1935`, enables live streaming, and disables recording. It does not describe a web control panel, transcoding farm, user accounts, stream authentication, analytics service, or durable media storage. That boundary matters when comparing it with larger streaming platforms. It can be the receiving and forwarding layer for a live workflow, but the README does not present it as a complete video service.

Docker is the packaging boundary. The repository contains a `Dockerfile`, an `nginx.conf`, a `scripts/` directory, and workflow files. The README points to Docker Hub for the published image and says that build-date tags are available if an operator wants to pin an image version instead of using `latest`.

## How the RTMP Application Handles OBS Streams

The default `nginx.conf` configures Nginx worker processes, enables `rtmp_auto_push`, and starts an RTMP server with IPv4 and IPv6 listeners on port `1935`. Inside that server, the `live` application has `live on` and `record off`. Based on this configuration, incoming media is treated as a live stream and is not written to a recording output by default.

The README establishes a simple URL convention. OBS Studio publishes to `rtmp://<ip_of_host>/live`, then sends a stream key. A client requests `rtmp://<ip_of_host>/live/<key>`, using the same key to select that stream. The key is therefore a stream selector in the documented setup. The README does not describe it as an access credential, and the default configuration does not show an authentication directive for it.

The repository's manual test follows this same route. It publishes a generated stream and opens it with ffplay. This makes the mechanism concrete: one client supplies media through the RTMP application, while another client reads the selected stream path. The README does not document adaptive bitrate ladders, HTTP HLS output, transcoding profiles, or a viewer-facing web player in the shown configuration.

## Installing the Image and Running the First Container

The simplest documented installation uses the published Docker image. Use `docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp` on a host where OBS Studio and viewers can reach port `1935`.

## Publishing with OBS Studio and Viewing with VLC

After the container is running, configure OBS Studio as a custom streaming server. The README specifies the `Stream` section and the following server URL pattern. Replace the host placeholder with the IP address of the Docker host, then choose a stream key.

## Building Locally and Running the Playback Check

The repository also documents a local image build and a manual playback test. Build from the repository root so that the `Dockerfile` is available to Docker. The image is tagged `nginx-rtmp-test`, and the test container publishes port `1935` and removes itself when it exits.

## Replacing `nginx.conf` and Adding RTMPS

The image can be extended by copying a custom configuration over `/etc/nginx/nginx.conf`. The documented Dockerfile keeps the base image and replaces only the configuration file. This is the supported extension path described by the README.

```Dockerfile
FROM tiangolo/nginx-rtmp

COPY nginx.conf /etc/nginx/nginx.conf
```

For RTMPS, the README describes Nginx stream SSL termination on port `1935` and an internal RTMP server listening on `127.0.0.1:1936`. The operator must create `nginx.conf` with the `stream` proxy, supply `ssl_certificate` and `ssl_certificate_key`, and mount the certificate directory into the container. The documented client address becomes `rtmps://<domain>/live/<key>`.

```bash
docker run -d \
  -p 1935:1935 \
  -v /path/to/certs:/etc/nginx/certs:ro \
  --name nginx-rtmps \
  your-nginx-rtmps-image
```

The README does not document certificate acquisition or renewal. It also does not show stream-level authentication in the RTMPS configuration, so TLS protects the connection but does not by itself establish who may publish or view a key. The operator must decide whether network exposure and key secrecy are sufficient for the intended environment.

## Maintenance, Versioning, and Licence Costs

The repository is not archived, and the last push was on 2026-09-25. The listed release is `0.0.1`, dated 2024-03-18. Maintenance status should therefore be based on that last-push fact rather than on assumptions about release frequency. The README says Docker Hub contains tags for each build date and gives `tiangolo/nginx-rtmp:latest-2020-08-16` as an example of a pinned tag. Pinning can make image selection more explicit, although the README does not document a compatibility policy for those tags.

There is a version discrepancy inside the repository. The README describes Nginx `1.15.0` and `nginx-rtmp-module` `1.2.1`, while the `Dockerfile` declares `nginx-1.23.2` and `nginx-rtmp-module 1.2.2`. The Dockerfile is the more specific statement of what the current build attempts to compile, but the README is not synchronized with it. A deployment should inspect the selected image and its build definition rather than relying on the introductory version paragraph.

The `Dockerfile` uses `buildpack-deps:bullseye`, installs build dependencies, downloads Nginx and `nginx-rtmp-module` sources, and enables HTTP SSL, stream, stream SSL, threads, and IPv6 options. Upgrades can therefore involve both the container base and the compiled Nginx dependencies. The repository has an MIT licence. That is the stated project licence, not a substitute for reviewing the licences and security terms of every external component shipped in an image.

## Operational Limits Before Production Use

The default setup is intentionally simple, but several operational questions remain outside the documentation. There is no documented command or configuration for creating users, restricting publishers, authorizing viewers, rotating stream keys, or recording streams. Port `1935` is the only required mapping in the basic example, so exposing it broadly may expose the endpoint to networks that should not receive the stream. The README does not state a firewall policy or reverse-proxy arrangement for that reason.

The project also does not document health checks, metrics, resource limits, log rotation, multi-instance coordination, or failure recovery. Container logs can be viewed with the documented `docker logs nginx-rtmp` command, but the README does not provide log parsing or alerting instructions. A failure can therefore be diagnosed initially through Nginx logs and client behavior, while broader monitoring remains an operator concern.

For a public or business-critical stream, the custom configuration may need more than the shown `live` block. The module documentation is linked for available directives, but this repository does not prescribe which controls to add. The absence of recording is explicit, and the absence of transcoding or authentication is a documentation boundary, not proof that no external component could be added around the image.

## Conclusion

Adopt this image for a small self-hosted RTMP workflow where OBS Studio publishes to Nginx and VLC or ffplay receives the stream. Do not assume it includes recording, transcoding, authentication, monitoring, or a production management plane, because the default configuration disables recording and does not document those features. Verify the selected Docker tag, Nginx and module versions, port exposure, and custom `nginx.conf` before deployment.

## FAQ

### How do I run `tiangolo/nginx-rtmp-docker` with Docker?

The README's basic command is `docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp`. It publishes container port `1935` on the host and names the container `nginx-rtmp`.

### How do I stream from OBS Studio to `tiangolo/nginx-rtmp-docker`?

Configure OBS Studio with Custom Streaming Server, use `rtmp://<ip_of_host>/live` as the URL, and enter a stream key. VLC can then open `rtmp://<ip_of_host>/live/<key>`.

### Does the default `tiangolo/nginx-rtmp-docker` configuration record streams?

No. The documented default configuration sets `record off` inside the `live` application.

### Can `tiangolo/nginx-rtmp-docker` accept RTMPS connections?

The README documents Nginx TLS termination on port `1935` and an internal RTMP listener on `127.0.0.1:1936`. The container needs certificate files mounted at the paths used by the custom configuration.

### Where are container logs viewed?

The README documents `docker logs nginx-rtmp` for the container created by the basic deployment command.

## Sources

- [Issues](https://github.com/tiangolo/nginx-rtmp-docker/issues)
- [License: MIT](https://github.com/tiangolo/nginx-rtmp-docker/blob/master/LICENSE)
- [README](https://github.com/tiangolo/nginx-rtmp-docker/blob/master/README.md)
- [Releases](https://github.com/tiangolo/nginx-rtmp-docker/releases)
- [tiangolo/nginx-rtmp-docker on GitHub](https://github.com/tiangolo/nginx-rtmp-docker)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tiangolo-nginx-rtmp-docker
