Deployment guide

Remote Access

Trit executes coding agents and interactive shells as its service user. Remote access therefore needs a stronger boundary than simply opening port 9420 on a firewall.

Keep Trit bound to loopback in every supported deployment. Put an authenticated transport in front of it, use an exact browser origin, and retain Trit’s project-root and operating-system boundaries.

Supported access models

Access modelTrit modeStatusBest for
Browser on the Trit hostlocalSupportedA workstation used directly
SSH local port forwardinglocalSupportedOccasional private access without another service
Cloudflare Tunnel and Accesscloudflare-accessSupportedStable browser access for one or more approved users
Tailscale ServeDedicated mode requiredPlannedTailnet-native private access
Direct public port or generic reverse proxyNoneUnsupportedDo not use

Trit currently accepts only local and cloudflare-access authentication modes. Do not place Tailscale Serve, a VPN address, or an arbitrary reverse proxy in front of local mode and assume it is authenticated: local mode intentionally requires loopback host and browser origins. Tailscale support will require a dedicated identity-verification path in Trit.

Local and SSH-forwarded access

The installer defaults to:

TRIT_AUTH_MODE=local
HOST=127.0.0.1
PORT=9420

Open http://127.0.0.1:9420 on the Trit host. From another machine, create an SSH local forward:

ssh -N -L 9420:127.0.0.1:9420 user@trit-host

Then open http://127.0.0.1:9420 on the client machine. The browser still uses a loopback origin, and SSH carries the connection to Trit’s loopback listener.

Cloudflare Access

Cloudflare Tunnel provides an outbound connection from the Trit host, while Cloudflare Access authenticates the browser. Trit independently verifies the signed Access JWT, its issuer, audience, expiry, and email claim. It also enforces the configured HTTPS browser origin.

Follow the Cloudflare remote-access guide for the complete setup, verification, troubleshooting, and rollback procedure.

Non-negotiable controls

Choosing an option

Use local mode when the browser runs on the Trit host. Use SSH forwarding when remote access is occasional or already governed by SSH. Use Cloudflare Tunnel and Access when Trit needs a stable browser hostname or access for multiple approved identities.

Do not select Tailscale for Trit until the application has a supported Tailscale authentication mode. When implemented, its guide should preserve the same loopback origin, exact-origin checks, explicit identity allowlist, and defense-in-depth verification used by the Cloudflare integration.

Common verification

On the Trit host:

trit doctor
systemctl --user is-active trit.service
curl -fsS http://127.0.0.1:9420/health
ss -ltn | grep ':9420'

The listener must be loopback-only. From the client, verify that the expected identity reaches /api/whoami, agent output streams normally, and a terminal can connect and reconnect. Also verify that an unapproved identity is denied.

See the security policy and threat model before exposing a Trit instance beyond one machine.