Skip to content

Migrate from Agora/Zego to Monibuca

More and more companies are looking for alternatives to Agora and Zego, primarily because of:

  • Cost: Per-minute billing becomes prohibitively expensive at scale
  • Data Privacy: Media data routes through third-party servers, failing compliance requirements
  • Control: Dependency on third-party SDK limits customization and debugging
  • Compliance: Government and enterprise clients require on-premises deployment

Monibuca is a high-performance open-source streaming engine built in Rust that provides API-compatible adapters for Agora and Zego, allowing you to:

  • Use the exact same code to connect to your own servers
  • Complete migration with zero code changes
  • Enjoy zero cloud service fees with self-hosted deployment

// Before — using Agora SDK
import AgoraRTC from "agora-rtc-sdk-ng";
// After — using Monibuca adapter (all other code remains the same)
import { AgoraRTC } from "@monibuca/adapter-agora";

All your existing business logic, event listeners, and track operations work without any changes.

// Before — using Zego SDK
import { ZegoExpressEngine } from "zego-express-engine-webrtc";
// After — using Monibuca adapter (all other code remains the same)
import { ZegoExpressEngine } from "@monibuca/adapter-zego";

Terminal window
# Download Monibuca
curl -fsSL https://monibuca.com/install.sh | bash
# Start (listens on port 8080 by default)
./monibuca
Terminal window
# If you're currently using Agora
npm uninstall agora-rtc-sdk-ng
npm install @monibuca/adapter-agora
# If you're currently using Zego
npm uninstall zego-express-engine-webrtc
npm install @monibuca/adapter-zego

Global find-and-replace the import path (see examples above). No business code changes needed.

Agora users: Change the first parameter of join() (originally appId) to your Monibuca server WebSocket URL

// Before — connecting to Agora cloud
await client.join("your-agora-app-id", "channel", token, uid);
// After — connecting to Monibuca
await client.join("ws://your-server:8080", "channel", null, uid);

Zego users: Change the server parameter to your Monibuca server URL

// Before — connecting to Zego cloud
const zg = new ZegoExpressEngine(appID, "wss://xxx.zego.im/ws");
// After — connecting to Monibuca
const zg = new ZegoExpressEngine(0, "ws://your-server:8080");

CategorySupported Methods
ClientcreateClient, join, leave, publish, unpublish, subscribe, unsubscribe
Track CreationcreateMicrophoneAudioTrack, createCameraVideoTrack, createScreenVideoTrack, createMicrophoneAndCameraTracks
Device ManagementgetCameras, getMicrophones, getPlaybackDevices, checkSystemRequirements
Track Controlplay, stop, close, setEnabled, setVolume, setDevice
Eventsuser-joined, user-left, user-published, user-unpublished, connection-state-change
CategorySupported Methods
RoomloginRoom, logoutRoom
PublishingcreateZegoStream, createStream, startPublishingStream, stopPublishingStream
PlayingstartPlayingStream, stopPlayingStream
DevicesenumDevices, useAudioDevice, useVideoDevice
MessagingsendBroadcastMessage
EventsroomStateChanged, roomUserUpdate, roomStreamUpdate, publisherStateUpdate, playerStateUpdate, publishQualityUpdate, playQualityUpdate, IMRecvBroadcastMessage

The following cloud service features are outside the adapter scope:

  • Cloud Recording (use Monibuca’s MP4 plugin instead)
  • CDN Relay (Monibuca natively supports RTMP/HLS distribution)
  • Content Moderation (integrate third-party services)
  • Token Authentication (Monibuca has its own auth system)
  • Beauty Filters/Virtual Background (Monibuca Web SDK has built-in AI effects)

How does performance compare to Agora/Zego?

Section titled “How does performance compare to Agora/Zego?”

Monibuca uses standard WHIP/WHEP protocols with end-to-end latency typically 200-500ms (same tier as Agora/Zego). The Rust-based server achieves extremely high performance — a single node can handle thousands of concurrent streams.

Yes, Monibuca is a self-hosted solution. The benefits are complete data control, zero recurring fees, and full scalability. Best suited for organizations with ops teams.

Yes. You can use both the original vendor SDK and the Monibuca adapter in the same project, routing traffic by room/channel as needed.

Same as Agora/Zego — all modern browsers (Chrome, Firefox, Safari, Edge). It’s all WebRTC underneath.


See the complete interface documentation and usage examples: Web SDK Adapters API Reference