Zcash.conf Guide

Below contains information for additional configuration of the zcash.conf file.

Notes:

  • A blank zcash.conf file will run zcashd on mainnet.

  • The most important setting to set is which network, mainnet, testnet, and regtest, zcashd to run. The other settings allow optimization of zcashd and how it interacts with other components it services.

  • You can have multiple configuration files, and run zcashd with a flag -conf=<file> to run with a specific config file. We suggest keeping various configuration files to suit different needs, rather than editing your configuration file as needed.

  • By default, the config file zcashd tries is $HOME/.zcash/zcash.conf on Debian and Windows, and /Users/yourusername/Library/Application\ Support/Zcash/zcash.conf on MacOS.

JSON-RPC Options

Controlling a running Zcash/zcashd process

Parameter

Description & Example

addnode

Use as many addnode= settings as you like to connect to specific peers

addnode=69.164.218.197
addnode=10.0.0.2:8233

server

Tells zcashd to accept JSON-RPC commands (set as default if not specified)

server=1

rpcbind

Bind to given address to listen for JSON-RPC connections. Use [host]:port
notation for IPv6. This option can be specified multiple times
(default: bind to all interfaces)
rpcbind=<addr>

rpcuser

If you set an rpcpassword using that option, you must also set rpcuser.

rpcuser=<username>

rpcpassword

If you specify this option, be sure it is sufficiently-secure, see the
notes below.
When no rpcpassword option is specified, the daemon now uses a special
‘cookie’ file for authentication. This file is generated with
random content when the daemon starts, and deleted when it
exits. Its contents are used as an authentication token. Read
access to this file controls who can access through RPC. By default
it is stored in the data directory but its location can be overridden
with the option -rpccookiefile.
rpcpassword=<password>

Warning

You should still set a secure password (or rely on the auth cookie
that is generated when you don’t supply the rpcpassword option)
even if you don’t expose the RPC port to external interfaces,
because of the existence of DNS rebinding attacks (see

To generate a password that contains enough randomness to protect your
keys, you could use the following command (on Linux)…
$  dd if=/dev/random bs=32 count=1 2>/dev/null | base64

rpcclienttimeout

How many seconds Zcash will wait for a complete RPC HTTP request.
after the HTTP connection is established.
rpcclienttimeout=30

rpcallowip

By default, only RPC connections from localhost are allowed.
Specify as many rpcallowip= settings as you require to allow
insecure connections from other hosts, either as a single IPv4/IPv6
or with a subnet specification. Without further security controls,
an attacker who can see your network traffic will be able to take
over your node.

Warning

Using the RPC port over a remote interface is NOT RECOMMENDED, because
that will cause the rpcpassword to be transmitted over the network
unencrypted, allowing any observer to steal your keys + Zcash and take
over the OS account running zcashd
rpcallowip=127.0.0.1/255.255.255.0
rpcallowip=127.0.0.1/24
rpcallowip=::1/128

rpcport

Listen for RPC connections on this TCP port:

rpcport=83232

rpcconnect

You can use Zcash or zcashd to send commands to Zcash/zcashd
running on another host using this option:
rpcconnect=127.0.0.1

Transaction Fee

Parameter

Description & Example

sendfreetransactions

Send transactions as zero-fee transactions if possible (default: 0)

sendfreetransactions=1

txconfirmtarget

Create transactions that have enough fees (or priority) so they are
likely to # begin confirmation within n blocks (default: 1). This
setting is overridden by the -paytxfee option.
txconfirmtarget=n

Miscellaneous Options

Parameter

Description & Example

gen

Enable attempt to mine Zcash.

gen=1

txindex

Maintain a full transaction index, used by the getrawtransaction rpc,
partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, tor.
txindex=1

genproclimit

Set the number of threads to be used for mining Zcash (-1 = all cores).

genproclimit=1

equihashsolver

Specify a different Equihash solver (e.g. “tromp”) to try to mine Zcash
faster when gen=1.
equihashsolver=default

keypool

Pre-generate this many public/private key pairs, so wallet backups will be valid for
both prior transactions and several dozen future transactions.
keypool=100

paytxfee

Pay an optional transaction fee every time you send Zcash. Transactions with fees
are more likely than free transactions to be included in generated blocks, so may
be validated sooner. This setting does not affect private transactions created with
z_sendmany
paytxfee=0.00