Edit this page on GitHub (opens in a new tab)
zcash.nix is a set of Nix packages and NixOS modules for the Zcash node stack, published by Cypherpunk under the MIT licence. Every package is built from a pinned upstream tag or commit, and every service runs as a sandboxed systemd unit. On NixOS, a full node with an indexer next to it is a few lines of configuration instead of a manual build, a user account and a hand-written service file.
zebrad, Zakura, Zaino, Zinder, lightwalletd, lightwalletd-rs, Zallet, Ztreamer and zpay, built from pinned source for x86_64-linux, aarch64-linux and aarch64-darwin.services.zcash.<service>.<name> declares one instance: its own systemd unit <service>-<name>, its own state directory /var/lib/<service>-<name>, and its own user. A Mainnet and a Testnet node can run side by side.openFirewall opens only the peer-to-peer port.Versions pinned on main as of 18 November 2026. The project bumps them as upstream releases land (on 17 November alone: Zebra 7.1.0, Zakura 1.8.9, Zinder 0.16.4), so check packages/ for the current pins.
| Package | What it is | Pinned | Binaries |
|---|---|---|---|
zakura | full node | 1.8.9 | zakurad, zakura-prune-state, zakura-rollback-state |
zebra | The Zcash Foundation's node | 7.1.0 | zebrad |
zaino | Zingo Labs' indexer and light-wallet server () | 0.10.2 | zainod |
There is no zcashd package: zcashd is retired (see ).
With Nix installed (flakes enabled), any package runs straight from the repository:
$ nix run github:cypherpunktech/zcash.nix#zebra -- --version
$ nix run github:cypherpunktech/zcash.nix#zakura -- --version
Add the flake as an input and import its module in your system flake:
inputs.zcash-nix.url = "github:cypherpunktech/zcash.nix";
imports = [ zcash-nix.nixosModules.default ];
nixpkgs.overlays = [ zcash-nix.overlays.default ]; # optional: puts the packages in pkgs
A Zebra Mainnet node, with its RPC on localhost:
services.zcash.zebra.mainnet = {
enable = true;
openFirewall = true; # the P2P port only, never RPC
settings.rpc.listen_addr = "127.0.0.1:8232"; # freeform zebrad.toml
};
This creates the unit zebra-mainnet with its state in /var/lib/zebra-mainnet. settings is written out as the node's own TOML file, so every option from the Zebra book works there. Zakura works the same way under services.zcash.zakura.<name>. For a Testnet node next to it, add a second instance with settings.network.network = "Testnet" and a different RPC port.
sudo systemctl status zebra-mainnet and journalctl -u zebra-mainnet -f show what it is doing.
A node alone doesn't serve light wallets (see ). Zaino can follow the node above:
services.zcash.zaino.mainnet = {
enable = true;
node = "zebra-mainnet"; # the node's unit name
settings = {
grpc_settings.listen_address = "127.0.0.1:8137";
validator_settings.validator_jsonrpc_listen_address = "127.0.0.1:8232";
};
};
With node set, the Zaino unit starts once the node's RPC answers, restarts when the node restarts, and authenticates with the node's RPC cookie, which systemd hands over as a credential. lightwalletd and lightwalletd-rs have their own modules (services.zcash.lightwalletd.<name>, services.zcash.lightwalletd-rs.<name>). They won't build without a TLS certificate and key (tls.certFile, tls.keyFile). The insecureNoTLS switch exists, but its own documentation warns that wallets send their viewing-key query patterns over that connection, so use it only behind a TLS-terminating reverse proxy on the same host, or in a test.
The full list of options is in docs/options.md.
services.zcash.binaryCache.enable adds cypherpunktech.cachix.org as a substituter. Without it, Zebra alone can take half an hour or more to compile. The module adds it through nix.settings because the flake's own nixConfig is silently ignored for users Nix doesn't trust. It is off by default, so importing the module never adds a trust root on its own.zakura.<name>.snapshot.enable restores a published chain-state snapshot instead of syncing from genesis. A node restored this way trusts the snapshot's publisher for the history it contains; a node that syncs from the network checks it. The download sits next to the state before it is unpacked, so the disk needs room for both once.zakura.<name>.watchdog.enable restarts a node that is running but has stopped following the chain. It polls the /ready health endpoint, so settings.health.listen_addr must be set, and it only acts after the node has been ready once, so a node syncing from genesis isn't restarted in a loop. watchdog.stallAfter (default 1800 seconds) sets how long /ready must fail first.Every service shares one hardening block (modules/hardening.nix), with a comment explaining each line. In short: the service can write only to its own state directory, /home and /root are invisible, it starts with no capabilities and can't gain any, kernel tunables, modules and logs are off limits, and it can open only IPv4 and IPv6 sockets. Each module is also booted in a VM test in CI.
The project's SECURITY.md is unusually direct about this, and worth reading before you run a node from it:
cargo-audit and govulncheck runs report advisories in each upstream's own lockfile. The accepted ones, with reasons and review dates, are in scripts/advisories-accepted.txt.main can write to it; pull requests and forks can't. A cached binary hasn't necessarily passed its smoke test. To check one without trusting the cache, rebuild it locally (nix build --rebuild) and compare.nixConfig to enable the cache. For an untrusted Nix user, --accept-flake-config is silently ignored, and the first sign is a very long compile. Use services.zcash.binaryCache.enable (or your own nix.settings) instead.127.0.0.1 and run indexers on the same host with node set. openFirewall deliberately never opens the RPC port.settings.health.listen_addr is set.zinder | The Zcash Foundation's alpha indexer () | 0.16.4 | zinder-ingest, zinder-projector, zinder-query, zinder-compat-lightwalletd |
ztreamer | Light-wallet server with an embedded Zakura node | unstable snapshot (17 November 2026) | ztreamerd |
lightwalletd | The Go light-client server () | 0.6.1 | lightwalletd |
lightwalletd-rs | A Rust light-client server | 0.2.0 | lightwalletd-rs |
zallet | The RPC wallet that replaces zcashd's wallet | 0.1.0-beta.3 | zallet |
zpay | Payments facilitator for x402 and MPP | unstable snapshot (21 July 2026) | zpay-runtime, zspend-runtime |
services.zcash.zallet.acceptBetaRisktrueuser: by default each instance runs as a systemd DynamicUser. Set a fixed user only when another service has to read the instance's files.