Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

002 The web app on its own host

Summary: why the recommended deployment serves the web app from a static host other than the API server.
Key terms: web origin, API origin, discovery, CSP, web bundle.
Related: Operation · Concepts

Date: 2026-11-23. State: in force (spec §4.3).

Decided

  • The web app is a generic static bundle. A deployment adds config.json, the discovery document and the CSP connect-src value, and serves it from the web origin.
  • The API server publishes the public listener at a separate API origin. The server can also serve the bundle itself (serve_web_bundle), as a self-hosting option.
  • The bundle has no inline scripts and no third-party code, and every release publishes it with its SHA-256.

Why

Every person opens the web app: to sign up, and to approve each new device. Whoever can change its files can steal the keys of people who use it during that time. With a separate host:

  1. Root on the API host cannot change the code that runs in browsers.
  2. The API host stays a store with no influence over key handling.

Refused

RefusedReason
Server-side rendering of the web appThe server would produce the code that handles keys
Third-party scripts, fonts or analyticsEach is code that runs with the keys in reach