Skip to content

Configuration ​

Everything is in wrangler.jsonc at the root of the repository (your copy of it, if you used the Deploy to Cloudflare button), plus a few secrets.

Variables (vars) ​

NameWhat it does
PREVIEW_HOSTThe second hostname that serves dev-server previews. It must also be one of the Worker's routes.
VAPID_SUBJECTThe contact (mailto: or a URL) sent with push notifications.
DOWNLOAD_BASEWhere install.sh and the site's Mac download get builds: https://dl.coderail.codes by default, which always has the newest build. Point it at your own copy if you build and host CodeRail yourself (it must serve a latest.json in the same format).

Secrets ​

Set with npx wrangler secret put <NAME> at the root of the repository, or in the Cloudflare dashboard under your Worker's Settings → Variables and Secrets.

NameWhat it does
SETUP_TOKENRequired once, to create the first admin at /setup. Any long random string.
VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEYOptional. The key pair for web push (bun scripts/vapid.ts makes one). Without them there are no push notifications.

Bindings ​

BindingWhat
DBThe D1 database: users, sign-in sessions, invites, computers, grants, pairing codes, the audit log, push subscriptions. Its tables are made on first use.
MACHINEThe Durable Object class Machine, one per computer: the relay and the session history.
ASSETSThe web app's files.

Limits worth knowing ​

  • A session's history keeps its most recent 20,000 entries.
  • Files open up to about 700 KB, diffs up to about 800 KB; larger ones are cut off with a note.
  • A request to a computer times out after 120 seconds.

Apache License 2.0 · Built by Wiva