Command-Line Options
Starting the command-line docker program robot:
bash
./robot -s node.fmz.com/123456 # prompts for the password (not echoed)
./robot node.fmz.com/123456 # short form: robot address [password]
./robot -c robot.conf # read options from a configuration file
./robot -v # show the version
Options
| Option | Description |
|---|---|
-s address | Address for talking to the platform, like node.fmz.com/123456 (123456 is the account UID); a ws:// or wss:// prefix is allowed. Shown on the docker deployment page. |
-p password | Account password. Not recommended: a plain-text password stays in the shell history and the process list. Without it the password is prompted for, or read from the configuration file. |
-n name | Docker name, shown on the platform's docker page. |
-w dir | Working directory. logs (robot data, docker log, identity file) lives under it. |
-c file | Configuration file; format below. |
-u user | Linux/macOS only: run strategy processes as this system user; the docker itself must run as root. Ignored with -i. |
-I IP | Local outbound IP: the connection to the platform and the strategies' connections to exchanges are bound to this address; see below. |
-i image | Linux/macOS only: run each strategy process in its own container created from this Docker image; Docker must be installed and running. |
-e path | With -i: path of the executable inside the container. |
-f JSON | With -i: Docker container settings, as inline JSON or @path to read them from a file. |
-H address | With -i: address the container uses to connect back to the host. |
-vv | Verbose log (including the messages exchanged with the platform); off by default to keep logs small. |
-d DNS | The old custom DNS option; still accepted but ignored, as the docker always uses the system resolver. |
-v, -V, --version | Print version and build information and exit. |
-h, --help | Print usage. |
--ctl-stdin | Read control commands from standard input (the first line is the password when -p is not given); stop or end of input triggers a graceful shutdown. Meant for programs that wrap the docker as a service. |
Options that take a value can also be written as -option=value, e.g. -n=server01. An invalid option prints the usage and exits.
Configuration file robot.conf
One key=value per line; the key is the option name without - (s p n w u I d i e f H vv), and lines starting with # are comments:
ini
# robot.conf
s=node.fmz.com/123456
p=your-password
n=server01
vv=true
- Give the file with
-c; without-cand without an address,robot.confin the startup directory is loaded automatically if present. - When an option is given both on the command line and in the file, the command line wins.
- Keys are case-sensitive:
Iis the outbound IP andithe Docker image. - The configuration file path and
-f @fileare resolved relative to the startup directory (before-wchanges directory). - The file holds your password, so make it readable only by you (
chmod 600 robot.conf).
Pinning the outbound IP (-I)
When the server has several IP addresses and the exchange API key is whitelisted for one of them, pin the outbound IP with -I, e.g. ./robot -s node.fmz.com/123456 -I 192.168.1.100. The connection to the platform and the strategies' connections to exchanges then leave from that address. With -i container isolation the container's network may not have that address; in that case let the container use the host network.
The Windows GUI version has no IP setting; use the command-line version when you need to pin the outbound IP. The GUI version accepts only -s, -p and -n, which prefill the window; when both -s and -p are given it starts automatically.