Installation#

Download Pre-built Binaries#

Go to the GitHub Releases page and download the archive for your platform:

PlatformArchitectureFilename
Linuxamd64rtmp-server-linux-amd64.tar.gz
Linuxarm64rtmp-server-linux-arm64.tar.gz
macOSamd64rtmp-server-darwin-amd64.tar.gz
macOSarm64 (Apple Silicon)rtmp-server-darwin-arm64.tar.gz
Windowsamd64rtmp-server-windows-amd64.zip

Linux / macOS — extract and make executable:

tar xzf rtmp-server-*.tar.gz
chmod +x rtmp-server

Windows — extract the .zip archive. The rtmp-server.exe binary is ready to use.

Verify the binary works:

./rtmp-server -version

Build from Source#

Prerequisites#

Steps#

Clone the repository and build:

git clone https://github.com/alxayo/rtmp-go.git && cd rtmp-go
go build -o rtmp-server ./cmd/rtmp-server

Cross-Compile for Other Platforms#

Go makes it easy to build for any supported OS and architecture:

GOOS=linux GOARCH=amd64 go build -o rtmp-server-linux ./cmd/rtmp-server
GOOS=darwin GOARCH=arm64 go build -o rtmp-server-mac ./cmd/rtmp-server
GOOS=windows GOARCH=amd64 go build -o rtmp-server.exe ./cmd/rtmp-server

Optimized Production Build#

For the smallest, fully static binary suitable for production or containers:

CGO_ENABLED=0 go build -ldflags="-w -s" -o rtmp-server ./cmd/rtmp-server
FlagPurpose
CGO_ENABLED=0Produces a statically linked binary with no C library dependency.
-wOmits the DWARF debug symbol table, reducing binary size.
-sOmits the Go symbol table, further reducing binary size.

Verify Installation#

Check the version:

./rtmp-server -version

Do a quick smoke test — start the server and then stop it with Ctrl+C:

./rtmp-server -listen :1935

System Requirements#

RequirementDetails
Go 1.21+Required for building from source only. Pre-built binaries have no runtime dependency on Go.
Runtime dependenciesNone — the binary is fully self-contained.
FFmpeg / ffplayOptional. Useful for publishing test streams and playing them back.
OBS StudioOptional. Use it for live streaming with a GUI (set the server URL to rtmp://localhost:1935/live/stream-key).