Welcome! This guide is intended to get you running on the official Zcash network. Zcash currently has some limitations: it only officially supports Linux, requires 64-bit, and in some situations requires heavy memory and CPU consumption to create transactions.
Please let us know if you run into snags. We plan to make it less memory/CPU intensive and support more architectures and operating systems in the future.
If you were playing with our alpha/beta/rc testnets, ensure that your `~/.zcash/zcash.conf` does not contain `testnet=1` or `addnode=testnet.z.cash`. If you're on a Debian-based distribution, you can follow the [Debian instructions](https://github.com/zcash/zcash/wiki/Debian-binary-packages) to install zcash on your system. Otherwise, you can update your local snapshot of our code:
Note: if you don't have `nproc`, then substitute the number of cores on your system. If the build runs out of memory, try again without the `-j` argument, i.e. just `./zcutil/build.sh --disable-rust`.
If you are upgrading from testnet, make sure that your ``~/.zcash`` directory contains only ``zcash.conf`` to start with.
If the build fails, move aside your ``zcash`` directory and try again by following the instructions in the [Compile it yourself](#or-compile-it-yourself) section below.
Zcash supports two different kinds of addresses, a _z-addr_ (which begins with a **z**) is an address that uses zero-knowledge proofs and other cryptography to protect user privacy. There are also _t-addrs_ (which begin with a **t**) that are similar to Bitcoin's addresses.
## Requirements
Currently, you will need:
* Linux (easiest with a Debian-based distribution)
* 64-bit
* 4GB of free memory
The interfaces are a commandline client (`zcash-cli`) and a Remote Procedure Call (RPC) interface, which is documented here:
This will fetch our Sprout proving and verifying keys (the final ones created in the [Parameter Generation Ceremony](https://github.com/zcash/mpc)), and place them into `~/.zcash-params/`. These keys are just under 911MB in size, so it may take some time to download them.
The message printed by ``git checkout`` about a "detached head" is normal and does not indicate a problem.
#### Build
Ensure you have successfully installed all system package dependencies as described above. Then run the build, e.g.:
This should compile our dependencies and build `zcashd`. (Note: if you don't have `nproc`, then substitute the number of cores on your system. If the build runs out of memory, try again without the `-j` argument, i.e. just `./zcutil/build.sh --disable-rust`.
)
Note (25 April 2017): if you experience build issues with recent master (after 1.0.8 and v1.0.8-1), try passing the flag `--disable-proton` to `./zcutil/build.sh`.
The tests take a while to run and may require up to 8GB of RAM. If you would rather get started right away, you can skip to the next section. If you want to run the tests to make sure Zcash is working, run:
```bash
$ ./qa/zcash/full-test-suite.sh
```
You can also run the RPC tests, which take much longer:
```bash
$ ./qa/pull-tester/rpc-tests.sh
```
The tests need a lot of memory to run successfully. An out-of-memory error will usually cause a FAIL or ERROR outcome with "std::bad_alloc" somewhere in the output.
## Configuration
Create the `~/.zcash` directory and place a configuration file at `~/.zcash/zcash.conf` using the following commands:
Note that this will overwrite any `zcash.conf` settings you may have added from testnet. (If you want to run on testnet, you can retain a `zcash.conf` from testnet.) To run on mainnet, make sure that the `testnet=1` and `addnode=betatestnet.z.cash` settings are removed; use `addnode=mainnet.z.cash` instead. We strongly recommend that you use a random password to avoid [potential security issues with access to the RPC interface](https://github.com/zcash/zcash/blob/master/doc/security-warnings.md#rpc-interface).
If you wish to run zcashd on testnet, change the lines in zcash.conf indicating the network and node discovery: `testnet=1` instead of `mainnet=1` and `addnode=testnet.z.cash` instead of `addnode=mainnet.z.cash`.
Setting `genproclimit=-1` mines on the maximum number of threads possible on your CPU. If you want to mine with a lower number of threads, set `genproclimit` equal to the number of threads you would like to mine on.
Note, you probably want to read the [[Mining-Guide]] to learn more mining details.
## Running Zcash:
Now, run zcashd!
```bash
$ ./src/zcashd
```
To run it in the background (without the node metrics screen that is normally displayed) use ``./src/zcashd --daemon``.
You should be able to use the RPC after it finishes loading. Here's a quick way to test:
```bash
$ ./src/zcash-cli getinfo
```
**NOTE**: If you are familiar with bitcoind's RPC interface, you can use many of those calls to send ZEC between `t-addr` addresses. We do not support the 'Accounts' feature (which has also been deprecated in ``bitcoind``) — only the empty string ``""`` can be used as an account name.
**NOTE**: The main network node at mainnet.z.cash is also accessible via Tor hidden service at zcmaintvsivr7pcn.onion.
To see the peers you are connected to:
```bash
$ ./src/zcash-cli getpeerinfo
```
## Using Zcash
First, you want to obtain Zcash. You can purchase them from an exchange, from other users, or sell goods and services for them! Exactly how to obtain Zcash (safely) is not in scope for this document, but you should be careful. Avoid scams!
As Zcash is an extension of bitcoin, zcash-cli supports all commands that are part of the Bitcoin Core API (as of version 0.11.2), https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
For a full list of new commands that are not part of bitcoin API (mostly addressing operations on z-addrs) see https://github.com/zcash/zcash/blob/master/doc/payment-api.md
To list all zcash commands, use `./src/zcash-cli help`.
To get help with a particular command, use `./src/zcash-cli help <command>`.