Zcash Full Node and CLI¶
Zcashd & Zcash-cli allow you to run a full node and interact with it via a command-line interface. The zcashd full node downloads a copy of the Zcash blockchain, enforces rules of the Zcash network, and can execute all functionalities. The zcash-cli allows interactions with the node (e.g. to tell it to send a transaction).
Zcashd & Zcash-cli are maintained by Electric Coin Company (the founding team for Zcash).
Zcashd requires a zcash.conf file to run.
A blank zcash.conf file will run with all default settings. To generate one, run:
mkdir -p ~/.zcash
Zcashd can be configured in various ways to suit different use cases; see the Zcash.conf guide for an extensive list of options.
Now, run zcashd!
If you are running Zcash for the first time, the Zcashd node needs to fully sync before using the RPC. This may take a day or so.
With a fully-synced running
zcashd in the background, open a new terminal window and run:
See the available RPC commands for all the capabilities of Zcashd & Zcash-cli.
Every Zcashd comes with an embedded Zcash wallet. The private keys and transaction information are associated with this wallet are stored in:
Ensure this file is regularly backed up and permissions are private.
Try generating some addresses, then sending and receiving transparent and shielded transactions! Note that there are separate commands for transparent and shielded addresses/transactions.
If you use zcashd but have not upgraded within 16 weeks of a release, it will reach the end-of-support (EOS) halt and exit with an error message. See the release cycle for details.
The node gives a warning two weeks in advance if you have the metrics screen enabled (and if there are no other overriding errors). A getdeprecationinfo RPC call will also return the block height at which the node will halt.
To upgrade Zcashd & Zcash-cli, fetch the latest updates:
git fetch origin
Upgrading to v5.8.0 requires a build; try the following:
git checkout v5.8.0 ./zcutil/clean.sh ./zcutil/build.sh -j$(nproc)
Run Zcashd again and verify that the version number matches that of the source repository.
If parameters need re-running, try
./zcutil/fetch-params.sh. This is unlikely, and the node should tell you if this is necessary.
If you don’t have
sysctl -n hw.ncpuon macOS or if the build runs out of memory, try again without the
If you run into issues upgrading, please see the Network Upgrade Guide.
An extensive list of Zcashd & Zcash-cli pages, including ones linked inline in this page above.