Relaying RTMP Streams to YouTube, Facebook or Twitch
An RTMP relay lets you send one incoming stream to several platforms at the same time. Instead of asking a presenter to stream separately to YouTube, Facebook and your own website, they can send one stream to your Ubuntu server, and the server can push copies onwards.
Step 1: Confirm your local RTMP ingest works first. Do not add relay rules until OBS can connect successfully to your server.
Step 2: Collect destination RTMP URLs and stream keys from the platforms you want to use. Keep these keys private.
Step 3: Edit the Nginx RTMP application.
Step 4: Add push rules inside the application. A typical rule looks like:
push rtmp://destination-server/app/stream-key;
Step 5: Test the config:
sudo nginx -t
Step 6: Reload Nginx:
sudo systemctl reload nginx
Step 7: Start streaming from OBS to your own server.
Step 8: Check each destination dashboard to confirm the stream is being received.
Step 9: Watch CPU, bandwidth and error logs during the first real event.
Relaying is powerful, but it increases bandwidth usage because your server sends a separate outbound copy to every destination. If you push a 6 Mbps stream to three platforms, your server may use around 18 Mbps outbound, not including viewers on your own website. Always test before an important live show. Also remember that each platform has its own rules around bitrate, keyframes, music licensing and stream duration.
Hosting tip: For Online Audience style hosting guides, remind users to test changes outside busy broadcast times, keep a backup of the last working configuration, and avoid exposing admin services publicly. A clear checklist, sensible firewall rules and careful bitrate choices will prevent most support issues before they happen.