Administration using the CLI
The Nuts executable this project provides can be used to both run a Nuts server (a.k.a. node) and administer a running node remotely. This chapter explains how to administer your running Nuts node.
Prerequisites
The following is needed to run a Nuts node:
Nuts executable for your platform, or a Nuts docker container.
The address of your running Nuts node. You can pass this using the address variable.
Commands
Run the executable without command or flags, or with the help command to find out what commands are supported:
nuts
For example, to list all network transactions in your node (replace the value of NUTS_ADDRESS with the HTTP address of your Nuts node):
NUTS_ADDRESS=my-node:1323 nuts network list
You can also use the Nuts docker image to run a command (against a remote Nuts node):
docker run nutsfoundation/nuts-node --address=http://my-node:1323 network list
Or inside a running Nuts docker container (against the running Nuts node):
docker exec <nuts-container-name> nuts network list
See CLI Command Reference for the available commands.
The following options can be supplied when running CLI commands:
Key |
Default |
Description |
---|---|---|
address |
localhost:1323 |
Address of the node. Must contain at least host and port, URL scheme may be omitted. In that case it ‘http://’ is prepended. |
timeout |
10s |
Client time-out when performing remote operations, such as ‘500ms’ or ’10s’. Refer to Golang’s ‘time.Duration’ syntax for a more elaborate description of the syntax. |
token |
Token to be used for authenticating on the remote node. Takes precedence over ‘token-file’. |
|
token-file |
File from which the authentication token will be read. If not specified it will try to read the token from the ‘.nuts-client.cfg’ file in the user’s home dir. |
|
verbosity |
info |
Log level (trace, debug, info, warn, error) |