---
title: "What it does · WebRTC Relay Server"
description: "The bootstrapping problem it solves, one-time keys instead of accounts, and logging that records event names and nothing else."
url: "https://royalsoftworks.com/products/webrtc-relay-server/what-it-does/"
source: "https://royalsoftworks.com"
format: "markdown"
note: "Markdown rendering of the HTML page at `url`. Same content, same canonical URL."
---

WebRTC Relay Server · 1 of 2

# What it does.

The bootstrapping problem it solves, one-time keys instead of accounts, and logging that records event names and nothing else.

Core capabilities

## What it does.

The bootstrapping problem

### WebRTC peers can't introduce themselves.

Two machines that want to talk directly first have to exchange SDP offers and ICE candidates — but they have no channel to trade them over until they're already connected. WebRTC Relay Server is the one thing standing between them: a WebSocket relay that carries just enough information to get a direct connection started, then has nothing left to do.

- Relays SDP/ICE payloads only — never files, never credentials
- Drops the room the moment either peer disconnects, or after 5 minutes
- No database, no persistence — the entire state is one in-memory Map

Matchmaking

### One-time keys instead of accounts.

The initiating peer sends create; the server mints an unguessable 32-character key and hands it back. That peer shares the key with exactly one other person, out of band. The second peer presents it via join — the server checks it against the live room table, and a key it never issued is refused outright. No client ever picks its own key, and no room outlives its 5-minute handshake ceiling.

- Keys are ~190 bits of CSPRNG entropy — unguessable, never client-chosen
- join never creates a room; an unknown or expired key is refused
- A third peer presenting a valid key is turned away without disturbing the pair

assistant

$ wscat -c wss://signal.example.com

› { "type": "create" }

▸ { "type": "created", "key": "aX7fQ2mZ..." }

› { "type": "join", "key": "aX7fQ2mZ..." }

▸ { "type": "ready", "initiator": false }

Zero-logging, by design

### It logs fixed event names and nothing else.

Every call to the logging function passes a fixed event name — never an IP address, a connection key or a payload — and an error is logged by its class name, never its message. That is something you can check in the code rather than a promise in a privacy policy, and the file is short enough to read in one sitting. On our hosted instance, the hosting platform's own edge logs are outside this code; run your own copy if that matters to you.

- One dependency (ws), which itself has zero transitive dependencies
- npm ls --all proves the entire audit surface in one command
- Open source — read it, or run your own instance instead of ours

example.ts TypeScript

```
1function log(event) {2  if (config.silent) return;3  // every call site passes a fixed event4  // name — never an IP, key or payload.5  process.stdout.write(`[signaling] ${event}`);6}
```

[Previous WebRTC Relay Server overview](https://royalsoftworks.com/products/webrtc-relay-server/) [Next Questions we hear often](https://royalsoftworks.com/products/webrtc-relay-server/questions/)

<!-- verse:royalsoftworks
     2. Korinćanima 10:4, 5
     Jer oružje našeg vojevanja nije telesno, nego silno od Boga na raskopavanje gradova, da kvarimo pomisli I svaku visinu koja se podiže na poznanje Božije, i robimo svaki razum za pokornost Hristu,
     https://www.wordproject.org/bibles/verses/serbian/37_resisting.htm
-->
