Handshake logo
    ___   
   /\__\  
  /:/__/_ 
 /::\/\__\
 \/\::/  /
   /:/  / 
   \/__/  

HSD Configuration

By default, the mainnet hsd config files will reside in ~/.hsd/hsd.conf and ~/.hsd/hsw.conf. Any parameter passed to hsd at startup will have precedence over the config file. Even if you are just running hs-client without hsd installed (to access a remote server, for example) the configuration files would still reside in ~/.hsd/

For example:

…will read the config file at ~/.hsd/regtest/hsd.conf and ignore any network or api-key parameters listed in that file.

All hsd configuration options work in the config file, CLI arguments, process environment, and in the constructor parameters when instantiating new node objects in JavaScript. Each method has slightly different formatting. Note specifically the usage of hyphens and capital letters. See the examples below:

config file CLI parameter environment variable JS object constructor
network: testnet --network=testnet HSD_NETWORK=testnet {network: 'testnet'}
log-level: debug --log-level=debug HSD_LOG_LEVEL=debug {logLevel: 'debug'}
max-outbound: 8 --max-outbound=8 HSD_MAX_OUTBOUND=8 {maxOutbound: 8}

Datadir/Prefix

The hsd datadir is determined by the prefix option. The following example wiil create a datadir of ~/.hsd_spv, containing a chain database, wallet database and log file.

Common Options

Node Options

Logger Options

Chain Options

Note that certain chain options affect the format and indexing of the chain database and must be passed in consistently each time.

Mempool Options

Pool Options

Miner Options

HTTP

Note: For security cors should not be used with no-auth.
If enabled you should also enable wallet-auth and set api-key.

Wallet options

These options must be saved in hsw.conf. They can also be passed as environment variables or command-line variables if they are preceeded with a wallet- prefix (WALLET_ for env vars).

For example, to run a hsd and wallet node on a remote server that you can access from a local machine, you would could use the following examples:

Example using hsw.conf:

network: testnet
wallet-auth: true
api-key: hunter2
http-host: 0.0.0.0

Example using CLI options:

Example using ENV:

hsd client:

Wallet database:

Wallet http server:

Sample Config Files

See https://github.com/handshake-org/hsd/blob/master/etc/sample.conf


See a mistake? Open a pull request.

https://github.com/handshake-org/handshake-org.github.io/blob/master/src/guides/config.md