Commands

This section describes the commands available from nodechain. For more general information at the command line, append the -h or --help, such as nodechain -h.

For more information about a specific nodechain command, append the -h or --help flag after the command, such as nodechain start --help.

start

Initiates the Connector or any node. By default will prompt an interface.

Syntax

$ ./nodechain.py start

Example

$ ./nodechain.py start

Options

  • -h or --help: Shows command help information.

  • -a or --all: Initializes all the nodes of the network specified as a parameter

Syntax

$ ./nodechain.py start -a <network>

Example

$ ./nodechain.py start -a regtest

An interface will be prompt if the user needs to specify any variable

stop

Stop the Connector or any node. By default will prompt an interface.

Syntax

$ ./nodechain.py stop

Example

$ ./nodechain.py stop

Options

  • -h or --help: Shows command help information.

  • -a or --all: Stop all the nodes of the network specified as a parameter

Syntax

$ ./nodechain.py stop -a <network>

Example

$ ./nodechain.py stop -a regtest

An interface will be prompt if the user needs to specify any variable

status

Display the status of the services. By default will prompt an interface.

Syntax

$ ./nodechain.py status

Example

$ ./nodechain.py status

Options

  • -h or --help: Shows command help information.

General options (flags)

--blockchain

Also -b

Specifies the absolute path to the folder where the blockchain files will be stored.

Syntax

$ ./nodechain.py -b <path_to_blockchain> [start]

Example

$ ./nodechain.py -b "/srv/nodechain-data/btc/regtest"

If there is already data in the directory from a volume with the previous blockchain synchronization, the synchronization will continue from the same point.

--certs

Also -c

Specifies the absolute path to the folder with the SSL certificates.

Syntax

$ ./nodechain.py -c <path_to_certs> [start]

Example

$ ./nodechain.py -c "/etc/ssl/certs" start

--config

Also -g

Specifies the configuration via command line in JSON format

Syntax

$ ./nodechain.py -g '<configuration_in_JSON>' [start]

Example

$ ./nodechain.py -g '{"foo": "bar"}' start

--defaultconfig

Use the default configuration to start the node

Syntax

$ ./nodechain.py --defaultconfig [start]

Example

$ ./nodechain.py --defaultconfig start

--help

Also -h

Shows general help information

Syntax

$ ./nodechain.py -h

--local

Use a local node. This command will start the blockchain using the docker-composes

Syntax

$ ./nodechain.py --local [start]

Example

$ ./nodechain.py --local start

--network

Also -n

Specifies the network of the node.

Syntax

$ ./nodechain.py -n <network> [start|stop|status]

Example

$ ./nodechain.py -n testnet start

--port

Also -p

Specifies the Connector port.

Syntax

$ ./nodechain.py -p <port> [start]

Example

$ ./nodechain.py -p 6000 start

--remote

Use a remote node. This command won't start the blockchain using the docker-composes.

Syntax

$ ./nodechain.py --remote [start]

Example

$ ./nodechain.py --remote start

Do not forget to use the appropriate configuration for each endpoint.

--ssl

Enable SSL in the Connector.

Syntax

$ ./nodechain.py --ssl [start]

Example

$ ./nodechain.py --ssl start

--sslport

Also -sp

Specify the Connector SSL port.

Syntax

$ ./nodechain.py -sp <ssl_port> [start]

Example

$ ./nodechain.py -sp 4000 start

--token

Also -t

Selects a blockchain by its token from command line.

Syntax

$ ./nodechain.py -t <token> [start|stop|status]

Example

$ ./nodechain.py -t btc start

--verbose

Also -v

Increase output verbosity.

Syntax

$ ./nodechain.py -v [start|stop|status]

Example

$ ./nodechain.py -v start

--version

Also -V

Returns the version of NodeChain you're running.

Syntax

$ ./nodechain.py -V

Last updated