Skip to main content

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​

FlagShorthandRequiredTypeDefaultDescription
--attachedNobooleanfalseRun in attached mode with logs streamed to stdout instead of daemonizing
--portNonumber8787Port 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​

CodeMeaning
0Relay started successfully
1Failed to start (port conflict, missing config, etc.)

otto stop​

Stops the running relay daemon.

Usage​

otto stop

Examples​

otto stop

Exit codes​

CodeMeaning
0Relay stopped successfully
1No 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​

FlagShorthandRequiredTypeDefaultDescription
--portNonumbercurrent daemon port or 8787Port to restart the relay on
--attached-aNobooleanfalseRun attached in foreground and stream logs to current terminal

Examples​

otto restart
otto restart --port 9000
otto restart --attached

Exit codes​

CodeMeaning
0Relay restarted successfully
1Failed 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​

CodeMeaning
0Status reported successfully