Running a Zcash Node End to End (Mexico Tech Week)
Step-by-step workshop: from a laptop with no disk space to a Zebra node running as a service on a server, verified against the network, with a wallet, private payments, and operated by an AI agent. Including everything that broke and how we fixed it.
Overview
I wrote this guide from what we actually did for the Mexico Tech Week workshop in October 2026. The full path: prepare the machine, compile Zebra, configure it for testnet, move it to a server as a service, verify it is on the right chain, bring up a wallet, send a private transaction with a memo, demonstrate selective disclosure with a viewing key, and finally let an AI agent operate all of it within clear limits.
Everything here is testnet (TAZ, no value) or regtest (a local chain). Never mainnet.
This is not a happy-path guide. It includes every single thing that went wrong — versions that stop following the network, explorers on the wrong chain, dead faucets, a server that rebooted four times, an exposed seed phrase — and how we resolved each one, because that was half the learning.
Official References
- Zebra Book: the node's official documentation (install, config, RPC).
- Zallet guide: the full-node wallet that replaces
zcashd's built-in wallet. - Testnet explorer on the NU7 chain:
testnet.zecblock.com. - Testnet lightwallet server:
testnet.zec.rocks:443. - Public server status:
hosh.zec.rocks.
What You Are Going to Deploy
There are decisions to make before typing anything. These were ours:
| Decision | What we chose | Why |
|---|---|---|
| Which network? | Testnet for the node, regtest for the payment demos | Learn with no risk; the testnet faucets were not paying out |
| Which node? | Zebra (Zcash Foundation, Rust) | zcashd is deprecated |
| Which version? | 7.0.0 (7.0.0-rc.0 at compile time) | It is the one that understands NU7; stable 6.4.2 stops following testnet at height 4,465,026 |
| Where does it run? | An Ubuntu server, not the laptop | The laptop (Mac M1, 8 GB RAM, 250 GB) had neither the ~20 GB free nor the hours to sync |
| How do we reach it? | Tailscale + SSH tunnel | The node's RPC is never exposed to the internet |
| Wallet? | Zallet, development build | The stable one did not understand NU7 |
Important: on a test network the software and the network move fast. Before compiling, check which network upgrade is active and which node version supports it. Our first draft of this guide was written against stable Zebra and would have stalled at block 4,465,026.
Prerequisites
- A server with CPU (no GPU), an SSD, and a stable connection. Ours: Ubuntu, 20 threads, SSD.
- A laptop to operate it from. Mine: Mac M1, 8 GB RAM, 250 GB.
- Rust via
rustup, plusprotobufto compile Zebra. - Disk: the testnet chain takes ~20 GB and grows; mainnet is around 300 GB.
- Time: the sync takes several hours. You do not set the node up on demo day.
Machine Preparation
On the Laptop (macOS)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
brew install protobuf
rustc --version && protoc --version
On the Server (Ubuntu)
sudo apt update && sudo apt install -y build-essential clang pkg-config libssl-dev protobuf-compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
Compiling Zebra
cargo install --locked zebrad@7.0.0-rc.0
zebrad --version
# zebrad 7.0.0-rc.0
- Takes 10 to 20 minutes on a normal machine: around 530 crates, and RocksDB is the slowest part.
- The binary lands in
~/.cargo/bin/zebrad. Until you seeInstalled package, thezebradcommand does not exist. - If you get
command not found: zebradonce it finishes, check that~/.cargo/binis on yourPATH.
Editing zebrad.toml
File zebra/zebrad.toml:
[network]
network = "Testnet"
listen_addr = "0.0.0.0:18233"
[state]
cache_dir = "/absolute/path/to/zebra/state"
[rpc]
listen_addr = "127.0.0.1:18232"
enable_cookie_auth = false
[tracing]
progress_bar = "summary"
What each line means:
network = "Testnet"is the key line. Without it, Zebra starts on mainnet.- P2P
listen_addron0.0.0.0:18233: the node accepts connections from other nodes. Mainnet uses8233. - The RPC only listens on
127.0.0.1:18232: nobody outside the machine can call it. Mainnet:8232. enable_cookie_auth = falsekeeps the demos simple. In production,true.cache_diris the chain database. It belongs in.gitignore.
First Startup
zebrad -c zebra/zebrad.toml start
What you should see:
- The Zebra logo and
Thank you for running a testnet zebrad 7.0.0-rc.0 node! Opened RPC endpoint at 127.0.0.1:18232- A peer summary:
Known Peers,Outbound Connections(around 20 is normal). verified checkpoint range block_count=400lines: it is syncing by checkpoints.
Stop it with Ctrl-C. On restart it resumes where it left off (loaded Zebra state cache chain_tip=Some(Height(...))).
Understanding the Sync
Two phases:
- Checkpoints (fast): the first few million blocks are validated against known hashes, in batches of 400. In our version,
max_checkpoint_height=Height(4414585). - Full verification (slow): from the last checkpoint to the tip, every block is verified in full.
Testnet produces a block every ~25 s since NU7 (mainnet: 75 s). That throws off Zebra's estimatedheight field, which estimates at 75 s per block and comes out short; it corrects itself over time.
Querying the Node over RPC
curl -s --data-binary '{"jsonrpc":"2.0","id":1,"method":"getblockchaininfo","params":[]}' \
-H 'content-type: application/json' http://127.0.0.1:18232/
The fields that matter:
| Field | What it means |
|---|---|
chain | "test" confirms testnet |
blocks | blocks your node has already verified |
estimatedheight | estimate of the tip (corrects itself over time) |
verificationprogress | fraction synced; 1 = up to date |
valuePools | TAZ in each pool: transparent, sprout, sapling, orchard, lockbox, ironwood |
upgrades | each network upgrade with its height and pending / active state |
The upgrades list is the history of Zcash expressed in block heights: Overwinter, Sapling, Blossom, Heartwood, Canopy, NU5, NU6, NU6.x, NU7. As the node syncs, they flip from pending to active.
Other useful RPCs: getinfo, getpeerinfo, and getblock '["1", 1]' to see the real block 1 (time 1477674473, October 28, 2016, a single coinbase transaction).
Moving the Node to a Server
Private Network with Tailscale
Install Tailscale on both the laptop and the server, and join them to the same network:
# on the server
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# on the laptop
tailscale status
tailscale ping <server-name>
SSH Access
ssh user@<server-tailscale-ip>
What happened to us: ssh: connect to host ... port 22: Operation timed out means the server shows as offline in tailscale status (powered off, or Tailscale not running). Confirm with tailscale ping before retrying. And watch out: if you type sudo -i after the ssh failed, it runs on your laptop, not the server — check that the prompt shows the server's name.
Build and Configure on the Server
Repeat the preparation, the compile, and the config on the server. Point cache_dir at a disk with room (df -h first).
Running as a systemd Service
This is what makes the node survive reboots. /etc/systemd/system/zebrad.service:
[Unit]
Description=Zebra (Zcash testnet)
After=network-online.target
Wants=network-online.target
[Service]
User=zcash
ExecStart=/home/zcash/.cargo/bin/zebrad -c /home/zcash/zebra/zebrad.toml start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now zebrad
sudo systemctl status zebrad
journalctl -u zebrad -f
What happened to us: the day we set it up, the server rebooted on its own four times. Thanks to Restart=always the node came back by itself every time and resumed where it was, losing none of the sync. Without the service, every reboot would have meant a dead node until someone logged in to start it.
RPC from the Laptop through an SSH Tunnel
The RPC still only listens on the server's 127.0.0.1. To call it from the laptop, open a tunnel:
ssh -N -L 18232:127.0.0.1:18232 user@<server-tailscale-ip>
With the tunnel open, the curl above run on the laptop hits the server's node as if it were local. Nothing is exposed to the internet: Tailscale encrypts the path and the RPC never leaves the server.
Verifying You Are on the Right Chain
Being synced is not enough: you need to be on the same chain as the rest of the network. The proof is one specific block — the NU7 activation block.
getblock '["4465026", 1]'
The hash must be 000089ba27100beede16d64b34e3d1b626b428cb7ee9fe6dcfdc217ce24e78af.
Compare it against an independent source you have already confirmed is on the correct chain. On October 28, 2026 that source was the lightwallet server testnet.zec.rocks:443 (height 4,552,103 that day), queried over gRPC by hand:
printf '\x00\x00\x00\x00\x00' > /tmp/empty.grpc
curl -s --http2 -H 'content-type: application/grpc' -H 'te: trailers' \
--data-binary @/tmp/empty.grpc \
https://testnet.zec.rocks:443/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock | xxd | head -3
Important: before comparing, verify your source is on your chain. The
testnet.zcashexplorer.appexplorer was left on a separate chain after NU7 (its backend was running Zebra 6.3.0). Anyone using it to "verify" would have been comparing against the wrong chain. Andtestnet.lightwalletd-rs-beta.zecdev.orgwas stuck at 4,417,161, before NU7. The explorer that did work:testnet.zecblock.com.
The Wallet: Zallet
Zallet is the full-node wallet that replaces zcashd's built-in wallet. It runs alongside the node and talks to it over RPC. It is in beta; we used a development build because the stable one did not understand NU7.
zallet generate-encryption-identity
zallet init-wallet-encryption
zallet start
zallet rpc getwalletstatus
# wallet_tip must match node_tip
What happened to us: a seed phrase was accidentally exposed in a tool's history. We discarded that wallet and created another one before putting funds in it. A phrase that was seen where it should not have been is no longer secret, even on a test network. The rules we adopted:
- The seed phrase is never shown on screen, never pasted into a chat, and never seen by the agent.
- RPC cookies (
.cookie), encrypted seeds, and all ofwallets/**go in.gitignore. - The agent operates with public addresses and read-only keys; when it orders a payment, the wallet signs.
Getting Test Coins (and the Plan B)
Testnet Faucets
| Faucet | How to tell if it pays out |
|---|---|
faucet.testnet.valargroup.dev | /api/status → paidCount > 0 |
zcashfaucet.jinolabs.xyz | /api/status → balanceTaz not null |
What happened to us: on October 28 neither was paying. Valar had not paid anyone in five days; jinolabs answered "our wallet is not answering". faucet.zecpages.com no longer existed.
Plan B: Regtest, Where the Faucet Is Mining
Regtest is a private local chain. The cryptography is real (Orchard, zk proofs, encrypted memo); the only simulated part is that you mine the blocks yourself. Zebra on regtest serves RPC on 18443; Zallet pointed at regtest, on 28443.
Mining rewards arrive at the transparent receiver and can only be spent after 100 confirmations, which is why you mine 101 blocks. Then you have to shield them, because rewards can only go to a shielded pool:
zallet rpc z_shieldcoinbase '"<account uuid>"' '"<unified address>"' null 5
# mine 1 more block to confirm
Result in our run: the workshop account went from 93.75 to 725.0055 TAZ transparent; shieldingValue: 31.2555.
First Private Transaction with a Memo
MEMO=$(printf 'Workshop test payment: 1 coffee' | xxd -p | tr -d '\n')
zallet rpc z_sendmany '"<source address>"' \
"[{\"address\":\"<alice's address>\",\"amount\":1.25,\"memo\":\"$MEMO\"}]"
It returns an opid. Then z_getoperationresult '["opid-…"]' gives you the txid, and you mine a block.
Two views of the same transaction:
- What anyone sees (
getrawtransaction '["<txid>", 1]'): 0 transparent inputs and 0 transparent outputs, 2 Orchard actions, and from each one only anullifier, acmx, and 580 encrypted bytes. No sender, no recipient, no amount, no memo. - What the recipient sees (
z_viewtransaction '"<txid>"'): an Orchard output of 1.25 TAZ,memoStrwith the message, 0.0001 TAZ fee.
Selective Disclosure: The Accountant
The key types z_exportviewingkey produces:
| Key | What it lets you see |
|---|---|
| Spending key | Everything, and it can spend (never leaves the wallet) |
Full viewing key (uview…) | What comes in and what goes out |
Incoming viewing key (uivk…) | Only what comes in |
Sapling viewing key (zxview…sapling…) | Everything Sapling for that account |
Current Zallet limitation: z_importviewingkey only imports Sapling keys. That is why the accountant demo uses the account's Sapling receiver (z_listunifiedreceivers).
A second Zallet, with no seed phrase, with the key imported:
zallet rpc z_importviewingkey '"zxviewregtestsapling1…"' '"yes"' 300
zallet rpc z_listtransactions '"<imported uuid>"'
Result: the accountant sees the 0.5 TAZ of an invoice and its memo. If they try to spend: Insufficient balance (have 0, …). They can see, but cannot move anything.
One aside: sending from Orchard to Sapling crosses pools and reveals the amount that crossed; Zallet rejects this by default (FullPrivacy) and you have to resend with privacyPolicy = "AllowRevealedAmounts". That is not a bug — it is the wallet protecting you.
Operating It with an AI Agent
An agent can run all of the above (we used Claude Code) if you give it context and limits. What we gave it:
- An
AGENTS.mdat the repo root with: a folder map, ports per network, the signature of every script, accounts and uuids, hard rules (never mainnet, never commitwallets/, never restart processes without permission, never re-run the regtest bootstrap), and the known-errors table. - Questions in natural language, not commands: "Is the node online and up to date?", "Prove to me my node is on the right chain", "Something looks off, check the node's health", "Create an order in the store and pay for it from alice's account".
The limits we set:
| On its own, no asking | With explicit permission | Never |
|---|---|---|
| Query the node, read logs, compare against external sources | Restart the node or wallet, install or upgrade, move money (even test money) | See the seed phrase, touch mainnet, decide what to share |
The agent is not "safe" by itself: it does what it is allowed to do. The rules live in a file it reads before acting.
No Disk, No Server? The Simulator
zebrad-sim reproduces Zebra's startup, logs, and RPC on the same port (18232) and with the same config, using real testnet data (activation heights, genesis, block 1, pool values) but without downloading or verifying anything. It syncs "from 0 to the tip" in ~4 minutes and lets you watch NU7 activate in slow motion. It is good for teaching; it is no good for verifying. Always say so to the audience when you use it.
Common Mistakes
| Symptom | Cause | Fix |
|---|---|---|
| It started on mainnet | Missing network = "Testnet" | Fix the toml and restart |
command not found: zebrad | Compile unfinished, or ~/.cargo/bin not on PATH | Wait for Installed package; check echo $PATH |
Address already in use on 18232 | Another zebrad or zebrad-sim running | Stop the other process; lsof -nP -iTCP:18232 |
blocks is not advancing | Too few peers, or a slow connection | Check Outbound Connections and the log; wait |
| RPC not responding | The node has not opened the RPC yet | Wait a few seconds after startup |
ssh: Operation timed out | Server shows offline in Tailscale | Power it on / sudo tailscale up; tailscale ping before retrying |
Insufficient balance (have 0, …) on regtest | A previous payment was not mined, or minconf is too high | Mine 1 block and retry |
| Imported key shows an empty balance | The wallet scanned those blocks before the import | Restart just that Zallet |
Block height out of range on import | The wallet has not reached the rescan height yet | Wait for wallet_tip = node_tip |
| The explorer is stuck at an old height | Its backend does not follow NU7 | Use another explorer, or your own getblock |
Timeline: What Actually Happened
- Early October: guide written against stable Zebra; VPS ordered from Contabo but on hold; Mac M1 laptop with 8 GB and 250 GB.
- NU7 review: stable would not do; migrated to
7.0.0-rc.0. - The laptop had neither the disk nor the time to sync:
zebrad-simwas born as the demo plan. - Ubuntu server ready: Tailscale, compile, systemd. The server rebooted four times that day; the node came back on its own.
- Chain verification: the popular explorer was on another chain;
testnet.zec.rockswas not; NU7 hash confirmed. - Wallet: the stable build did not understand NU7, so a development build. A seed phrase got exposed: wallet discarded and recreated.
- Faucets down: regtest as the plan B for payments, memo, Café Shielded, and the accountant.
- The workshop: nobody typed a command; the agent operated, we explained and verified.
Final Recommendation
For a first deployment: check which network upgrade is active and compile the version that supports it; configure Testnet with RPC bound only to 127.0.0.1; run it in the foreground until verificationprogress reaches 1; move it to systemd; and before you call the sync done, verify the hash of a known block against a source you know is on your chain. The wallet and the payments come later — and if the faucets are not paying, regtest gives you the same thing without depending on anyone.
Closing Thoughts
The agent solved every single problem in this guide. But for each one, a person had to understand what they were looking at and decide what to do. Running a node is still the most direct way to understand a network: you see the peers, the blocks, the upgrades activating, and the limits of your own hardware. Testnet gives you all of that with no risk; regtest gives it to you without even depending on the network. When the flow starts feeling predictable, that is the moment to move to mainnet.