Repository navigation
Description
Tracking whether J5 should run its own version of T3 Connect. No decision yet. This collects what we've found so far and the use cases that keep coming back to it.
What T3 Connect is
Upstream's hosted relay. A person signs in with a T3 Account (Clerk), links a server to it, and reaches that server through a managed Cloudflare tunnel from anywhere, with no tailnet or port forwarding.
J5 builds don't have it today. Nothing turns it off explicitly. j5-release.yml and j5-nightly.yml simply never set the Clerk and relay values that apps/web/src/cloud/publicConfig.ts reads (VITE_CLERK_PUBLISHABLE_KEY, VITE_CLERK_JWT_TEMPLATE, VITE_T3CODE_RELAY_URL), so Connect never starts.
What we found earlier
Research on identity (2026-10-17, product definitions for people and sharing):
- Connect proves only "this is the server's one linked account". The relay verifies a Clerk sign-in and keeps only the Clerk user id: no email, name, or picture. A server stores exactly one linked account and refuses a second ("already linked to a different cloud account"). Devices it lets in get an ordinary session marked
cloud-connect, with no user id on it. - Using upstream's hosted Connect for J5 isn't workable. Upstream would have to let several accounts link to one server, carry the user id into each session, register J5's apps with its Clerk instance, and carry J5's users on its tunnels. All of that is upstream's product.
- Running our own is possible but heavy. The relay is MIT-licensed and in our tree (
infra/relay, deployed upstream bydeploy-relay.yml). It needs Cloudflare Workers, tunnels, DNS zones, Postgres, Clerk, and push notifications: ongoing operations work, closer to v3 (hosted) than v2. - Jackson's ruling: shelve authoritative identity, and "drop T3 Connect since it doesn't apply to us and we shelved its replacement."
Reaching a shared server (2026-10-10, multiplayer exploration): for how a person reaches a server shared with them, the options were (1) the routes the server already has, (2) J5 opening a public tunnel per share, and (3) extending T3 Connect to guests. Jackson chose (1): "I think it's a fair expectation that people can reach the server they're trying to connect to." Share links today open on an address the server is already reachable at.
Use cases that would want it
- Authoritative identity. Knowing a person really is who their link was for, signing in on any device, and company sign-in later. Shelved 2026-10-17. The alternative considered was the server verifying a GitHub or Google sign-in itself, which needs a per-server OAuth app and a redirect URL for each address the server can be reached at.
- Reaching a server from outside its network. The first share with someone outside your tailnet or LAN needs a separate step from the owner today.
- Share links (new, 2026-10-25). Upstream shipped Share with guest (pingdotgg/t3code#24104, arriving with the v0.1.3 advance). It is a no-account browser link to one thread: the guest watches live and proposes messages the owner sends or dismisses. It works only through T3 Connect.
GuestShareServicerefuses to make a link without a Connect hostname and checks every guest request against it, deliberately not trusting the Host header. With a J5 Connect, upstream's guest links would work for J5 people as shipped, and J5's own share links could open from anywhere. Until then, J5 hides guest links and builds the proposal half into its own sharing (Thread Viewers propose messages that a writer sends or dismisses #724).
Note from Jackson
If we build our own version of Connect, consider WorkOS for identity instead of Clerk.
Open questions
- Our own relay versus a smaller J5 service that only does identity and tunnels.
- What it costs to operate, and who hosts it before v3.
- How much of upstream's client and server Connect code works unchanged against a J5 relay. The URL and Clerk values are build-time config, but swapping Clerk for WorkOS touches the token exchange on both sides.
Activity
Jacksondr5 commentedon Nov 20, 2026
Update (2026-11-19): what changed upstream, and hosting inside ZPA
If J5 ran its own Connect, it would run inside the corporate network and be reached over ZPA, the same way the J5 servers are. Two upstream PRs bear on that.
pingdotgg/t3code#32945: Theo's gateway (open, Labs beta, testers on an allow-list). It replaces the Cloudflare tunnel each Connect machine runs. Each machine instead keeps one outbound WebSocket to a gateway (Go plus Caddy, multiplexed with yamux), and the gateway routes
https://<key>.<domain>to it. This removescloudflared, which dials port 7844 and was the reason Connect couldn't work on the corporate network. The relay is unchanged: it's still a Cloudflare Worker with PlanetScale through Hyperdrive, Cloudflare DNS zones and Clerk.pingdotgg/t3code#34302: run your own relay (community PR, no maintainer approval, +8.4k lines). The relay runs on Node on one machine with Docker Compose. It accepts sign-in through any OIDC provider alongside Clerk. Machines without a public address keep one WebSocket to the relay, so no separate gateway is needed. Julius declined hosting the relay off Cloudflare in pingdotgg#6033.
Hosting inside ZPA would take:
*.<domain>No test of the public internet path is needed, because nothing would leave ZPA.
Decision for now: watch, don't act. If upstream takes pingdotgg#34302, most of the table is covered without J5 work. If it's closed, hosting Connect inside ZPA means carrying a relay port ourselves, and this stays shelved.
Claude Opus 5.5
Jacksondr5 commentedon Nov 28, 2026
Answered (Jackson, 2026-11-26 to 11-28): J5 doesn't run upstream's T3 Connect, which gives one account per server. J5 builds its own self-hostable J5 Connect: identity through Dex and a real identity provider, servers trust it and keep their own access rules, and multiplayer requires it. Research: artifacts/j5-connect/research.md. Definition: #1268. Work: milestone "J5 Connect".