Gryt

Introduction

Overview of the Gryt WebRTC voice chat platform

Gryt is a self-hosted voice, video and text chat platform. You run the server; it holds your messages and decides who may join. Voice and video go through a separate media service that never sees any of that.

Components

ComponentTechRole
ClientReact + TypeScript, Electron on the desktopInterface, audio processing, WebRTC
ServerNode.js + TypeScript, SQLiteChat, identity, permissions, invites
SFUGo + Pion WebRTCMedia forwarding. One per machine
Image workerNode.js + sharpThumbnails and compression, kept out of the server
KeycloakHosted at auth.gryt.chatSigning in
Identity serviceHosted at id.gryt.chatSigns the certificate that binds your key to your account
CLIGoCreates and runs servers from a terminal

How it works

  1. You sign in to Keycloak, once, with OIDC and PKCE.
  2. Your client generates a keypair that never leaves the device, and the identity service signs a certificate saying that key is yours.
  3. Joining a server is a signed challenge. The server sends a nonce, your client signs it, and the server checks the signature against the certificate. Your Keycloak token is never sent to the server, so a server operator has no credential of yours to steal.
  4. The server issues a token scoped to itself, and the client talks to it over a WebSocket for chat, presence and permissions.
  5. Joining a voice channel gets you a room from the SFU. Media goes straight to the SFU over one UDP port and never touches the server.

Security has the whole handshake, and Do I need an account? covers joining without one, which is also supported.

Next steps

On this page