Overview
Remote devboxes let internal root workspace members offload expensive local work to self-hosted runner machines. A runner connects outbound totuturuuu.com,
receives a synced dirty checkout, runs commands in an isolated container, streams
logs, stores artifacts, and releases the lease automatically for one-off work.
V1 is intentionally self-hosted. It does not provision cloud machines. Any
runner host should have Node.js, Bun, Docker, and Git available.
Quick Start
ttr box setup is the default bootstrap for a runner host. It first checks
whether the current directory is already a Tuturuuu platform checkout. If it is,
setup reuses that checkout. Otherwise it can clone or reuse
https://github.com/tutur3u/platform.git, install dependencies with
bun install --frozen-lockfile, start local Supabase with bun sb:start,
verify supabase status -o json, and write local Supabase connection values
into ignored apps/*/.env.local files. Secret values are redacted from human
and JSON output.
Pass --dir <path> for a specific checkout. If the target exists but is not a
valid Tuturuuu checkout, interactive setup asks whether it should clone into a
nested tuturuuu directory. In non-interactive shells, pass
--clone-into <path> explicitly:
--yes only when the host should install detected missing prerequisites
automatically. Runner registration and service installation are separate
choices.
To register the machine and install a boot-starting runner service in one
non-interactive command after login:
ttr, Bun,
Node, Docker, Git, OS, CPU, RAM, load average, and uptime. Root workspace admins
can inspect those fields from Infrastructure > Devboxes.
If a host completed ttr box setup but does not appear in Infrastructure >
Devboxes, confirm it was registered as a runner. Plain setup prepares the
checkout, dependencies, local Supabase, and ignored env files only; it does not
create a private.devbox_runners row. Run setup with --agent --service, or
register and start the agent manually, then confirm ttr whoami on that host is
pointing at the same production origin and root workspace user.
If the host appears as registered but shows no heartbeat, inspect the installed
service on that host:
devbox-runner.env file. If
the journal shows a missing runner token or stale wrapper, upgrade the CLI and
repair the service. Repair reuses the existing token file; it does not register
a new runner token or create another runner row.
bun i -g tuturuuu for the selected runner, waits
for completion, and returns the remote command logs and exit code.
Remove a runner from the cluster from the runner host with its runner token:
ttr box run creates an auto lease, waits for an authenticated
runner to claim the job, streams recorded logs after completion, and releases
the lease after one-off work. Use --keep for repeated sync/run work:
Build, Serve, And Tunnel
Usettr box build for common build workloads without spelling the full remote
command every time:
ttr box serve when the remote devbox should build an app, start the
server, and keep the run alive. It defaults to apps/web on port 7803, stores
the preview port on the run, and returns immediately unless --wait is passed:
ttr box build, ttr box serve, and ttr box tunnel do not set a remote
command timeout by default. Pass --timeout <duration> only when the run should
be killed automatically.
To expose a served app through a Cloudflare tunnel, keep the token in a local
environment variable and pass the variable name to the devbox. The queued
command references $CLOUDFLARED_TOKEN; the raw token is delivered only as
run-scoped env and is redacted from logs.
ttr box tunnel runs a dockerized cloudflare/cloudflared container with host
networking on the runner. The command policy blocks inline cloudflared --token ... arguments, so operators should use --cloudflared-token-env or
another local environment variable indirection rather than pasting raw tokens
into commands.
Container Boundary
Commands run in a per-lease Docker container or Compose project. The runner mounts only the synced workspace and named cache volumes. Host execution is not exposed in v1, and arbitrary host path mounts are blocked unless an operator explicitly allowlists them. Allowed remote workflows include:bun check,bun test, and package-local Bun commandsbun test:e2eand Docker-backed Playwright workflowsbun sb:start,bun sb:reset,bun sb:up, andbun sb:typegen
sudo, and host-destructive filesystem
operations.
Env And Secrets
Remote env is explicit. Local.env* files are never synced automatically.
The setup command only prepares ignored app env files inside the runner
checkout so local Supabase-backed apps and E2E workflows can use that runner’s
own Supabase stack.
DEVBOX_DATABASE_URL on the operator machine, and
queue the app devbox with --database-url-env DEVBOX_DATABASE_URL. This lets a
database-heavy runner and a Next.js runner share work while the current machine
only brokers commands and opens previews.
Cache Policy
Runners use named cache volumes for Bun installs, Turbo, Playwright browsers, Supabase Docker state, package manager cache, and optionalnode_modules.
Cache keys include the repo fingerprint, lockfile hash, runtime image digest,
platform, command profile, Bun/Node versions, and cache schema version.
Cleanup runs on runner startup, after runs, and during heartbeat maintenance.
The runner evicts incompatible caches first, including legacy Bun install caches
when the Bun version, lockfile hash, package profile, or cache schema changes.
It then enforces cache budgets with least-recently-used eviction while keeping a
small set of recent compatible caches to avoid thrashing.
Operators can inspect and prune cache metadata:
Access
Remote devbox API routes require a Tuturuuu CLI/app session and root workspace membership withworkspace_members.type = 'MEMBER'. Guests and non-root
workspace users cannot create runs, leases, previews, or runner tokens.
Local Executable Verification
Use an isolated CLI config when testing localapps/web so the production CLI
session is not overwritten:
private.devbox_runs.status should end
as succeeded with exit_code = 0.
Production Readiness
The production API needs migration20260603171600_create_private_devboxes.sql before any ttr box command can
create leases or runs. If the CLI prints a schema-cache error such as
private.devbox_leases not being found, first confirm the production migration
workflow ran for the deployed SHA. If the table exists but PostgREST still
returns the schema-cache error, refresh the schema cache from Supabase SQL
Editor: