CLI Reference
Find information about the Synnax Core CLI.
Start
The start command starts the Synnax Core.
Examples
Starting a Core
We can use the i and m flags to start a Core in insecure mode with an in-memory data
store:
synnax start -l localhost:9090 -im Flags
| Flag | Default | Description |
|---|---|---|
--listen/-l | "localhost:9090" | A reachable address and port to listen on for incoming client connections and RPCs from other nodes. |
--peers/-p | [] | A list of comma-separated peer Cores in an existing cluster. If this list is not empty, the Core will
attempt to join the cluster by connecting to each peer in the list. If the list is empty and no existing cluster
data is found, the Core will bootstrap a new cluster. |
--data/-d | "synnax-data" | The file path to the folder where Synnax will keep its data. |
--verbose/-v | false | Enables human-readable logging. |
--insecure/-i | false | Starts the node without TLS encryption. This is not recommended for production use. |
--mem/-m | false | Starts the node with an in-memory data store. In this mode, all data will
kept in memory, will not be stored on disk, and will be lost when the node is
restarted. This can be useful for testing and development, but is not recommended
for production use. |
--help/-h | false | Prints the help message for the start command. |
--config/c | "/usr/local/synnax/config.yaml" | Path to a JSON, YAML, or TOML configuration file that can
be used to set the node's configuration instead of using flags or environment variables.
See Configuration Files for more information. |
--auto-cert | false | Automatically generate self-signed certificates for the node. |
--certs-dir | "/usr/local/synnax/certs" | Path to the directory containing the TLS certificates for the node. |
--ca-cert | "ca.crt" | Path to the CA certificate file relative to `--certs-dir`. |
--node-cert | "node.crt" | Path to the node certificate file relative to `--certs-dir`. |
--node-key | "node.key" | Path to the node key file relative to `--certs-dir`. |
--username | "synnax" | Username for the database root user. |
--password | "seldon" | Password for the database root user. |
--license-key | "" | License key to use Synnax outside of demo mode. |
--debug | false | Enables debug logging output. We recommend against using this in production, as it generates a very large amount of output. |
--slow-consumer-timeout | 2500000000 | The duration, in ns, after which a telemetry streamer will be closed by the Core if it stops receiving messages. It's rarely necessary to change this value. The default is 2.5s. |
--no-driver | false | Disables the embedded Synnax Driver for the Synnax Core. This is useful when you want to run Synnax without any device integration. |
--disable-integrations | [] | List of device integrations to disable. This is useful when you don't want particular integrations. All integrations are enabled by default. Options are: labjack, modbus, ni, opc, sequence |
--enable-integrations | [] | List of device integrations to enable. This is useful when you only want particular integrations. All integrations are enabled by default. Options are: labjack, modbus, ni, opc, sequence |
--log-file-path | "./synnax-logs/synnax.log" | The path to the file in which the Synnax Core should store its logs |
--log-file-max-size | 50 | The maximum size (in MB) before a log file gets rotated. |
--log-file-max-backups | 5 | The maximum number of log files that should be kept before they are deleted |
--log-file-max-age | 30 | The maximum age (in days) that log files should be kept before they are removed |
--log-file-compress | false | Whether to compress log files on disk. |
Environment Variable Equivalents
The following environment variables can be used in place of the corresponding flags. Command line flags will take precedence over environment variables.
| Flag | Environment Variable |
|---|---|
--listen/-l | SYNNAX_LISTEN |
--peers/-p | SYNNAX_PEERS |
--data/-d | SYNNAX_DATA |
--verbose/-v | SYNNAX_VERBOSE |
--insecure/-i | SYNNAX_INSECURE |
--mem/-m | SYNNAX_MEM |
--config/c | SYNNAX_CONFIG |
--certs-dir | SYNNAX_CERTS_DIR |
--ca-cert | SYNNAX_CA_CERT |
--node-cert | SYNNAX_NODE_CERT |
--node-key | SYNNAX_NODE_KEY |
--username | SYNNAX_USERNAME |
--password | SYNNAX_PASSWORD |
--license-key | SYNNAX_LICENSE_KEY |
--debug | SYNNAX_DEBUG |
--slow-consumer-timeout | SYNNAX_SLOW_CONSUMER_TIMEOUT |
--no-driver | SYNNAX_NO_DRIVER |
--disable-integrations | SYNNAX_DISABLE_INTEGRATIONS |
--enable-integrations | SYNNAX_ENABLE_INTEGRATIONS |
--log-file-path | SYNNAX_LOG_FILE_PATH |
--log-file-max-size | SYNNAX_LOG_FILE_MAX_SIZE |
--log-file-max-backups | SYNNAX_LOG_FILE_MAX_BACKUPS |
--log-file-max-age | SYNNAX_LOG_FILE_MAX_AGE |
--log-file-compress | SYNNAX_LOG_FILE_COMPRESS |
Configuration Files
Synnax will also read configuration files in JSON, TOML and YAML formats. The values set in these configuration files take the lowest precedence and will be overridden by any environment variables or command line flags.
By default, Synnax will look for a configuration file at ~/.synnax.yaml. You can
specify a different configuration file using the --config flag or the SYNNAX_CONFIG
environment variable.
Here are example configuration files in various formats:
{
"listen": "localhost:9090",
"peers": ["localhost:9091", "localhost:9092"],
"data": "/usr/local/synnax/data",
"verbose": true,
"insecure": false,
"mem": false,
"config": "/usr/local/synnax/config.yaml",
"certs-dir": "/usr/local/synnax/certs",
"ca-cert": "ca.crt",
"node-cert": "node.crt",
"node-key": "node.key",
"username": "synnax",
"password": "seldon",
"license-key": "000000-00000000-0000000000",
"debug": false,
"slow-consumer-timeout": "2.5s",
"no-driver": false,
"disable-integrations": [],
"enable-integrations": [],
"log-file-path": "./synnax-logs/synnax.log",
"log-file-max-size": 50,
"log-file-max-backups": 5,
"log-file-max-age": 30,
"log-file-compress": true
} listen: localhost:9090
peers:
- localhost:9091
- localhost:9092
data: /usr/local/synnax/data
verbose: true
insecure: false
mem: false
config: /usr/local/synnax/config.yaml
certs-dir: /usr/local/synnax/certs
ca-cert: ca.crt
node-cert: node.crt
node-key: node.key
username: synnax
password: seldon
license-key: 000000-00000000-0000000000
no-driver: false
disable-integrations: []
enable-integrations: []
log-file-path: ./synnax-logs/synnax.log
log-file-max-size: 50
log-file-max-backups: 5
log-file-max-age: 30
log-file-compress: true listen = "localhost:9090"
peers = ["localhost:9091", "localhost:9092"]
data = "/usr/local/synnax/data"
verbose = true
insecure = false
mem = false
config = "/usr/local/synnax/config.yaml"
certs-dir = "/usr/local/synnax/certs"
ca-cert = "ca.crt"
node-cert = "node.crt"
node-key = "node.key"
username = "synnax"
password = "seldon"
license-key = "000000-00000000-0000000000"
no-driver = false
disable-integrations = []
enable-integrations = []
log-file-path = "./synnax-logs/synnax.log"
log-file-max-size = 50
log-file-max-backups = 5
log-file-max-age = 30
log-file-compress = true Version
The version command prints the installed version of the Synnax database.
Examples
If you run this command:
synnax version You’ll see output similar to the following:
Synnax version 0.47.0 Flags
This command has no flags.