Quick Start
Starting Monibuca
Section titled “Starting Monibuca”Start with Default Configuration
Section titled “Start with Default Configuration”# Download and run the pre-compiled binary (amd64 example)wget https://download.m7s.live/bin/monibuca_v6_linux_amd64.tar.gztar -xzf monibuca_v6_linux_amd64.tar.gzchmod +x monibuca_linux_amd64./monibuca_linux_amd64Start with a Configuration File
Section titled “Start with a Configuration File”# Use a custom configuration file./monibuca -c config.yamlStart with Docker
Section titled “Start with Docker”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:v6Docker quick path (pull → play)
Section titled “Docker quick path (pull → play)”For a one-command Monibuca + coturn try-out (dual ICE + TURN for WebRTC):
git clone https://github.com/Monibuca/Enterprise.gitcd Enterprise/deploy/composedocker pull langhuihui/monibuca:v6cp .env.example .env # set PUBLIC_IPdocker compose up -dPublish: ffmpeg -re -i input.mp4 -c copy -f flv rtmp://localhost/live/test
Play: open http://localhost:8180/flv/live/test.flv or http://localhost:8180/demo/live-room in a browser.
Full operator guide (image tags, WHIP/WHEP, firewall): deploy/compose/README.md.
Basic Configuration
Section titled “Basic Configuration”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 & Subscribertmp: enable: true tcp: listenaddr: ":1935"
# RTSP - Surveillance Device Integrationrtsp: enable: true tcp: listenaddr: ":8554"
# HLS - Widely Compatible Playbackhls: enable: true segmentduration: 6 maxsegments: 5
# WebRTC - Ultra-Low Latencywebrtc: enable: true portrange: "udp:9000-9100"
# SRT - Secure Reliable Transportsrt: enable: true listenaddr: ":6000"Ports & firewall
Section titled “Ports & firewall”Before public / NAT deployment, allow the inbound ports you use. Full matrix: Ports & Firewall (HTTP 8180, RTMP 1935, RTSP 8554, SRT 6000/udp, WebRTC ICE port_range, cluster QUIC 8002/udp, coturn 3478, and more).
With dual ICE, open both UDP and TCP spans and set public_ip / TURN as needed — see WebRTC.
For a local origin + coturn try-out, use the repo Compose reference: deploy/compose/ (copy .env.example → .env, set PUBLIC_IP, then docker compose up -d).
Publishing Streams
Section titled “Publishing Streams”RTMP Publishing
Section titled “RTMP Publishing”Use FFmpeg to push a video file to Monibuca:
# Publish to the live/test pathffmpeg -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/screenUsing OBS for publishing:
- Open OBS → Settings → Stream
- Service: Custom
- Server:
rtmp://localhost - Stream Key:
live/test
SRT Publishing
Section titled “SRT Publishing”ffmpeg -re -i input.mp4 -c copy -f mpegts \ "srt://localhost:6000?streamid=publish:/live/test"WebRTC Publishing (WHIP)
Section titled “WebRTC Publishing (WHIP)”# Publish using the WHIP protocol# POST http://localhost:8180/webrtc/whip?app=live&stream=test# Body: SDP Offer (application/sdp)Stream Playback
Section titled “Stream Playback”After successfully publishing a stream, you can play it through multiple protocols:
HTTP-FLV
Section titled “HTTP-FLV”# Open in browser or playerhttp://localhost:8180/flv/live/test.flv
# Play with ffplayffplay http://localhost:8180/flv/live/test.flv# Open in browser or playerhttp://localhost:8180/hls/live/test/index.m3u8
# Play with ffplayffplay http://localhost:8180/hls/live/test/index.m3u8WebRTC (WHEP)
Section titled “WebRTC (WHEP)”# Subscribe using the WHEP protocol# POST http://localhost:8180/webrtc/whep?app=live&stream=test# Body: SDP Offer (application/sdp)ffplay "srt://localhost:6000?streamid=subscribe:/live/test"ffplay rtsp://localhost:8554/live/testAdmin Panel
Section titled “Admin Panel”Monibuca includes a built-in Web admin panel providing stream management, system monitoring, and more.
Access URL
Section titled “Access URL”http://localhost:8180/adminDemo Access URLs
Section titled “Demo Access URLs”http://localhost:8180/demo/live-roomhttp://localhost:8180/demo/meeting-roomhttp://localhost:8180/demo/customer-serviceKey Features
Section titled “Key Features”- 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)
Authentication Configuration
Section titled “Authentication Configuration”Management APIs (/api/*, /v6/api/*, config writes, etc.) require an admin JWT when a secret is configured. The admin SPA redirects to /login and attaches Authorization: Bearer … automatically.
Recommended YAML:
global: auth: secret: "your-jwt-secret-key" users: - username: admin password: your_secure_password role: adminEnvironment variable:
export M7S_AUTH_SECRET="your-jwt-secret-key"Local development (bypass auth — never in production):
export M7S_ADMIN_DEV_MODE=1Login: POST /api/auth/login → access_token / refresh_token. The admin UI refreshes tokens and redirects to /login on 401.
Environment Variable Configuration
Section titled “Environment Variable Configuration”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.
Examples
Section titled “Examples”# Change RTMP listen portexport M7S_RTMP_TCP_LISTENADDR=":1936"
# Change global log levelexport M7S_GLOBAL_LOGLEVEL="debug"
# Change publish timeoutexport M7S_GLOBAL_PUBLISH_PUBTIMEOUT="30"
# Change WebRTC ICE serversexport M7S_WEBRTC_ICESERVERS="stun:stun.l.google.com:19302"Usage in Docker
Section titled “Usage in Docker”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:v6Common APIs
Section titled “Common APIs”After startup, you can query the service status through the HTTP API:
# Get system summarycurl http://localhost:8180/api/summary
# Get stream listcurl 'http://localhost:8180/v6/api/streams?page=1&per_page=20'
# Get plugin listcurl http://localhost:8180/api/pluginsNext Steps
Section titled “Next Steps”- Configuration Guide — Deep dive into the configuration system
- Ports & Firewall — Default ports and allowlist notes
- deploy/compose — Docker Compose: Monibuca + coturn
- System Architecture — Understand Monibuca’s internal design
- Protocol Overview — Detailed usage for each protocol