finds.dev← search

// the find

peers/peerjs-server

★ 4,685 · TypeScript · MIT · updated Feb 2026

Server for PeerJS

PeerJS Server is the signaling server half of the PeerJS WebRTC library. It handles peer discovery and connection brokering via WebSocket — actual media/data never touches it. If you're building browser-to-browser video, audio, or data channels and want to self-host rather than rely on PeerJS's free cloud, this is what you run.

1. Dead simple to embed in an existing Express app via `ExpressPeerServer` — no separate process needed. 2. The architecture is correct: signaling only, no media relay, so it stays cheap to host even under load. 3. Reasonable operational knobs out of the box — `concurrent_limit`, `alive_timeout`, `expire_timeout`, reverse proxy support via Express `trust proxy`, and a `generateClientId` hook if you need to integrate with your own ID namespace. 4. Docker image and Kubernetes example are provided and the image is actually maintained on Docker Hub.

1. No built-in clustering or shared state — run two instances and peers registered on node A can't reach peers on node B. There's no Redis adapter or equivalent, so horizontal scaling means you're on your own. 2. The `--key` auth mechanism is a shared static string, not per-user tokens. Anyone who knows the key can register as a peer, which is fine for private deployments but completely unfit for multi-tenant or public-facing use without wrapping it in your own auth layer. 3. Travis CI badge in the README still points to travis-ci.org (gone), and the David dependency badge is broken — signals that the docs haven't been touched in a while even if the code has. 4. `allow_discovery` exposes a `/peers` endpoint that lists all connected client IDs with no access control — easy footgun in anything beyond a toy deployment.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →