General Configuration and Usage

Command line installation

Use the command below to install the client and generate interactively your configuration file:

horizon-cli install

The configuration file can also be created using command line parameters:

horizon-cli install --endpoint https://horizon-test.com

Use the help to get the full list of available parameters.

If you did not use an installer, this command should always be run first to ensure everything is set up correctly.

Configuration content

General parameters of Horizon Client are configured through a file placed in one of the following locations:

  • /opt/horizon/etc/horizon-cli.conf

  • /usr/local/etc/horizon-cli.conf

  • [C|D]:\ProgramData\EverTrust\Horizon\horizon-cli.conf

The configuration file is in JSON format and contains the following:

{
  "api_id": "API-ID",
  "api_key": "API-Key",
  "endpoint": "endpoint url. e.g. https://horizon-test.evertrust.fr",
  "debug": false,
  "timeout": 2,
  "proxy": "proxy. e.g. http://myproxy.corp.local:3128",
  "root_ca": "Root CA PEM Certificate(s).",
  "log_file": "The log file of Horizon."
}

These parameters may be instead specified or overridden using environment variables, as detailed in the table below.

Table 1. General configuration parameters
Parameter Environment variable Description

api_id

APIID

The API ID: the identifier of a local account user defined in Horizon. Used for discovery, import modes and for the revocation in the EST module

api_key

APIKEY

The API Key. Used together with API ID

endpoint

ENDPOINT

The URL of the Horizon instance, starting with http or https and without trailing "/"

debug

DEBUG

Set to true to enable debug mode of the Horizon Client, defaults to false if unspecified.

timeout

Connection timeout in seconds, defaults to 2 seconds if unspecified.

proxy

https_proxy

HTTPS proxy used to reach Horizon (if any), in URL form which can contain login and password if needed.

root_ca

PEM chain of CA certificates that issued the TLS certificate exposed by Horizon. This parameter is optional, as preferred way is to put these CA certificates in the machine trust store.

log_file

LOGFILE

Log file of horizon. This parameter is optional, but a default value is set as the Horizon Client displays useful messages on STDOUT and logs should always be kept.

You can use the “--help” parameter to get online help on any command or sub-command.

horizon-cli <command> <subcommand> --help