Host and share the web app
Run t12 ui locally, on an always-on Linux or macOS host with idle-safe auto-updates, or in Docker Compose behind Tailscale and HTTPS tunnels.
t12 ui runs as a single HTTP server bound to 127.0.0.1:8790 by default. Every page requires a signed-in session, even on localhost, and no other factory binary listens on the network.
Choose a host
Run locally on your laptop or continuously via systemd, launchd, or Docker Compose.
Expose over HTTPS
Front :8790 with Tailscale Serve, Cloudflare Tunnel, or a reverse proxy using --url.
Email & updates
Add SMTP credentials for sign-in links and enable idle-safe auto-updates.
| Setup | Best for | Entry point |
|---|---|---|
| Local solo | Running requests on your laptop | factory/bin/t12 ui |
Always-on Linux (systemd) | Shared team access and auto-updates | /etc/systemd/system/t12-ui.service |
macOS (launchd) | Always-on Mac hosts with auto-updates | factory/scripts/install-launchagents.sh |
| Docker Compose | Portable container stack with Tailscale | factory/docker-compose.yml |
| Quick evaluation | Short-lived demo over trycloudflare.com | factory/scripts/evaluation-profile.sh |
Run locally for solo use
Start the web app against the default state home (~/t12/home, overridable via --home or T12_HOME):
factory/bin/t12 uiOn first start with no Operator account, t12 ui prints a 15-minute bootstrap link (http://127.0.0.1:8790/link?b=1&t=<token>). Opening http://127.0.0.1:8790 directly from loopback also promotes the very first sign-up to Operator.
People can sign in with email and password (t12 access set-password), one-time email links (printed to the terminal if SMTP is unset), or Tailscale Serve automatic login.
Operator controls in the web app
Signed-in Operators manage host-wide controls and guided onboarding from t12 ui:
- Guided onboarding & Connections: First-time Operators configure GitHub,
agy,omp, andclaudeon/onboardingor/connections, plus Observer profiles on/profileand/settings. - Conversation permission: Switch between
review,default,auto, andturboin the composer menu. InRequest Review, every agent shell command pauses for approval. - Observer: Open the Observer drawer or
/observer, select at least one project or conversation, and let the read-only loop resolve waiting items every 10 seconds.
Host on an always-on machine
For shared team access or overnight builds, use a Linux VM or Mac with at least 4 vCPUs, 8 GB RAM, 60 GB disk, and a running Docker daemon. Run factory/scripts/setup.sh on that host first.
Launch t12-ui through mise exec because systemd does not load ~/.bashrc or ~/.zshrc. Create /etc/systemd/system/t12-ui.service:
[Unit]
Description=t12 ui
After=network-online.target docker.service
[Service]
User=factory
ExecStart=/home/factory/.local/bin/mise exec -C /home/factory/t12/current -- /home/factory/t12/current/bin/t12-ui --home /home/factory/t12/home --url https://factory.example.com
Restart=always
[Install]
WantedBy=multi-user.targetEnable and start the service:
sudo systemctl enable --now t12-uiPut secrets in ~/.config/t12/env (0600) for the service user rather than inside the systemd unit file.
Expose t12 ui over HTTPS
Keep t12 ui bound to 127.0.0.1:8790 behind a tunnel or reverse proxy and pass --url <public-url>.
Why --url matters for security
Passing a non-loopback --url enables Secure cookies, enforces Origin checks on POST requests, builds valid SMTP links, and disables automatic first-signup Operator promotion so only the bootstrap link claims Operator access.
Requires a Cloudflare-managed domain and cloudflared on the factory host:
cloudflared tunnel login
cloudflared tunnel create t12
cloudflared tunnel route dns t12 factory.example.com
cat > ~/.cloudflared/config.yml <<'EOF'
tunnel: t12
credentials-file: /home/factory/.cloudflared/<tunnel-id>.json
ingress:
- hostname: factory.example.com
service: http://127.0.0.1:8790
- service: http_status:404
EOF
cloudflared tunnel run t12 &
factory/bin/t12 ui --url https://factory.example.comFor quick tests without a domain, run cloudflared tunnel --url http://127.0.0.1:8790 and pass the printed https://*.trycloudflare.com URL to --url. Do not use quick tunnels for team work because the hostname resets on restart.
Configure outbound SMTP
To email 15-minute sign-in links and invites instead of printing them to logs, add these keys to ~/.config/t12/env (0600) and restart t12 ui:
T12_SMTP_ADDR=smtp.example.com:587
T12_SMTP_USER=factory@example.com
T12_SMTP_PASSWORD=...
T12_SMTP_FROM=factory@example.comt12 ui upgrades to STARTTLS when offered, sends credentials only over TLS or a localhost relay, and times out mail after 30s.
| Provider | T12_SMTP_ADDR | Account notes |
|---|---|---|
| Google Workspace or Gmail | smtp.gmail.com:587 | Mailbox address plus an app password (requires 2-step verification) |
| Amazon SES | email-smtp.<region>.amazonaws.com:587 | SES SMTP credentials with a verified From address or domain |
| Mailgun | smtp.mailgun.org:587 | Domain SMTP login |
| Local Postfix relay | 127.0.0.1:25 | Leave T12_SMTP_USER and T12_SMTP_PASSWORD empty |
To verify delivery, submit an existing email on /signin and confirm the message arrives within one minute, or check t12 ui logs for mail to <address> failed: ....
Run the evaluation profile
To demo one project over a temporary HTTPS link (cloudflared and jq required):
factory/scripts/evaluation-profile.sh ~/t12/home ~/t12/bakery-blogPass an optional [PORT] third argument to override 8790. The script sets merge_policy.mode to auto and qc.explorer to true on staging, opens a https://*.trycloudflare.com quick tunnel, and starts t12-ui.
Operations and recovery
- Admin socket:
t12-uilistens on<home>/admin.sock(0600, falling back to$XDG_RUNTIME_DIRor/tmp/t12-<uid>when paths exceed OS socket length limits, or$T12_ADMIN_SOCKET). - Status check:
t12-ui --statusprintsidle,phase,activeJobs,previewRunning,externalBusy, andcommit. - Drain lock:
t12-ui --drain --hold 45sexits3if any UI job, Observer turn, or CLI command holds<home>/active.lock. When idle, it blocks new jobs until--shutdownrestarts the process or--holdexpires. - Preview guard: Pass
--wait-preview(or setT12_WAIT_PREVIEW=1forautoupdate.shandautoupdate-docker.sh) to defer updates whilet12 previewruns on port8800.
agy uses the desktop keyring locally, but switches to a separate token file whenever SSH_CONNECTION, SSH_CLIENT, or SSH_TTY is set. Either sign in once via ssh -t <host> agy, or strip those three variables:
env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY factory/bin/t12 run --conversation <id>Generate a fresh 15-minute Operator recovery link or set an Operator password from the host shell without stopping t12 ui:
factory/bin/t12 ui --bootstrap --url https://factory.example.com
factory/bin/t12 access set-password --email operator@example.com --operatorOmit --url when recovering on http://127.0.0.1:8790.