Bolt has a built-in HTTP server that fully decouples the engine from the interface. You can start a headless server on a powerful remote machine (a cloud VM, a dev container, a desktop left running overnight) and attach the TUI from your laptop, a second terminal, or even a browser — all pointing at the same live session. This makes Bolt suitable for teams, remote workloads, and long-running tasks you want to check in on without SSH-ing into a box.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bolt-builder/bolt-cli/llms.txt
Use this file to discover all available pages before exploring further.
bolt serve
Start a headless Bolt server that exposes the full API over HTTP and accepts TUI connections.
Flags
| Flag | Default | Description |
|---|---|---|
--hostname <host> | 127.0.0.1 | Hostname or IP address to bind to |
--port <n> | 0 (auto) | Port to listen on; Bolt prints the assigned port on startup |
--mdns | false | Advertise the server via mDNS for zero-config local-network discovery; also sets the hostname to 0.0.0.0 |
--mdns-domain <name> | opencode.local | Custom mDNS service domain |
--cors <origin> | [] | Additional origins to allow via CORS (repeatable) |
Authentication
Secure the server with HTTP Basic Auth using environment variables:| Variable | Description |
|---|---|
OPENCODE_SERVER_PASSWORD | Basic auth password |
OPENCODE_SERVER_USERNAME | Basic auth username (defaults to opencode if omitted) |
bolt attach <url>
Attach the full TUI to a running Bolt server. This works against any server reachable over HTTP — local or remote.
Flags
| Flag | Alias | Description |
|---|---|---|
--dir <path> | Directory to run in on the remote server | |
--continue | -c | Continue the last session on the server |
--session <id> | -s | Session ID to continue |
--fork | Fork the session when continuing (use with --continue or --session) | |
--password <pw> | -p | Basic auth password (overrides OPENCODE_SERVER_PASSWORD) |
--username <user> | -u | Basic auth username (overrides OPENCODE_SERVER_USERNAME) |
--mini | Use the minimal interactive UI instead of the full TUI |
bolt web
Start a Bolt server and immediately open the web UI in your default browser. This is the quickest way to get a browser-based interface running locally.
bolt web accepts the same network flags as bolt serve.
mDNS discovery
Pass--mdns to bolt serve to broadcast the server’s address on your local network using mDNS. Any machine on the same network can then attach using the mDNS hostname without knowing the IP address or port.
opencode.local. Override it with --mdns-domain:
Start a server and attach remotely
Set a password on the server machine
Export
OPENCODE_SERVER_PASSWORD before starting the server. Without it, Bolt prints a warning and the API is unauthenticated.Start the headless server
Bind to all interfaces so your laptop can reach it, and optionally pick a fixed port:Leave this terminal open (or run it in
tmux / screen / a systemd unit).Attach from your laptop
On any machine that can reach the server, run:The full TUI opens and connects to the remote engine. Sessions, history, and tool state all live on the server.