Skip to content

Quick Start

Terminal window
# Download and run the pre-compiled binary (amd64 example)
wget https://download.m7s.live/bin/monibuca_v6_linux_amd64.tar.gz
tar -xzf monibuca_v6_linux_amd64.tar.gz
chmod +x monibuca_linux_amd64
./monibuca_linux_amd64
Terminal window
# Use a custom configuration file
./monibuca -c config.yaml
Terminal window
docker run -d \
--name monibuca \
-p 8180:8180 \
-p 8443:8443 \
-p 1935:1935 \
-p 8554:8554 \
-p 50051:50051 \
-p 6000:6000/udp \
-p 9000-9100:9000-9100/udp \
langhuihui/monibuca:v6

Create a config.yaml file:

global:
loglevel: info
http:
listenaddr: ":8180"
cors: true
tcp:
listenaddr: ":50051"
publish:
ringsize: 256
subscribe:
subtimeout: 10
waittimeout: 10
db:
dsn: "sqlite:m7s.db?mode=rwc"
admin:
enablelogin: false
# RTMP - Publish & Subscribe
rtmp:
enable: true
tcp:
listenaddr: ":1935"
# RTSP - Surveillance Device Integration
rtsp:
enable: true
tcp:
listenaddr: ":8554"
# HLS - Widely Compatible Playback
hls:
enable: true
segmentduration: 6
maxsegments: 5
# WebRTC - Ultra-Low Latency
webrtc:
enable: true
portrange: "udp:9000-9100"
# SRT - Secure Reliable Transport
srt:
enable: true
listenaddr: ":6000"

Use FFmpeg to push a video file to Monibuca:

Terminal window
# Publish to the live/test path
ffmpeg -re -i input.mp4 -c copy -f flv rtmp://localhost/live/test
# Publish from camera (macOS)
ffmpeg -f avfoundation -i "0" -c:v libx264 -f flv rtmp://localhost/live/camera
# Publish from desktop (Linux)
ffmpeg -f x11grab -i :0.0 -c:v libx264 -f flv rtmp://localhost/live/screen

Using OBS for publishing:

  1. Open OBS → Settings → Stream
  2. Service: Custom
  3. Server: rtmp://localhost
  4. Stream Key: live/test
Terminal window
ffmpeg -re -i input.mp4 -c copy -f mpegts \
"srt://localhost:6000?streamid=publish:/live/test"
Terminal window
# Publish using the WHIP protocol
# POST http://localhost:8180/webrtc/whip?app=live&stream=test
# Body: SDP Offer (application/sdp)

After successfully publishing a stream, you can play it through multiple protocols:

Terminal window
# Open in browser or player
http://localhost:8180/flv/live/test.flv
# Play with ffplay
ffplay http://localhost:8180/flv/live/test.flv
Terminal window
# Open in browser or player
http://localhost:8180/hls/live/test/index.m3u8
# Play with ffplay
ffplay http://localhost:8180/hls/live/test/index.m3u8
Terminal window
# Subscribe using the WHEP protocol
# POST http://localhost:8180/webrtc/whep?app=live&stream=test
# Body: SDP Offer (application/sdp)
Terminal window
ffplay "srt://localhost:6000?streamid=subscribe:/live/test"
Terminal window
ffplay rtsp://localhost:8554/live/test

Monibuca includes a built-in Web admin panel providing stream management, system monitoring, and more.

http://localhost:8180/admin
http://localhost:8180/demo/live-room
http://localhost:8180/demo/meeting-room
http://localhost:8180/demo/customer-service
  • Stream List: View all currently active streams, including publisher and subscriber information
  • System Info: Monitor system resources such as CPU, memory, and network
  • Plugin Status: View loaded plugins and their configurations
  • Configuration Management: Modify configuration online (via API)

By default, the admin panel does not require login. To enable authentication:

global:
admin:
enablelogin: true
username: admin
password: your_secure_password

Monibuca supports overriding configuration file values via environment variables in the following format:

M7S_{PLUGIN}_{FIELD}

All letters are uppercase, and nested fields are separated by underscores.

Terminal window
# Change RTMP listen port
export M7S_RTMP_TCP_LISTENADDR=":1936"
# Change global log level
export M7S_GLOBAL_LOGLEVEL="debug"
# Change publish timeout
export M7S_GLOBAL_PUBLISH_PUBTIMEOUT="30"
# Change WebRTC ICE servers
export M7S_WEBRTC_ICESERVERS="stun:stun.l.google.com:19302"
Terminal window
docker run -d \
--name monibuca \
-e M7S_GLOBAL_LOGLEVEL=info \
-e M7S_RTMP_TCP_LISTENADDR=":1935" \
-e M7S_GLOBAL_HTTP_LISTENADDR=":8180" \
-p 8180:8180 \
-p 1935:1935 \
langhuihui/monibuca:v6

After startup, you can query the service status through the HTTP API:

Terminal window
# Get system summary
curl http://localhost:8180/api/summary
# Get stream list
curl http://localhost:8180/api/stream/list
# Get plugin list
curl http://localhost:8180/api/plugins