boxlite exec.
Complete the workstation setup. Run all commands below on your workstation.
Create the box and install OpenCode
Savecreate.py. Before running it, replace <YOUR_MODEL_HOST> with your model endpoint’s hostname, without the scheme or path. The prompt reads the real model key on your workstation; only BoxLite’s Secret configuration receives it.
create.py
Configure OpenCode
Saveopencode.json locally. Keep the apiKey placeholder exactly as shown:
opencode.json
<MODEL_ID>, and set Secret.hosts in create.py to the endpoint hostname. For another provider, use OpenCode’s native provider configuration and match the Secret’s hosts to its API endpoint.
permission: "allow" lets this trusted task use tools without interactive approval. The agent can use the model connection and access the files and network available inside its box. The real provider key remains outside it.
Upload the placeholder-only configuration:
Run a task
Optional: wake on a request
OpenCode provides a native HTTP server. This walkthrough creates a separateopencode-http box and sends tasks through its session API.
Run these commands on your workstation in the directory containing opencode.json from above. Automatic stop is optional: use auto_stop=0 to keep the service running.
1. Create the service box
Savecreate-http.py, using the same model Secret and endpoint hostname as above:
create-http.py
2. Install and configure the server
Generate a caller password locally. This password protects the HTTP API; it is separate from the model credential.server-password outside Git. OpenCode reads this caller password inside the box; the real model key stays in BoxLite Secret.
3. Create a session and run a task
SetOPENCODE_URL to the HTTPS URL from the tunnel command. Keep this shell open for the wake check.
info.error and that the independent file check prints the expected value.
4. Wait for automatic stop
Stop sending HTTP requests, including health checks. Use only this control-plane check untilStatus is stopped:
start, exec, or cp before the next request.
5. Wake the server, then submit a task
Use an authenticated health request to wake the box and wait for OpenCode to be ready. This external request starts the box and its saved server command; do not callstart or exec first.
"healthy": true; if it exhausts its retries, inspect the server before submitting a task. Then send a message to the existing session:

