selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

SRS logo

Self-host SRS

v6.0-r3

Realtime media server for RTMP, WebRTC, HLS, SRT and DASH

ReleaseOpen SourceMIT
docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:5
Updatedlast week
LanguageC++
Setup difficultyModerate
Stars
29 433
Ports
1935 (RTMP live streaming server), 1985 (HTTP API server (also WebRTC APIs)), 8080 (HTTP live streaming server: HTTP-FLV, HLS, players), 8000 (WebRTC media (UDP)), 8088 (Optional HTTPS live streaming server)
Docker
ossrs/srs

What is SRS?

SRS is an MIT-licensed C++ realtime media server for building live-video and WebRTC services. It accepts streams over RTMP, SRT, WebRTC (WHIP/WHEP) and MPEG-TS over UDP, then re-delivers the same stream over RTMP, HTTP-FLV, HLS, MPEG-DASH, WebRTC and SRT, and can act as a GB28181 camera gateway. Streams can be transcoded and recorded to disk (DVR), an HTTP API exposes server and stream state, and HTTP callbacks let your own backend authorize or reject every publish and play request. Capacity grows with origin/edge clusters, and the project also ships Helm and Kubernetes deployment paths. Self-hosting is normally one container with the streaming ports published, or a ./configure plus make build from source on Linux and macOS; HTTPS can be served natively or through Nginx or Caddy. Version 6.0 is the stable branch, while 7.0 and 8.0 are labelled unstable, and the Windows port still has unresolved issues.

Should you self-host SRS?

SRS scores 79/100 on selfhost.directory (how scoring works) and ranks #2 of 119 in Media Server. It has 29 433 GitHub stars, +119 in the last 30 days.

It shipped 15 stable releases in the past year. The latest, v7.0-a4, came out on 31 October 2026. New versions land roughly every 2 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in C++.

Its closest alternative on selfhost.directory is Jellyfin (88/100, 59 105 stars). It scores higher overall, so compare the two before you pick. See SRS vs Jellyfin side by side.

Features

  • DVR recordingDynamic DVR rules are not supported; on_publish/on_hls hooks are used instead.
  • Edge/origin cluster scalingEdge only supports live protocols such as RTMP and FLV; HLS/DVR/RTC belong on the origin.
  • GB28181 camera accessGB work was moved to the separate srs-gb28181 repository; SRS does not aim at full GB coverage.
  • HLS and DASH packaging
  • HTTP API
  • HTTP callbacks for auth and hooks
  • Kubernetes deployment
  • Low Latency Streaming
  • Multi-codec support
  • Multi-protocol live streaming gateway
  • RTMP to WebRTC conversion
  • SRT ingest and playback
  • TranscodingAudio transcoding is not enabled by default.
  • WebRTC video chat and low-latency playback
  • WHIP/WHEP endpoints

SRS README

SRS(Simple Realtime Server)

SRS/8.0 (Free) is a simple, high-performance, AI-driven real-time media server. It supports RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181 on Linux and macOS across x86_64, ARMv7, AArch64, Apple M1, RISC-V, LoongArch, and MIPS architectures, and natively on Windows x64. Supported codecs include H.264, H.265, AV1, VP9, AAC, Opus, and G.711. See the complete list of features.

How to install SRS

Install SRS with Docker

docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:5

Publish a test stream:

ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream

WebRTC/SRT/HTTPS need extra ports and a config such as conf/rtmp2rtc.conf or conf/srt.conf; the README example uses image ossrs/srs:6.

How to configure SRS

  • CANDIDATEEnvironment variable set to the server IP so WebRTC advertises the right ICE candidate.

    values: An IP address, e.g. 192.168.1.10

  • -cCommand-line flag of the objs/srs binary that selects the configuration file to start with.

    values: A conf/*.conf path, e.g. conf/srs.conf, conf/rtmp2rtc.conf, conf/srt.conf

  • hls_fragmentHLS segment (TS) duration in seconds; combined with GOP length and hls_wait_keyframe it decides the real segment duration.

    values: Seconds, e.g. 5, 2, 0.5

  • hls_wait_keyframeWhether each HLS segment must start at a keyframe (on/off).

    values: on|off

  • on_publishHTTP callback that lets the business system implement complex rules, e.g. dynamic DVR decisions, when a stream is published.

SRS releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

GB28181: What about GB28181 status and roadmap?

The GB work was moved out to its own repository, srs-gb28181, and SRS only treats GB as an access protocol rather than a full implementation.

HTTP2: How to do HTTP2-FLV or HTTP2 HLS, etc.?

It does not - HTTP/2 and HTTP/3 are intentionally left out in favour of reverse proxies that convert protocols, and SRS implements a simple HTTP 1.0 protocol for its API and callbacks.

HTTPS: How to use HTTPS services, API, Callback, Streaming, WebRTC, etc.?

SRS offers HTTPS for the API, for callbacks and for live streaming, and you can alternatively front it with an Nginx or Caddy HTTPS reverse proxy.

Secure HTTP API: How to do API authentication, API security, etc.?

The recommended approach is to put a Nginx proxy in front of the API, or to enforce authentication through HTTP callbacks that call your business system when a stream is published or played.

CORS: How to setup cross-domain access for HTTP APIs or streams?

It is built into SRS since 3.0 and enabled by default, so no extra HTTP proxy is needed for cross-domain API or stream access.

Edge HLS/DVR/RTC: Does Edge Cluster support for HLS/DVR/RTC, etc.?

No - the Edge cluster is meant for live streaming protocols like RTMP and FLV, while HLS, DVR and RTC belong on the origin server.

CPU and OS: What's the CPU architecture and OS operating system supported by SRS?

Common CPU architectures are covered (x86_64/amd64, armv7/aarch64/Apple M1, MIPS, RISC-V, Loongson loongarch) and the usual operating systems: Linux such as CentOS and Ubuntu, macOS, and Windows.

More in Media Server

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…