Instructions for Using Zcash Windows Binaries?

I am trying to run the suite of Windows executables released as zcash-windows-v5.2.0 - as part of a blockchain class exercise.

Zcashd using the Windows binary is very fast: I did a full sync in less than six hours.

However, when I try to run zcash-cli getinfo, I am getting the following error:

Error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file.

How do I get the Windows binaries to work correctly? Are there step-by-step instructions online that someone can point me to? FYI- I have already tried running the recommended Debian / Ubuntu versions on virtual machines and they always errored out with an “out of memory” error, never reaching full sync.

1 Like

It sounds like you need to enable the rpcuser and cookie authentication or rpcpassword fields in the conf file for remote rpc execution. Ill find the docs but essentially you set these flags in the conf (or in the zcashd start command) and are then required in any subsequent rpc command. Launching rpcs from outside of the zcash/src dir requires setting these fields regardless. Typically users just use rpcpassword for local home-node stuff but the cookie auth method is recommended for applications requiring more security.


So if the conf said


Then any command would read something like

./zcash-cli conf=‘/ghome/taren/zcash.conf’ rpcuser=yousir rpcpassword=abc123 z_getsomething

Or if you didnt want to edit the conf you could set it for the session

./zcashd rpcpassword=abc123 rpcuser=yousir


Sure is useful to have the option to pass user credentials in as part of the command. I did not know that was even possible. I gave it a shot. Passing in password and user to .\zcashd definitely does not work. That throws this error: ‘There is no RPC client functionality in zcashd.’ Unfortunately, running .\zcash-cli while passing in the conf filepath, user and password threw the original error message. Could be that the conf file needs to first be set up with user credentials prior to running .\zcashd. I’ll try running .\zcashd -reindex after setting up the conf file, and take it from there. Thanks for the info. Very helpful!


You dont need to reindex, just set the credentials in the conf and restart

Huh? I thought reindex is quicker. Doesn’t restart download all the blocks again from scratch? Asking cause I really don’t know. Thanks for your patience. Zcash newbie here.

Restart as in turn the node back on, it doesnt need to reindex every time you stop it. Reindex is an option you call to delete any existing blockchain data and redownload the whole thing. The stop command just stops it.
Those rpcuser and password settings do need to be set before zcashd starts regardless, otherwise it wont know what they are.

1 Like

Okay, that makes sense…I noticed something when I last ran zcashd though. The splash screen said I was running a mainnet zcashd node, even though I had set testnet=1 & in my conf file. That makes me wonder if zcashd is even reading my conf file to begin with. Okay, back to the drawing board. Appreciate the input.

No if that’s the case then probably not. the default location is inside the zcash folder I believe but, as I do with mine, you can place the conf in a parent directory relative to zcash. In Ubuntu zcash’s house is typically C:/home/username/zcash/src/zcashd and I put my conf in /username/zcash.conf and then to run ./zcash-cli conf=‘/home/username/zcash.conf’ (rpcuser/passwrd). Like I said I just hast to be in the path to find it, otherwise it’ll either not start or call to the default which might be /home/username/zcash/zcash.conf

Good insight. My takeaway is that the conf file needs to be in the path zcashd expects, which should be a parent directory relative to the zcashd executable. The Windows binary zcashd.exe is a portable app, so my thought was that it can live in any directory. I had lazily left it in the Downloads directory, but after considering your comment, I think I need to move and launch it from elsewhere…

With the Windows binary version, Zcashd expects zcash.conf to be in a very specific location: C:\Users\user\AppData\Roaming\Zcash\zcash.conf This is stated explicitly, as initially, there is no zcash.conf file, and the user is prompted to create one in that exact location.

So, in order for zcash.conf to be in the path, I may need to move zcashd.exe to a directory that is a child directory relative to the Zcash directory, i.e., something like C:\Users\user\AppData\Roaming\Zcash\zcashd

With Zecwallet on windows it’s very similar to what your modeling: the data lives in AppData\Roaming folder and the binaries live in AppData\Local\Programs so I would probably place the conf in it’s predetermined location like it suggests. The AppData Folder is typically hidden and you’ll need to enable it in the ‘view’ tab.
These are the zecwallet docs, they’re a little old now but still apply and describe the same (or very similar it seems) windows setup Using ZecWallet - ZecWallet Docs

1 Like