Connection modes
The App-to-CLI connection path determines how the target CLI is reached and how its identity is verified. It does not change the fact that commands are executed by the target CLI. A successful connection does not grant workspace, model-sharing, or Agent execution permission by itself.
Choose a path
| Path | Use case | Account required | Key conditions |
|---|---|---|---|
| Local direct | Desktop App controls the same computer | No | Local API service and device key |
| LAN or custom direct | Same trusted network or reachable address | No | Address, port, device key, and network policy |
| Account bridge | Phone, different network, or no reachable direct address | Yes | Both sides signed in, device online, and trust established |
Prefer local direct for a desktop App controlling the same computer. Use LAN for a trusted network, and the account bridge for phones, different networks, or unreachable addresses. Every path requires the target CLI service to be installed and running.
The connection path only handles reachability and device identity. Workspace authorization, Remote Share, Agent permissions, and approval policies remain separate controls.
Merging paths for one device
One CLI device may have several paths. After connecting, the App reads the stable device ID and merges local, LAN, and account paths that report the same ID. An address whose identity cannot be verified is not silently merged.
When each security setting applies
Local direct: listen only on this computer
When the desktop App controls the same computer, the CLI defaults to 127.0.0.1. This accepts connections only from the same computer; it is not unauthenticated, and the Local API still requires the device key. You normally do not need to change it.
LAN direct: explicitly enable it on the CLI
Use LAN direct only when the App runs on another computer or phone on a trusted network. On the computer running the target CLI, run:
originrouter local config set --bind 0.0.0.0 --allow-lan on
originrouter service restart
originrouter local config show
allow-lan on is a CLI configuration value, not an App switch. local config show displays it as allowLan: on; in the App, you enter the target address and port and verify the device key. 0.0.0.0 makes the service listen on network interfaces, but a client without the device key still cannot access it. Use this only on a trusted network; turn it off with originrouter local config set --allow-lan off when it is no longer needed.
Account bridge: no port exposure required
Use the account bridge for phones, different networks, or targets without a reachable direct address. After the App and CLI use the same account and the target is online and trusted, the relay authenticates the devices and delivers ciphertext. It does not grant workspace or command permission.
Connection is only the first authorization step
- Workspace authorization: run
originrouter remote workspace authorize <path>on the target CLI. - Remote Share: turn on “Remote allowed” for a model in App Provider Control; use
originrouter remote share start/statusto start or inspect sharing. - Approval policy: choose it in App Approval policies, or specify an approval mode when launching an Agent from the CLI.
These controls do not replace one another. Being able to connect does not mean that a directory, remote model, or high-risk operation is authorized.