Skip to main content
Mole running commands

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 background operation, see System Service.

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.
Embedded Configuration

When using a binary with embedded configuration:

  • Embedded configuration takes precedence over the -c flag
  • If default_action: run is set in embedded config, the agent auto-starts without arguments
  • Run the embedded binary without run command: ./my-agent instead 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

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