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
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
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"
--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
To enable SSL you need to have the files nodechain_cert.key
and nodechain_cert.crt
in the specified path. This filenames are mandatory.
--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
Use single quotation marks to wrap your JSON string
--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
--ssl
Enable SSL in the Connector.
If this flag is specified, you will need to specify the directory of the certificates by means of its flag or the interface.
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