---
title: "Deploy Nginx RTMP"
description: "A simple self-hosted streaming live room."
category: "Other"
url: https://railway.com/deploy/nginx-rtmp
---

# Deploy Nginx RTMP

A simple self-hosted streaming live room.

**[Deploy Nginx RTMP on Railway](https://railway.com/template/nginx-rtmp)**

- **Category:** Other

## Template content

### nginx-rtmp

- **Image:** tiangolo/nginx-rtmp:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host Nginx RTMP on Railway

Nginx RTMP is an Nginx-based media streaming server for live video delivery. It supports RTMP publishing and HLS playback, making it suitable for receiving live streams from tools such as OBS and serving them to compatible video players. The nginx-rtmp-module also supports H264/AAC streaming and other live-media features.

## About Hosting Nginx RTMP

Hosting Nginx RTMP on Railway involves deploying the `tiangolo/nginx-rtmp:latest` Docker image as a Railway service. The configuration listens for RTMP streams on port `1935` and serves the HLS output and web content over HTTP on port `80`. Railway provides the networking layer needed to expose both endpoints publicly. HLS segments are generated under `/tmp/hls`, so persistent storage is not required for the documented configuration. No database or runtime environment variables are required. Once deployed, you can generate a Railway domain for HTTP access and use a TCP proxy for RTMP publishing.

## Common Use Cases

* Live video streaming from OBS or other RTMP-compatible broadcasting software
* Self-hosted HLS streaming for web-based video playback
* Development and testing of RTMP and HLS streaming workflows

## Dependencies for Nginx RTMP

* `tiangolo/nginx-rtmp:latest` Docker image
* OBS Studio or another RTMP-compatible streaming client

### Deployment Dependencies

* [Nginx RTMP Module documentation](https://github.com/arut/nginx-rtmp-module?utm_source=chatgpt.com)
* [Nginx RTMP Docker image](https://hub.docker.com/r/tiangolo/nginx-rtmp/?utm_source=chatgpt.com)

### Implementation Details

#### Docker

The template uses the following Docker image:

```docker
tiangolo/nginx-rtmp:latest
```

Railway deploys the prebuilt image directly, so no custom build or start command is required.

#### Public Networking

Configure the following ports:

| Protocol | Proxy Type | Target Port | Purpose                      |
| -------- | ---------- | ----------: | ---------------------------- |
| HTTP     | HTTP Proxy |          80 | Web content and HLS playback |
| RTMP     | TCP Proxy  |        1935 | RTMP stream ingestion        |

After deployment, generate a Railway domain for port `80`. For RTMP publishing, use the TCP proxy generated for port `1935`.

#### Streaming Configuration

The RTMP application is available at the `/live` path. A compatible streaming client can publish using an endpoint similar to:

```text
rtmp://:/live
```

The stream key is appended to the RTMP URL when publishing.

HLS output is generated at:

```text
/tmp/hls
```

and can be accessed through the HTTP service using:

```text
https:///hls/stream.m3u8
```

The supplied configuration has recording disabled, so no persistent volume is required.

## Why Deploy Nginx RTMP on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Nginx RTMP on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/nginx-rtmp
