4.0 KiB
Deploy a Cloud Environment on Render
This experimental setup runs one T3 Code environment as a Render web service. The environment owns the provider processes, repositories, worktrees, terminals, and T3 Code state. The web, desktop, and mobile clients connect to it over Render's public HTTPS and WebSocket endpoint.
This is a single-user deployment, not a multi-tenant hosted service. The attached persistent disk also limits the service to one instance. Multiple agent threads can still run concurrently inside that instance.
What the Blueprint Creates
The root render.yaml creates:
- a Docker web service containing T3 Code, Codex, Claude Code, Git, and the GitHub CLI;
- a persistent disk mounted at
/datafor T3 Code state, provider credentials, and workspaces; - a health check against T3 Code's public environment descriptor.
Deploy
- In the Render Dashboard, choose New → Blueprint.
- Connect this repository and select the branch you want to deploy.
- Deploy the Blueprint and wait for the service health check to pass.
- Open the service logs and copy the
Pair URLprinted during startup. Treat this URL like a password: it contains a one-time pairing credential. - Open the URL in a browser. The hosted T3 Code app pairs with the Render environment and saves it under Settings → Connections → Remote environments.
- Authenticate a provider and source control as described below.
- Open the Command Palette, choose Add Project, and select the Render environment. Clone a GitHub repository, another supported source-control repository, or any Git URL.
Repositories are selected after pairing rather than baked into the Blueprint. Each clone is stored
under /data/workspace and survives deploys. This keeps the public deployment configuration generic
and lets each user bring repositories they already have access to.
The demo Blueprint is pinned to feat/render-cloud-environment so it can deploy before the draft
pull request is merged. Update the branch field in render.yaml if you rename or reuse the branch.
Provider Authentication
The Blueprint does not ask for an OpenAI API key. To use a ChatGPT subscription, open a Render Shell and run:
codex login --device-auth
Follow the printed link and enter the device code. CODEX_HOME points at the persistent disk, so the
provider session survives service restarts. Claude Code is installed too; use its normal subscription
login flow from a Render Shell. CLAUDE_CONFIG_DIR is persisted as well.
Source-control Authentication
Public repositories can be cloned by URL without authentication. For private GitHub repositories,
add a short-lived, repository-scoped GH_TOKEN secret in the Render service environment. Grant only
the access needed for the workflow: read access to clone, or repository contents and pull-request
write access to push branches and open pull requests. The startup script configures Git to use the
token when the service restarts.
Open Settings → Source Control and rescan to confirm that GitHub is authenticated. Then use Add Project → GitHub repository to choose the repository. Never commit a token to the Blueprint or paste one into a project URL.
T3 Connect
T3 Connect is not required for this deployment. Render already gives the environment a public HTTPS and WebSocket endpoint, so the Pair URL registers it as a direct remote environment. Use its existing Connect and Disconnect controls under Settings → Connections. T3 Connect remains useful for machines that need its managed tunnel or account-level environment discovery.
Operations
- Each deploy prints a fresh pairing URL with a 24-hour lifetime. Existing paired browser sessions
remain authenticated until revoked with
t3 auth. - Render terminates the previous instance before starting a new one because the service has a disk. Expect a short interruption during deploys.
- Do not use this Blueprint for untrusted users or repositories. Coding agents can execute commands and access every secret available to the service.