Very simple auth-script for nginx-rtmp-module using a plaintext key.
- Build the binary
go build server.go
or download from Releases - Install binary
cp server /usr/bin/nginx-rtmp-keyauth
- Install systemd service
cp nginx-rtmp-keyauth.service /etc/systemd/system/
- Optional Modify key location by giving it to
nginx-rtmp-keyauth
as an argument - Write your key to
/key.txt
or your custom key location - Start the server
systemctl start nginx-rtmp-keyauth
- Configure
http://localhost:8080/auth
ason_publish
-hook for nginx-rtmp - Give the key as an argument when publishing
ffmpeg [...] -f flv rtmp://host:port/app/stream?key=<your key>