NodeChain EN
  • NodeChain
  • Learn
    • About NodeChain
    • Infrastructure
      • Connector
        • Wrapper APIs
      • Nodes
      • Startup script
    • License
    • Ecosystem
      • Supported APIs
      • Integrations
      • Acknowledgments
  • Develop
    • Quick start
      • Initial setup
      • Using command-line script
        • Commands
    • How-to
      • Run tests locally
      • Lint automatically with hooks
      • Integrate a new Blockchain/API
      • Connect to a public node
    • Wrapper API definition file
    • Contributing
  • Reference
    • API Reference
      • Admin
      • General Endpoints
      • REST Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • JSON-RPC Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • Real-Time Wrapper API
        • Bitcoin
        • Ethereum
Powered by GitBook
On this page
  • start
  • Options
  • stop
  • Options
  • status
  • Options
  • General options (flags)
  • --blockchain
  • --certs
  • --config
  • --defaultconfig
  • --help
  • --local
  • --network
  • --port
  • --remote
  • --ssl
  • --sslport
  • --token
  • --verbose
  • --version
  1. Develop
  2. Quick start
  3. Using command-line script

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

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

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

--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
PreviousUsing command-line scriptNextHow-to

Last updated 3 years ago