
muti-metroo run
Start the agent. It reads your config file, connects to peers, and begins accepting connections.
muti-metroo run -c config.yaml
The agent runs in the foreground and logs to stdout. Use Ctrl+C to stop. For persistent background operation, see System Service. On Windows, --detach keeps it running after an SSH session ends without requiring service installation.
Usage
muti-metroo run -c <config-file>
Flags
-c, --config <file>: Path to configuration file (default:./config.yaml)--startup-delay <duration>: Delay before starting network activity (e.g.,90s,2m). Overrides config value.-D, --detach: Re-spawn the agent outside the SSH session's Job Object and exit immediately (Windows only). The agent continues running after the SSH session ends.
:::info Embedded Configuration When using a binary with embedded configuration:
- Embedded configuration takes precedence over the
-cflag - If
default_action: runis set in embedded config, the agent auto-starts without arguments - Run the embedded binary without
runcommand:./my-agentinstead of./my-agent run:::
Examples
# Run with config file
muti-metroo run -c ./config.yaml
# Run with different config
muti-metroo run -c /etc/muti-metroo/config.yaml
# Run with a startup delay (wait 90 seconds before network activity)
muti-metroo run -c config.yaml --startup-delay 90s
# Start detached from an SSH session (Windows only)
muti-metroo run -c config.yaml --detach
Environment Variables
Config file supports environment variable substitution:
agent:
data_dir: "${DATA_DIR:-./data}"
log_level: "${LOG_LEVEL:-info}"
Set before running:
export DATA_DIR=/var/lib/muti-metroo
export LOG_LEVEL=debug
muti-metroo run -c config.yaml