OriginRouter CLIService and daemon

Service and daemon

The daemon owns the Local API, remote-control connection, and state that must continue beyond the current terminal. Service commands keep the daemon available through the current user's operating-system service mechanism.

Run the daemon in the foreground

originrouter daemon
FlagPurpose
--relay <url>Set the relay URL
--relay-mode auto|cloud|local|customSelect the relay source; auto uses authenticated cloud when signed in and otherwise remains local
--device <device-id>Override the device identifier
--local-port <port>Set the Local API port
--bind 127.0.0.1|0.0.0.0Set the listen address
--allow-lanExplicitly permit LAN access

Keep the default loopback bind unless a trusted network, valid token, and explicit access requirement all exist.

originrouter daemon-port reads the current Local API URL from daemon.state.json. It returns a non-zero status when no running daemon state is available.

System service

originrouter service install
originrouter service start
originrouter service status

Run these commands in order:

  1. service install registers the current-user service.
  2. service start starts the daemon.
  3. service status confirms that it is running.

Available actions are install, start, stop, restart, status, and uninstall. Every action supports --dry-run so you can inspect operating-system commands without writing service configuration.

Service mechanism

The service uses the current-user mechanism provided by each supported platform.

Install and start

After installing the service, run service start to launch the daemon.

Automatic start

“Start at boot” means the current user's login or session startup: a macOS LaunchAgent, Linux systemctl --user, or a Windows logon-triggered task. It is not a privileged system-boot service.

Uninstall impact

Uninstalling the service removes its service configuration, but does not remove account, provider, route, or conversation data.

Local API configuration

originrouter local config show
originrouter local config set \
  --port 43110 \
  --bind 127.0.0.1 \
  --allow-lan off \
  --relay-mode auto

Run local config show first, then apply changes with local config set. Restart the service after changing the configuration.

Settings include --port, --bind, --allow-lan on|off, --relay-mode auto|cloud|local|custom, and --relay-url. Restart the service after a change, then verify with daemon-port and the App connection state.

Agents and ordinary commands

CommandRuntime
claude [args...]Native Claude Code TUI with OriginRouter remote control
codex [args...]Native Codex TUI with OriginRouter remote control
claude-terminal / claude-sdkManaged Claude Agent SDK session
codex-terminal / codex-app-serverManaged Codex app-server session
run -- <command>Run an ordinary child process through the wrapper and propagate its exit status

--native-config preserves native-agent authentication, model, environment, and configuration while adding remote control.

Recovery order

  1. originrouter service status
  2. originrouter daemon-port
  3. originrouter doctor
  4. originrouter service restart
  5. Inspect bind, port, LAN, and relay settings in local config show

If a collaboration run is daemon-owned, losing the local terminal does not prove that the run stopped. Restore the service, then inspect it with collaboration show or attach.

Was this page helpful?