Run your own
The default demo.silt.run room is great for trying things out, but you can run
the reference room server yourself. It’s a small pure relay written in Go: no
game logic, no CRDT, no durable state — just membership, the join snapshot, and
relaying the two lanes between peers.
What it does
Section titled “What it does”- Serves one WebTransport room at
/room/graveyard. - Relays presence datagrams and reliable events between peers (see the wire protocol).
- Tracks membership: sends each newcomer a snapshot, broadcasts
join/leave, and distinguishes a cleanbye("left") from a dead session ("timeout"). - Generates a fresh ECDSA P-256 certificate at boot (validity ≤ 14 days, as
required for
serverCertificateHashes) and prints its SHA-256 hash.
Prerequisites
Section titled “Prerequisites”- Go (to build the server).
- A secure context for the browser: serve your page from
https://orhttp://127.0.0.1/http://localhost. WebTransport refuses to connect from an insecure origin.
Build and run
Section titled “Build and run”-
Build the server
Terminal window cd room-servergo build -o /tmp/silt-room-server . -
Run it
By default it binds
127.0.0.1:4433. Override with theWT_BINDenv var.Terminal window WT_BIND=127.0.0.1:4433 /tmp/silt-room-serverOn boot it prints the certificate hash and the listen address:
CERT-SHA256-HEX: 9f86d081884c7d659a2feaa0c55ad015...silt room server listening on 127.0.0.1:4433 (room: /room/graveyard) -
Connect with the cert hash
Because the dev certificate is self-signed, pin it with the
certHashoption (theCERT-SHA256-HEXvalue the server printed). The room URL is your bind address plus the room path.import { joinRoom } from "@silt/client";const room = await joinRoom("https://127.0.0.1:4433/room/graveyard", {id: "alice",certHash: "9f86d081884c7d659a2feaa0c55ad015...", // CERT-SHA256-HEX from the log});
The two-tab proof
Section titled “The two-tab proof”The repo ships a local harness that builds the client and server, boots the server, scrapes the cert hash, and serves a demo page on a secure-context localhost port:
demo/run.sh# then open in two browser tabs (set ?id=...):# http://127.0.0.1:8780/page.html?id=alice# http://127.0.0.1:8780/page.html?id=bobdemo/stop.shMove one peer and watch its presence sync to the other tab — two peers in one room, at zero box spend.
- Wire protocol — exactly what the relay sends and receives.
- API reference — the
certHashand other join options.