Slyber SFU Server is a high-performance, zero-dependency Selective Forwarding Unit (SFU) for real-time WebRTC audio, video, and data routing, engineered in Go on top of Pion WebRTC v4. Distributed as a single statically compiled binary for linux/amd64 and linux/arm64 (as well as a minimal Alpine Docker image), it powers group video conferencing, sub-millisecond 1-on-1 video roulettes, low-latency WHIP/WHEP broadcasting, and full-duplex AI voice agent pipelines-designed to pair seamlessly with Slyber TURN Server.
- Single-Port Multiplexing: All
ICE-Lite,DTLS-SRTP, andRFC 4571 ICE-TCPmedia sessions run over a single port4443(UDP & TCP) viaICEUDPMuxandICETCPMux, eliminating 10,000+ ephemeral firewall port ranges. - Adaptive Simulcast & VP9 SVC: Per-viewer bandwidth estimation (
SubscriberBWEvia TWCC, REMB, and RTCP Receiver Reports) with per-layerPacketRingBufferNACK recovery and independent 500msPLICoalescerfilters. - Zero-Allocation Hot Path & <1ms Roulette Swap: Packet routing backed by atomic reference-counted
sync.Poolbuffers andSeqTimestampRewriterfor instantaneous peer switching without SDP renegotiation. - Full-Duplex AI Voice Gateway (
/ai/ws): Native WebSocket audio pipe with a built-in 20ms RTP pacer, 6-bot multiplexing (mode=mux), andRFC 6464header-based VAD Barge-In interruption. - Zero-Trust Security & Gateways: Enforced
RFC 9605 SFrameE2EE with MLS key rotation,RFC 9626 Frame Markinglayer routing, 1-RTTWHIP/WHEPstreaming,MoQ Draft-22packaging, andHMAC-SHA256inter-server cascading with SSRF filtering.
One-Command Production Installation
The installation script automatically detects the CPU architecture (amd64 / arm64), verifies the SHA256SUMS checksum, tunes Linux kernel socket buffers (net.core.rmem_max / wmem_max up to 8 MB), configures firewall rules, generates cryptographic secrets in /opt/slyber_sfu/.env, registers the systemd unit, and runs self-diagnostics.
curl -fsSL https://raw.githubusercontent.com/slyber-app/slyber-sfu-server/main/install.sh | sudo bash
docker pull ghcr.io/slyber-app/slyber-sfu-server:latest
docker rm -f slyber-sfu-server 2>/dev/null || true
PUBLIC_IP=$(curl -fsSL4 --max-time 2 api.ipify.org 2>/dev/null || echo 127.0.0.1)
TURN_SECRET=$(head -c 24 /dev/urandom | od -An -tx1 | tr -d ' \n' | head -c 32)
JWT_SECRET=$(head -c 24 /dev/urandom | od -An -tx1 | tr -d ' \n' | head -c 32)
NODE_SECRET=$(head -c 24 /dev/urandom | od -An -tx1 | tr -d ' \n' | head -c 32)
docker run -d \
--name slyber-sfu-server \
--restart unless-stopped \
-p 4443:4443/udp \
-p 4443:4443/tcp \
-p 8090:8090/tcp \
-e SFU_ENV="production" \
-e PUBLIC_IP="${PUBLIC_IP}" \
-e REALM="slyber.com" \
-e SFU_UDP_PORT="4443" \
-e SFU_TCP_PORT="4443" \
-e SFU_HTTP_PORT="8090" \
-e AUTH_MODE="jwt" \
-e TURN_SECRET="${TURN_SECRET}" \
-e JWT_SECRET="${JWT_SECRET}" \
-e NODE_SECRET="${NODE_SECRET}" \
ghcr.io/slyber-app/slyber-sfu-server:latest \
&& sleep 1 && docker exec slyber-sfu-server slyber_sfu doctor
Upon startup, the built-in slyber_sfu doctor utility validates network sockets, public IP routing, authentication secrets, and Redis reachability:
================================================================
SLYBER SFU DOCTOR | Version: v1.0.0 | Node: slyber-sfu-01
================================================================
[OK] Environment : production
[OK] Public IP & Realm : 89.111.175.67 (slyber.com)
[OK] Pion ICE Mux : UDP :4443 | TCP :4443 (ICE-TCP=true) | HTTP :8090
[OK] Auth & Security : jwt (E2EE=true, External TURN=1)
[OK] All Slyber SFU self-diagnostics passed.
================================================================
Architectural Deep Dives
For a detailed engineering breakdown of the internal subsystems behind Slyber SFU Server, read the companion architectural articles:
- Zero-Allocation WebRTC SFU Architecture in Go: Single-Port Multiplexing & Sub-Millisecond Swaps
- Building Real-Time AI Voice Pipelines over WebRTC SFU Without Server-Side Transcoding
Key Technical Specifications
| Subsystem | Slyber SFU Server Implementation |
| WebRTC Transport Mux | Pion WebRTC v4 in ICE-Lite mode; single port 4443/UDP (ICEUDPMux) and 4443/TCP (RFC 4571 ICETCPMux) with public IP candidate rewriting and 8 MB OS socket buffers. |
| Packet Memory Engine | Lock-free sync.Pool packet recycling with atomic reference counting (Retain / Release) and in-place RTP header/padding parsing. |
| Simulcast, SVC & QoS | 3 spatial layers (q/h/f) and VP9 SVC filtering; per-layer 512-packet NACK ring buffers; independent 500ms PLICoalescer filters; SubscriberBWE controller (TWCC, REMB, RTCP RR). |
| Conference & Roulette | RFC 6464 audio-level active speaker detection, EnforceLastNVideo camera pausing, and FastSwapRouletteTrack (<1ms swap) with monotonic sequence/timestamp rewriting. |
| Authentication & Rate Limits | Constant-time verification for HS256 JWT (with capability claims), pooled Redis sessions (instant revocation), and HMAC-SHA1 tokens, plus atomic token-bucket rate limiting (TrafficPolice). |
| End-to-End Encryption | RFC 9605 SFrame validation with up to 16 MLS keys per SSRC, 512-packet anti-replay bitmap window, and unencrypted RFC 9626 Frame Marking layer inspection. |
| Gateways & Telemetry | WHIP/WHEP (1-RTT OBS ingest), full-duplex /ai/ws voice pipe, MoQ Draft-22 relay, HMAC-SHA256 UDP node cascade with SSRF protection, and Prometheus /metrics. |
| Capability | Slyber SFU | Traditional C++ SFUs | Managed Cloud SFUs |
| Deployment Artifact | 1 static Go binary | Multi-library native builds | Proprietary SaaS |
| Media Firewall Ports | 1 port (4443 UDP/TCP) | 10,000+ UDP ports | Managed |
| AI Voice Bot Gateway | Built-in /ai/ws + 20ms pacer | Custom WebRTC/GStreamer glue | Extra add-on / high latency |
| 1v1 Roulette Track Swap | <1ms pointer swap (0 SDP) | Full SDP renegotiation | Re-subscribe delay |
| SFrame E2EE Validation | Native RFC 9605 + MLS | Manual insertable streams | Enterprise tier only |
Connecting a Client via WebSocket Signaling
Clients connect to /ws, authenticate with a signed JWT, exchange SDP Offer/Answer, and subscribe to remote tracks (full signaling protocol reference):
const ws = new WebSocket("wss://sfu.example.com/ws");
const pc = new RTCPeerConnection({ bundlePolicy: "max-bundle" });
ws.onopen = async () => {
const offer = await pc.createOffer();
await pc.setLocalDescription(offer);
ws.send(JSON.stringify({
type: "join",
room_id: "conference-alpha",
token: "YOUR_HS256_JWT_TOKEN",
sdp: offer.sdp
}));
};
ws.onmessage = async ({ data }) => {
const msg = JSON.parse(data);
if (msg.type === "joined" && msg.sdp) {
await pc.setRemoteDescription({ type: "answer", sdp: msg.sdp });
} else if (msg.type === "publish_track") {
ws.send(JSON.stringify({ type: "subscribe_track", track_id: msg.track_id, spatial_layer: 2 }));
} else if (msg.type === "offer") {
await pc.setRemoteDescription({ type: "offer", sdp: msg.sdp });
const answer = await pc.createAnswer();
await pc.setLocalDescription(answer);
ws.send(JSON.stringify({ type: "answer", sdp: answer.sdp }));
}
};