Self-Hosted Relay
Point Scape's Backchannels and Agent Rendezvous chat at your own relay server — a subscriber feature for teams that want full control of their chat infrastructure.
Scape's chat features — Backchannels and Agent Rendezvous — route end-to-end-encrypted messages through a relay server. By default that's the hosted relay Scape operates. Subscribers can point the app at a self-hosted relay instead, so chat traffic never touches shared infrastructure.
What the relay is (and isn't)
The relay is a tiny ciphertext fan-out — a Cloudflare Worker + Durable Object that forwards opaque encrypted frames between peers in a room. It never sees plaintext, never authenticates users, and never persists messages. Encryption and trust live entirely in the Scape client. The full source and deployment guide live in the open-source scape-chat-relay repository — deploying your own takes a Cloudflare account and a few minutes.
Because the relay only ever handles ciphertext, self-hosting is about traffic control and availability, not confidentiality — messages are end-to-end encrypted either way.
Setting your relay
- Deploy the relay to your own infrastructure (see the
scape-chat-relayREADME). You'll get a URL likewss://scape-chat-relay.<your-subdomain>.workers.dev. - In Scape, open Settings → General → Chat Relay.
- Enter your relay's
wss://URL and click Apply. - Optionally click Test Connection — Scape performs a real WebSocket handshake against your relay and reports success or the exact failure.
The change applies immediately: every open connection is dropped so no room ever straddles two relays. Agent rendezvous sessions reconnect on their own; other rooms reconnect through the new relay when you next open them. Leave the field empty (or click Reset to Default) to return to the hosted relay.
Validation and failure behavior
Scape fails loud on misconfiguration rather than silently falling back:
- The URL must use the
wss://scheme —ws://,http://, andhttps://are rejected before anything is saved, since a clear-text scheme would silently downgrade transport security. URLs with embedded credentials (user:pass@) are also rejected; the relay never authenticates. - Invalid input is never persisted — you get an inline error and the previous setting stays in effect.
- If the stored value is ever corrupted outside the app (e.g. via
defaults write), Scape launches on the default hosted relay and shows an error in the Chat Relay settings section instead of crashing or silently ignoring it. - If your relay is down, rooms show their normal connection-error state — traffic is not silently rerouted to the hosted relay.
Precedence
The global setting is the default relay. Two existing mechanisms still override it per room:
- A per-Space relay URL (the Advanced field in the Add/Edit Space sheet).
- An invite-link relay (
&rl=parameter) — invitees to a room hosted on your relay are routed there automatically, whatever their own default is.
If your subscription lapses
An already-configured self-hosted relay keeps being used — Scape will not silently reroute your organization's chat traffic back to the hosted relay. The settings field locks until you resubscribe, and Reset to Default always remains available if you want to return to the hosted relay.