Overview
Discover what makes Janus WebRTC Server powerful
Janus is a lightweight, C‑based WebRTC gateway that exposes a **JSON‑over‑WebSocket/REST** API for building custom media pipelines. It acts as a broker between browsers (or any WebRTC‑capable clients) and server‑side media logic, relaying RTP/RTCP streams, data channels, and control messages. The core server remains minimal—only the networking stack and a plugin interface—while all application‑specific functionality is encapsulated in **plugins** (e.g., echo, conference bridge, SIP gateway). This design gives developers fine‑grained control over media handling while keeping the footprint small enough to run on embedded devices or high‑scale cloud instances.
Core language
Transport layers
Optional protocols
Message bus
Overview
Janus is a lightweight, C‑based WebRTC gateway that exposes a JSON‑over‑WebSocket/REST API for building custom media pipelines. It acts as a broker between browsers (or any WebRTC‑capable clients) and server‑side media logic, relaying RTP/RTCP streams, data channels, and control messages. The core server remains minimal—only the networking stack and a plugin interface—while all application‑specific functionality is encapsulated in plugins (e.g., echo, conference bridge, SIP gateway). This design gives developers fine‑grained control over media handling while keeping the footprint small enough to run on embedded devices or high‑scale cloud instances.
Architecture & Technical Stack
- Core language: C (GLib for event handling, Jansson for JSON parsing).
- Transport layers: libnice (ICE), OpenSSL/TLS, libsrtp for SRTP.
- Optional protocols: usrsctp (data channels), libmicrohttpd, libwebsockets for REST/WebSocket APIs.
- Message bus: optional RabbitMQ, MQTT, Nanomsg support for event distribution.
- Build system: autotools with optional CMake for WebSocket/BoringSSL builds.
- No database: Janus itself is stateless; state is maintained in memory or via external services exposed by plugins.
Core Capabilities & APIs
- Session and transaction management: Create, modify, and destroy WebRTC sessions via JSON messages.
- Media control: Attach/detach audio/video tracks, set codecs, negotiate SDP.
- Data channel support: SCTP over DTLS via usrsctp.
- REST & WebSocket API endpoints: Expose plugin interfaces, configuration, and diagnostics.
- Event hooks: Plugins can publish events to external systems (RabbitMQ, MQTT) or receive them back via the API.
- Extensibility: New plugins are compiled as shared objects and loaded at runtime; the plugin API is documented in
plugins/README.md.
Deployment & Infrastructure
- Self‑hosting: Runs on Linux (native) or macOS; Windows support via WSL.
- Containerization: Official Docker images available; the binary can be packaged in Alpine or Debian containers.
- Scalability: Stateless core allows horizontal scaling behind a load balancer; media traffic is routed per session to the same instance.
- Resource footprint: < 50 MB binary, minimal RAM usage (≈ 10–20 MiB) when idle.
- High‑availability: Combine with external signaling (e.g., Kubernetes Service Mesh) and persistent storage for plugin state.
Integration & Extensibility
- Plugin architecture: Developers write plugins in C or any language that can expose a shared library with the required symbols.
- Webhooks: Plugins may emit JSON events to HTTP endpoints or publish to message queues.
- Custom media pipelines: By chaining plugins (e.g., a recorder plugin feeding into a SIP gateway), developers can create complex workflows.
- SDKs: While no official SDK exists, the JSON API is straightforward; community has unofficial bindings in Node.js, Python, Go.
Developer Experience
- Documentation: Comprehensive README, API docs, and plugin examples.
- Community: Active Discourse forum, GitHub issues, and a contributors’ guide.
- Testing: CI pipeline with Coverity, fuzzing, and automated tests; unit tests for core modules.
- Configuration:
janus.cfgfile supports a wide range of options (port ranges, TLS certs, plugin loading). - Debugging: Verbose logging levels and
janus-cliutility for introspection.
Use Cases
- Video conferencing: Deploy the
janus.plugin.videoroomplugin to build a custom multiparty bridge. - SIP integration: Use
janus.plugin.sipto route WebRTC traffic to traditional telephony. - Media recording:
janus.plugin.recordplaycaptures streams to disk or cloud storage. - IoT gateways: Lightweight deployment on Raspberry Pi for sensor data over WebRTC data channels.
- Custom streaming services: Build a low‑latency live stream with a dedicated plugin that pushes to CDN.
Advantages
- Performance: Native C implementation delivers low CPU overhead and minimal latency.
- Flexibility: Plug‑in model lets developers ship only the features they need, reducing attack surface.
- Licensing: GPLv3 encourages open‑source contributions while allowing commercial use under the same license.
- Scalability: Stateless core and simple deployment make it suitable for both edge devices and cloud clusters.
- Ecosystem: Rich set of optional integrations (RabbitMQ, MQTT) and a mature plugin ecosystem.
In summary, Janus offers developers a robust, extensible foundation for building WebRTC‑based services with fine control over media flow and integration points, all while keeping operational complexity low.
Open SourceReady to get started?
Join the community and start self-hosting Janus WebRTC Server today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
Dovel
Self‑hosted SMTP server with web mail browsing
MySpeed
Track and analyze your internet speed effortlessly
Umbraco
Open, scalable CMS empowering enterprises with speed and flexibility
Apache Solr
Fast, scalable search engine for full‑text and vector queries
Tinode
Decentralized, mobile‑first instant messaging platform
The Lounge
Modern, always‑connected web IRC client