Look for the latest and greatest information about zcashd in the zcashd book!
For more information on getting started with Debian, checkout this overview.
Maybe the best place to learn more about Zcash and zcashd is the Zcash readthedocs
Upgrading zcashd on Debian
Debian is one of the easiest operating systems to run a zcashd node on.
Debian 11 is the one to use right now.
Debian 11 "Bullseye" (stable): This is the current stable release of Debian, which was released in August 2021. It is supported until 2026.
Check this guide for the latest instructions
I have a zcashd running. Which version am I on? I forget. One thing we can do is look at the RPC docs and remember what we can call with the command line.
For example:
zcash-cli getinfo
This might return something like this:
{ "version": 5040150, "build": "v5.4.1", "subversion": "/MagicBean:5.4.1/", "protocolversion": 170100, "walletversion": 60000, "balance": 0.00000000, "blocks": 2019659, "timeoffset": 0, "connections": 8, "proxy": "", "difficulty": 87275648.6083445, "testnet": false, "keypoololdest": 1657955907, "keypoolsize": 101, "paytxfee": 0.00000000, "relayfee": 0.00000100, "errors": "", "errorstimestamp": 1679084974}
In this case we are 5.4.1 and 5.4.2 has been released. So, let's upgrade.
zcash-cli stop
You should see Zcash server stopping
Now, upgrade is just this easy:
sudo apt-get install zcash
You should see something like this:
Reading package lists... DoneBuilding dependency tree... DoneReading state information... DoneThe following packages will be upgraded: zcash1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.Need to get 8713 kB of archives.After this operation, 1024 B disk space will be freed.Get:1 https://apt.z.cash bullseye/main amd64 zcash amd64 5.4.2 [8713 kB]Fetched 8713 kB in 1s (8946 kB/s)perl: warning: Setting locale failed.perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "en_US.UTF-8", LANG = "C.UTF-8" are supported and installed on your system.perl: warning: Falling back to a fallback locale ("C.UTF-8").(Reading database ... 70295 files and directories currently installed.)Preparing to unpack .../archives/zcash_5.4.2_amd64.deb ...Unpacking zcash (5.4.2) over (5.4.1) ...Setting up zcash (5.4.2) ...Processing triggers for man-db (2.9.4-2) ...
Now, you might think you can start zcashd again with:
zcash-cli start # won't work!!
Well, you would be wrong because that is not a valid method. And, the RPC interface that zcash-cli uses is not running! In my case, I start zcashd with:
zcashd -daemon
and see Zcash server starting.
To make sure that everything looks good, I tail the debug log for a while:
tail -f ~/.zcash/debug.log
I see something like this:
2023-03-17T20:46:07.171804Z INFO ProcessNewBlock: main: Pre-allocating up to position 0x2000000 in blk01748.dat2023-03-17T20:46:07.473707Z INFO ProcessNewBlock: main: UpdateTip: new best hash=0000000000d9866f3891a9fcd834788902906709a3067bde1847863dfd7a66dc height=2019675 bits=469852179 log2_work=59.666506 tx=12511932 date=2023-03-17 20:45:52 progress=1.000000 cache=0.1MiB(80tx)2023-03-17T20:46:53.315776Z INFO ProcessNewBlock: main: UpdateTip: new best hash=000000000145e16917f7072a0e0a68bf9ca616d3061831868ee66317de85073c height=2019676 bits=469855784 log2_work=59.666507 tx=12511935 date=2023-03-17 20:46:36 progress=1.000000 cache=0.2MiB(84tx)2023-03-17T20:46:56.477474Z INFO main: ProcessMessage: Received addr: 1 addresses (1 processed, 0 rate-limited) from peer=72023-03-17T20:47:01.130096Z INFO ProcessNewBlock: main: UpdateTip: new best hash=000000000009010f9242a3f8b21958255149658360f909d86833409668b16e56 height=2019677 bits=469855233 log2_work=59.666508 tx=12511937 date=2023-03-17 20:46:53 progress=1.000000 cache=0.2MiB(85tx)2023-03-17T20:47:18.978413Z INFO main: ProcessMessage: Received addr: 1 addresses (1 processed, 0 rate-limited) from peer=32023-03-17T20:47:45.968727Z INFO main: ProcessMessage: Received addr: 1 addresses (1 processed, 0 rate-limited) from peer=32023-03-17T20:47:55.686928Z INFO main: ProcessMessage: Received addr: 1 addresses (1 processed, 0 rate-limited) from peer=22023-03-17T20:48:17.356402Z INFO main: ProcessMessage: Received addr: 2 addresses (2 processed, 0 rate-limited) from peer=72023-03-17T20:48:30.752233Z INFO main: ProcessMessage: Received addr: 1 addresses (1 processed, 0 rate-limited) from peer=52023-03-17T20:48:49.624112Z INFO main: ProcessMessage: Received addr: 1 addresses (1 processed, 0 rate-limited) from peer=8
You can also use ps to see the running process:
ps ax | grep zcash
Cool! Looks good. Now I'm going to send a transaction just to feel the power.


