# Janus Gateway — General Purpose WebRTC Server > A modular, open-source WebRTC gateway that handles media negotiation, recording, streaming, and SIP bridging through a plugin-based architecture. ## Install Save in your project root: # Janus Gateway — General Purpose WebRTC Server ## Quick Use ```bash # Install dependencies (Ubuntu) sudo apt install libmicrohttpd-dev libjansson-dev libssl-dev libsrtp2-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libconfig-dev pkg-config gengetopt libtool automake # Build from source git clone https://github.com/meetecho/janus-gateway.git cd janus-gateway && sh autogen.sh && ./configure && make && sudo make install # Start the server janus ``` ## Introduction Janus is a general-purpose WebRTC server developed by Meetecho. Unlike monolithic video platforms, Janus provides a lightweight core that delegates media logic to plugins, making it suitable for building custom real-time communication applications from video rooms to SIP gateways. ## What Janus Gateway Does - Negotiates WebRTC sessions (ICE, DTLS, SRTP) between browsers and server-side plugins - Provides built-in plugins for video rooms, SIP bridging, streaming, recording, and screen sharing - Handles media relay, mixing, and forwarding with low latency overhead - Exposes a JSON-based API over HTTP, WebSocket, RabbitMQ, or MQTT transports - Supports simulcast, SVC, and bandwidth estimation for adaptive quality ## Architecture Overview Janus runs as a single C process with a thin core that handles WebRTC session setup (ICE candidates, DTLS handshakes, SRTP encryption). All application logic lives in dynamically loaded plugins. Each plugin manages its own sessions and media flows. The core routes media packets between browser peers and plugins based on session handles. Transport plugins handle the signaling layer, decoupling the API protocol from the media path. ## Self-Hosting & Configuration - Build from source on Linux; requires libnice, libsrtp2, and OpenSSL development headers - Configure transport plugins (HTTP, WebSocket, MQTT) in `/etc/janus/` config files - Enable or disable media plugins by toggling their config files in the plugins directory - Set up a TURN server (like Coturn) for NAT traversal in production deployments - Use the built-in admin API for runtime monitoring and session management ## Key Features - Plugin architecture that separates core WebRTC handling from application logic - Built-in video room plugin supporting up to dozens of participants per room - SIP plugin for bridging WebRTC calls to traditional telephony networks - Streaming plugin for one-to-many live video distribution via WebRTC - Recording plugin that saves sessions to MJR files for later replay or transcoding ## Comparison with Similar Tools - **LiveKit** — modern Go-based SFU; easier to deploy for video rooms but less flexible plugin model than Janus - **mediasoup** — Node.js SFU library; embeddable in JS apps but requires building your own signaling layer - **Kurento** — Java-based media server; stronger media processing pipeline but heavier resource footprint - **Pion** — Go WebRTC library; lower-level building blocks, not a ready-to-use server like Janus ## FAQ **Q: How many participants can a Janus video room support?** A: Depends on server resources and media quality settings. A well-configured server handles 30-50 participants in a single room with selective forwarding. **Q: Does Janus do transcoding?** A: By default it operates as an SFU (selective forwarding unit) and does not transcode. Plugins can be extended for MCU-style mixing if needed. **Q: What browsers are supported?** A: All modern browsers with WebRTC support: Chrome, Firefox, Safari, and Edge. Mobile browsers on iOS and Android are also supported. **Q: Can I use Janus for production live streaming?** A: Yes. The streaming plugin distributes live feeds to thousands of WebRTC viewers. For very large audiences, combine it with an HLS/DASH CDN fallback. ## Sources - https://github.com/meetecho/janus-gateway - https://janus.conf.meetecho.com/docs/ --- Source: https://tokrepo.com/en/workflows/asset-baa90456 Author: AI Open Source