Multiplayer
Share terminal sessions in real-time with your team.
Overview
Blade's multiplayer feature lets you share a live terminal session with other users. Everyone sees the same output in real-time, and the host controls who can type. This is perfect for pair programming, debugging sessions, or teaching.
Starting a Session
Start the Blade daemon to enable multiplayer:
This starts a WebSocket server on your local machine. The daemon manages persistent sessions that survive client disconnects.
QR Pairing
The easiest way to connect is via QR code. When you run blade serve, Blade generates a pairing token and displays a QR code in the terminal. Your teammate can scan it with their phone or Blade client to instantly join.
The QR code encodes the connection URL, authentication token, and TLS certificate fingerprint for secure one-step pairing.
Auto-Discovery
On a local network, Blade automatically discovers other Blade instances using UDP broadcast announcements. Available sessions appear in the connection list without manual configuration.
The discovery tracker automatically prunes stale entries from devices that go offline.
Roles
Each participant in a multiplayer session has a role:
| Role | Can Type | Sees Output | Description |
|---|---|---|---|
| Host | Yes | Yes | Session owner. Controls permissions and roles. |
| Driver | Yes | Yes | Active participant with input permissions. |
| Observer | No | Yes | Read-only view of the session. |
The host can promote an observer to driver or revoke driver access at any time.
Security
Multiplayer sessions are secured with multiple layers:
- TLS 1.3 — All WebSocket connections are encrypted in transit with self-signed certificates (rcgen)
- TOFU (Trust On First Use) — Certificate fingerprints are verified on first connection and remembered
- E2E Encryption — Session data is encrypted end-to-end using X25519 key exchange and AES-256-GCM
- Token Authentication — Pairing tokens are cryptographically generated and single-use
Web Client
Participants don't need to install Blade to join. The built-in web client runs in any modern browser via WebAssembly. When you start a session with blade serve, a web URL is provided that teammates can open directly.
The web client uses a Canvas-based terminal renderer (blade-web) and supports full terminal output, though input is limited to the observer role by default.