Docker is the quickest way to try Bunryu. The image is for testing, demos and development; it is not a supported production deployment. Production servers use the native install, which runs SRS and the relay as a separate, restricted user under systemd. The image runs on a laptop or a test machine; it does not get that hardening and the security review does not cover it.
Quick start
git clone https://github.com/live-miracles/bunryu
cd bunryu
docker compose up -d
docker compose logs bunryu | grep -A3 "generated the dashboard password"
Open http://localhost:8080, log in with the password the log shows, create a
pipeline and publish to it. To choose the password
yourself, start with BUNRYU_DASHBOARD_PASSWORD='choose-a-long-password' docker compose up -d
(see Secrets).
No camera or local FFmpeg? Run the image's own FFmpeg as a test source
(<stream-key> is from the pipeline panel; stop it with Ctrl+C):
docker exec bunryu ffmpeg -re -f lavfi -i testsrc2=size=1280x720:rate=30 \
-f lavfi -i sine=frequency=440 \
-c:v libx264 -preset veryfast -b:v 2500k -pix_fmt yuv420p -g 60 \
-c:a aac -b:a 128k \
-f flv rtmp://localhost:21935/live/<stream-key>
The image is x86_64 only. On Apple Silicon Macs and other ARM hosts it runs emulated, which is for trying and developing only; run production on Linux x86_64 (see Details).
Details
The image bundles the control plane, SRS, goryu and the same
pinned FFmpeg build as the native installer (x86_64 only). On an ARM host such
as an Apple Silicon Mac, compose.yaml makes Docker emulate it (with plain
docker build and docker run, add --platform linux/amd64); that is slower, so
use it only to try or develop Bunryu. See
why there is no ARM image.
One container runs
all three processes under a small supervisor (docker/entrypoint.sh) that
keeps the native startup order: SRS starts only after /api/ready answers,
each process is restarted 2 s after it exits, and every start and exit is
logged with its status. The exception is a failure only an operator can fix, a
database of another schema version or a missing or invalid bunryu.json, srs.conf or
goryu.json: the control plane exits with status 78, the supervisor logs it and starts
nothing else, and the container stays up but unhealthy until the cause is fixed (remove
/data/db.sqlite for the database) and it is restarted.
docker compose up -d # build and start (compose.yaml)
docker compose logs -f bunryu # all three processes log here
docker compose down # stop; data stays in the volume
Or without compose:
docker build -t bunryu .
docker run -d --name bunryu --restart unless-stopped \
-p 8080:8080 -p 21935:21935 -p 10080:10080/udp -p 10081:10081/udp \
-v bunryu-data:/data bunryu
docker logs bunryu 2>&1 | grep -A3 "generated the dashboard password"
Add -e BUNRYU_DASHBOARD_PASSWORD='choose-a-long-password' to choose the password.
- Data: everything persistent is in the
/datavolume:db.sqlite,bunryu.json, the generatedsrs.conf/goryu.json, HLS previews and diagnostics. On every start the SRS and relay configs are refreshed from the image and keep their SRT passphrase, like a reinstall;bunryu.jsonkeeps any setting you added and gets only the port and paths set. - Secrets: on the first start (an empty
/datavolume) the dashboard password isBUNRYU_DASHBOARD_PASSWORDif you set it (at least 12 characters, otherwise the container stops with an error). If you don't, the container generates a random one and prints it once in its log; it is not written to a file, so a later start does not show it again. Only its hash is stored, in the database. Change it in Settings → Change Password, or if it is lost, see Authentication. A password you set yourself is never logged. The container also generates a random SRT passphrase. - Public host: set Settings → Public Host to the address encoders use, so the dashboard's publish URLs are correct.
- Limitations: the dashboard's SRS/relay/app log viewers read journald, so
they are empty in Docker; use
docker compose logs. The version panel shows the commit asunknown. The Goryu needs UDP port 10081 published as above. The image can't raise the kernel's UDP buffer ceiling; see UDP buffer ceiling.