Relay Lifecycle
Start, stop, and inspect the Otto relay daemon.
otto start
Starts the relay daemon as a background process.
Usage
otto start [options]
Flags
| Flag | Shorthand | Required | Type | Default | Description |
|---|---|---|---|---|---|
--attached | No | boolean | false | Run in attached mode with logs streamed to stdout instead of daemonizing | |
--port | No | number | 8787 | Port to start the relay on |
Examples
# Start relay daemon in background
otto start
# Start relay with logs attached to terminal (dev mode)
otto start --attached
# Start relay on a custom port
otto start --port 9000
Exit codes
| Code | Meaning |
|---|---|
0 | Relay started successfully |
1 | Failed to start (port conflict, missing config, etc.) |
otto stop
Stops the running relay daemon.
Usage
otto stop
Examples
otto stop
Exit codes
| Code | Meaning |
|---|---|
0 | Relay stopped successfully |
1 | No relay running or failed to stop |
otto restart
Restarts the relay daemon. If the relay is not running, this command starts it.
Usage
otto restart [options]
Flags
| Flag | Shorthand | Required | Type | Default | Description |
|---|---|---|---|---|---|
--port | No | number | current daemon port or 8787 | Port to restart the relay on | |
--attached | -a | No | boolean | false | Run attached in foreground and stream logs to current terminal |
Examples
otto restart
otto restart --port 9000
otto restart --attached
Exit codes
| Code | Meaning |
|---|---|
0 | Relay restarted successfully |
1 | Failed to restart the relay |
otto status
Reports whether the relay daemon is running. Use --nodes to include connected node IDs.
Usage
otto status [--nodes] [--json]
Examples
otto status
otto status --nodes
otto status --nodes --json
When stopped, otto status suggests running otto start.
Exit codes
| Code | Meaning |
|---|---|
0 | Status reported successfully |
Related commands
- otto setup — first-run setup, also ensures daemon readiness.
- otto logs follow — tail live relay logs after starting.