On this pageHow a live stream travels
Streaming platforms are convenient until their rules, their ads or their outages decide what happens to your broadcast. A streaming server of your own receives your stream and serves it to viewers from your own address, on your terms: your page, your chat, your archive. The software is free and mature, and a small server handles a surprising amount of it. This guide explains how a live stream travels, which server software fits which job, how to set up the two most practical options, how to send one stream to several platforms, and how to work out the bandwidth before the first viewer arrives.
How a live stream travels
Every setup has the same three stages:
- Ingest. Your encoder, usually OBS, sends one stream to the server.
- Processing. The server either passes the stream through untouched or transcodes it into several qualities so viewers on slow connections can keep up.
- Delivery. The server hands the stream to viewers in a format their browsers and apps can play.
| Protocol | Role | Delay | Notes |
|---|---|---|---|
| RTMP | Ingest | Low | Supported by every encoder, TCP port 1935 |
| SRT | Ingest | Low | Runs over UDP and copes better with lossy connections |
| HLS | Playback | Several seconds or more | Plain HTTP, plays almost everywhere, caches well |
| Low-latency HLS | Playback | A few seconds | Needs a player that supports it |
| WebRTC | Playback, and ingest through WHIP | Under a second | Real time, suits interactive streams |
The delay question decides a lot. A talk show or a gameplay stream with chat is fine on HLS. A live auction, a quiz or a stream where viewers call out moves needs WebRTC.
Pick the software
| Software | What it is | Best for |
|---|---|---|
| Owncast | A complete channel: web page, player, chat, admin, fediverse integration | Your own Twitch-style channel |
| MediaMTX | A media router that converts between protocols | Low latency, SRT, cameras, feeding other players |
| nginx with the RTMP module | Classic ingest, HLS output and pushing to other servers | Restreaming to several platforms |
| Ant Media Server Community Edition | A WebRTC-focused server with a web panel | WebRTC delivery, with a paid tier for larger scale |
Owncast and MediaMTX are both MIT-licensed. Owncast's 0.3.0 release in September 2026 added plugins and featured streams, where Owncast servers can list each other's broadcasts. It runs on Linux and macOS but not natively on Windows. MediaMTX is a single executable for Linux, Windows and macOS.
Option 1: an Owncast channel
The official installer downloads Owncast and a matching ffmpeg into a folder. Run it as a dedicated user:
sudo apt install -y unzip curl
sudo useradd --system --create-home --home-dir /opt/owncast --shell /bin/bash owncast
sudo -iu owncast bash -c 'curl -s https://owncast.online/install.sh | bash'
Then run it as a service:
# /etc/systemd/system/owncast.service
[Unit]
Description=Owncast
After=network-online.target
Wants=network-online.target
[Service]
User=owncast
WorkingDirectory=/opt/owncast/owncast
ExecStart=/opt/owncast/owncast/owncast
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now owncast
Open http://<server IP>:8080/admin. The default admin password and the default stream key are both abc123, and they are separate settings: change both before anything else, the key under Configuration, Server Setup, Stream Keys. In OBS, choose a custom streaming service with the server rtmp://<server IP>:1935/live and your new stream key.
Put the page behind HTTPS with a reverse proxy and a domain, so chat and the fediverse features work properly. With Caddy, a short site block does it:
live.example.com {
reverse_proxy 127.0.0.1:8080
}
Owncast transcodes with ffmpeg into the video variants you configure. Every variant costs CPU, so start with one or two, watch usage during a test stream, and use a passthrough variant to send your original stream without re-encoding. On CloudSat, the Owncast one-click app does the installation for you and leaves the admin password in /root/app-credentials.txt.
Option 2: a MediaMTX relay
MediaMTX takes a stream in one protocol and offers it in all the others. Its defaults listen on 8554 for RTSP, 1935 for RTMP, 8888 for HLS, 8889 for WebRTC and 8890 for SRT, and WebRTC media also uses UDP 8189. Out of the box, anyone may publish and read, so set credentials first. In mediamtx.yml:
authInternalUsers:
- user: streamer
pass: use-a-long-random-password
ips: []
permissions:
- action: publish
- user: any
pass:
ips: []
permissions:
- action: read
- action: playback
Start it with host networking, which keeps WebRTC simple on Linux:
docker run -d --name mediamtx --restart unless-stopped --network=host \
-v /srv/mediamtx/mediamtx.yml:/mediamtx.yml bluenviron/mediamtx:1
Publish from OBS over SRT with srt://<server IP>:8890?streamid=publish:live:streamer:<password>&pkt_size=1316, or over RTMP with rtmp://<server IP>/live?user=streamer&pass=<password>. Viewers open http://<server IP>:8889/live for WebRTC or http://<server IP>:8888/live for HLS, ideally behind an HTTPS proxy as well.
Send one stream to several platforms
Restreaming lets your home connection upload once while the server feeds every platform. nginx's RTMP module, packaged as libnginx-mod-rtmp on Debian and Ubuntu, does this with a few lines at the top level of nginx.conf, outside the http block:
rtmp {
server {
listen 1935;
application live {
live on;
record off;
allow publish 198.51.100.7;
deny publish all;
push rtmp://<first-platform-ingest>/<stream-key>;
push rtmp://<second-platform-ingest>/<stream-key>;
}
}
}
The allow publish line accepts streams only from your own address. The server then uploads one copy per platform, so its outgoing bandwidth is the sum of all pushes. Check each platform's rules on simultaneous streaming before you rely on it.
Do the bandwidth math first
Delivery cost is simple multiplication: bitrate times viewers times hours. One viewer watching a 4.5 Mbps stream for an hour moves about 2 GB. Fifty viewers for a three-hour show come to about 300 GB, with a peak of roughly 225 Mbps while everyone watches. Lower-quality variants cut both numbers for viewers who pick them.
CloudSat Cloud and High Frequency plans include 1 TB to 16 TB of monthly transfer depending on size, and traffic past the allowance costs $0.008 per GB, so even that whole show beyond the allowance would add $2.40; the high-bandwidth VPS page covers plans built for this. Your home connection only has to upload the single ingest stream, plus some headroom.
Stream only what you have the rights to
Your own camera, your own commentary and your own gameplay are fine, subject to each game publisher's rules for videos and streams. Rebroadcasting someone else's stream, TV channels, sports or films is not, and neither is background music you have no license for. Your hosting provider's terms apply as well, and a public stream page makes any problem visible quickly.
Keep it secure
- Treat stream keys and publish passwords like any password, and rotate them if they appear on screen.
- Accept ingest only from your address or with credentials.
- Keep admin pages behind HTTPS with strong passwords, and leave MediaMTX's control API disabled, its default, unless you need it.
- Open only the ports viewers and your encoder use.
FAQ
How fast does my home upload need to be?
Fast enough for one stream plus headroom, because the server handles every viewer. A 6 Mbps stream wants a comfortably faster upload than 6 Mbps, so short dips do not drop frames.
Does the server need a GPU?
Not for passthrough, and not for one or two transcoded variants on a capable CPU. Hardware encoders help when you offer many variants at once; our GPU encoder guide explains the codecs.
HLS or WebRTC?
HLS for reach and simplicity: it works in nearly every browser and app, and it caches well. WebRTC when the delay matters more than anything else, such as interactive shows.
Can viewers watch on phones and TVs?
Yes. HLS plays in mobile browsers and in most TV and streaming-stick apps that accept a stream URL, and Owncast's web page works on phones without an app.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




