Sngine Live Pro is a complete self-hosted live streaming stack for Sngine, web viewers, mobile apps, and OBS publishing.

This package combines a Docker-based live server, a Laravel control panel, OvenMediaEngine for WebRTC and RTMP, Socket.IO realtime events, recording workflow, optional FFmpeg processing, S3 delivery, and the matching Sngine addon. It is designed so you can run your own live system without relying on a third-party livestream provider.

WebRTC RTMP + OBS HLS Fallback Recording + Replay FFmpeg Variants Gifts + Earnings Flutter Ready

What You Get

Live Server Stack Docker Compose stack with Nginx, Laravel, MariaDB, Redis, queue worker, scheduler, Socket.IO, and OvenMediaEngine.
Sngine Addon Full addon files for live creation, watch page, comments, reactions, gifts, moderation, recording sync, and admin pages.
Flutter Integration Base Endpoints and realtime workflow ready for Flutter timeline integration and future mobile use cases.
The customer delivery package is intentionally clean. Docs and Markdown files are hosted separately on this documentation site, while the install package focuses on runnable server files. The same purchase code also grants protected access to the Sngine addon package.

Server Requirements

  • Linux server with Docker and Docker Compose installed.
  • A domain or subdomain for the live server, for example live.example.com.
  • Public IP address reachable from the internet.
  • Open ports for RTMP, WebRTC, HLS, TCP relay, and ICE UDP.
  • Purchase code for validation and domain binding.

Default service ports

1935RTMP publish
3333 / 3334WebRTC signaling
8088HLS output
3479TCP relay
10000 / 9999 UDPICE / media transport
8080 / 8443Public web entry through Nginx

1-Command Install Flow

The recommended customer flow is installer-based. The live package is not public. The shell installer validates the purchase code and domain first, then downloads the protected server package.

Step 1: download the installer
wget -O install-sngine-live-pro.sh https://sngine-live.fluttercrafters.com/install-sngine-live-pro.sh
Step 2: run it with your purchase code and target domain
bash install-sngine-live-pro.sh \
  --purchase-code=YOUR_PURCHASE_CODE \
  --domain=live.example.com \
  --target=/opt
Step 3: continue inside the extracted project
cd /opt/sngine-live-pro-advanced-live-streaming-system
cp .env.example .env
nano .env
./scripts/install.sh
The installer creates a local license file after validation and downloads the package only for approved buyers. The package is protected by purchase code checks, domain binding, and a short-lived one-time download token.

What the Installer Does Internally

  1. Calls the store manifest API with your purchase code, domain, and product slug.
  2. Verifies that the order is paid and active.
  3. Binds the purchase code to your domain if it is not already bound elsewhere.
  4. Receives a one-time package URL and downloads the protected tar archive.
  5. Extracts the live server package to your target directory.
  6. Writes a local license file so the deployment remains traceable.

If you move to a different domain later, you should reset or reassign the license according to your licensing workflow before reinstalling on another host.

Environment Variables You Should Edit First

The root .env controls public networking and OvenMediaEngine render values.

LIVE_DOMAIN=live.example.com
LIVE_PUBLIC_IP=
LIVE_SCHEME=https

LIVE_RTMP_PORT=1935
LIVE_WEBRTC_SIGNAL_PORT=3333
LIVE_WEBRTC_SIGNAL_TLS_PORT=3334
LIVE_HLS_PORT=8088
LIVE_HLS_SEGMENT_COUNT=6
LIVE_HLS_SEGMENT_DURATION=4
LIVE_ABR_ENABLED=true
LIVE_TCP_RELAY_PORT=3479
LIVE_ICE_UDP_PORT=10000
LIVE_ICE_UDP_ALT_PORT=9999
OME_API_PORT=8081
OME_API_TOKEN=change-me

The Laravel app also has its own laravel/.env. The render script updates the main live URLs automatically, but you should still review the admin credentials and defaults:

LIVE_ADMIN_USERNAME=admin
LIVE_ADMIN_PASSWORD=change-me
LIVE_DEFAULT_RECORDING_ENABLED=false
LIVE_DEFAULT_MAX_DURATION_MINUTES=240
LIVE_SOCKET_URL=http://localhost:6001
LIVE_SOCKET_SECRET=change-me
LIVE_FFMPEG_ENABLED=false
LIVE_FFMPEG_BINARY=ffmpeg
LIVE_FFMPEG_OUTPUT_FORMAT=mp4
LIVE_FFMPEG_RESOLUTIONS=source
If LIVE_PUBLIC_IP is empty, ./scripts/render-config.sh attempts to detect it automatically using https://api.ipify.org. If detection fails, set it manually.

First Boot Commands

./scripts/render-config.sh
docker compose up -d --build
docker compose exec laravel-app composer install
docker compose exec laravel-app php artisan key:generate
docker compose exec laravel-app php artisan migrate --force
docker compose exec laravel-app chown -R www-data:www-data storage bootstrap/cache
docker compose exec laravel-app chmod -R ug+rwX storage bootstrap/cache

These are wrapped for you inside ./scripts/install.sh, so most customers can run just that script after editing the environment files.

Admin Dashboard Structure

After the stack is running, open /admin/login on your live server. The dashboard is organized into sections so operators can manage the stack without editing environment files for every change.

Live Policy Set max live duration and whether users are allowed to request recording on new streams.
Recording Storage Keep recordings locally or switch replay storage to S3-compatible storage.
FFmpeg Processing Enable processing, choose MP4 or WebM, select one or more replay resolutions, preset, CRF, and timeout.
Connection Settings Control RTMP, WebRTC, HLS, HLS probe, playlist name, and Socket.IO public URL.
Security Secrets Store API keys, API secret, OME admission secret, socket secret, and approved client domains.
S3 Storage Save access key, secret, bucket, region, endpoint, CDN URL, and path-style mode.

Sngine Addon Setup

The live product also includes the Sngine addon. Install it on your Sngine website, import the SQL, then connect it to your live server.

  1. Upload the addon files to your Sngine project.
  2. Run fluttercrafters-livestream/install.sql on the Sngine database.
  3. Open the addon admin area from your Sngine side.
  4. Save the connection values that point to your live server.

Primary Sngine addon settings

Live API URL Example: https://live.example.com
API Key + Secret Must match the values configured in the live server admin security section.
Socket.IO URL + Path Used for realtime comments, reactions, gifts, and viewer counts.
WebRTC Base URL Used for publish and watch flows in the modern live experience.
RTMP Publish URL Used for OBS broadcasting and server-side publishing workflows.
Live Provider Mode Admins can decide whether users see the Fluttercrafters live system or the legacy Agora flow.
The addon also supports audience gating by follower and friend counts, gift catalog and platform commission settings, pinned comments, live comment moderation, muted users, live reactions, and recording sync back to Sngine posts.

Recording, FFmpeg, Replay Variants, and S3

The server can start and stop live recording through OvenMediaEngine and then optionally process the saved file through FFmpeg before replay links are published back to the system.

  • Recording can be allowed or disallowed globally from the live policy section.
  • Recordings are initially written to the mounted recordings path and then published as replay links.
  • FFmpeg can be enabled or disabled at any time from the admin dashboard.
  • Replay output format supports mp4 and webm.
  • You can select multiple resolutions such as source, 1080p, 720p, 480p, and 360p.
  • If S3 storage is enabled and configured, replay variants can be uploaded to S3-compatible storage automatically.

Useful admin choices

FormatMP4 or WebM
PresetExample: veryfast
CRFQuality control value from 0 to 51
TimeoutProcessing timeout in seconds
StorageLocal public disk or S3
VariantsOne or many replay qualities

Security and Website Restrictions

The live server uses a signed server-to-server API model for Sngine integration.

  • X-Sngine-Api-Key identifies the client website.
  • X-Sngine-Signature signs the raw body using the shared live API secret.
  • The live server admin can restrict usage to approved client domains only.
  • If domain restriction is enabled and the allowlist is empty, all websites will be blocked until approved domains are added.

Recommended hardening checklist

  1. Change LIVE_ADMIN_USERNAME and LIVE_ADMIN_PASSWORD.
  2. Set a strong LIVE_API_SECRET.
  3. Set a strong LIVE_SOCKET_SECRET.
  4. Set a strong OME_ADMISSION_SECRET.
  5. Enable the approved websites restriction and add your real production domains.
  6. Run behind HTTPS and point your public domain to the Nginx entry.

API and Realtime Overview

Sngine-facing API routes

POST /api/sngine/live/create
POST /api/sngine/live/start
POST /api/sngine/live/stop
GET  /api/sngine/live/{stream}
GET  /api/sngine/live/{stream}/watch
POST /api/sngine/live/token
POST /api/sngine/live/comment
POST /api/sngine/live/gift
GET  /api/sngine/live/{stream}/recording
POST /api/sngine/live/{stream}/recording

Public watch and studio routes

GET  /admin
GET  /studio
GET  /watch/{stream}
GET  /watch/{stream}/playback
POST /watch/{stream}/heartbeat
GET  /watch/{stream}/comments
POST /watch/{stream}/comments

The realtime layer is designed for live comments, reactions, gifts, viewer counts, moderation actions, and low-latency session state updates across viewers and broadcasters.

Troubleshooting

Installer says the domain is not allowed

Make sure the purchase code is valid and that you are installing on the domain you want to bind to that license.

WebRTC is not connecting

Check that your public domain is using HTTPS, the WebRTC ports are reachable, and LIVE_PUBLIC_IP is correct.

OBS says the stream key or channel cannot be reached

Verify the RTMP publish URL, stream key, port 1935 mapping, and that the media server container is running.

Replay files are missing

Check whether recording is enabled for that stream, whether the maximum live policy allows it, and whether S3 or FFmpeg settings are valid.

FFmpeg variants do not appear

Confirm that FFmpeg is installed in the container, FFmpeg processing is enabled in admin, and at least one output resolution is selected.

Client website cannot use the live API

Review API key, API secret, approved client domains, and ensure the Sngine addon is using the same server URLs configured in the live dashboard.

How do I update after deployment?

cd /path/to/sngine-live-pro
./scripts/update.sh

This rerenders the server configuration, refreshes Composer dependencies in production mode, reruns migrations, and clears optimized Laravel caches.