# Installing Zel Daemon

## Getting Started

{% hint style="info" %}
**Recommended System Specs:**

2 or more CPU threads\
64-bit Linux (Ubuntu 18.04)\
4+ GB RAM\
25+ GB Storage
{% endhint %}

{% hint style="danger" %}
**If setting up a ZelNode, follow this link:** [**https://zel.gitbook.io/zelnodes/**](https://zel.gitbook.io/zelnodes/)

**The instructions below on this page are for setting up a standard p2p node, not a ZelNode to collect network rewards**

**Running a standard p2p node does not yield any Zel**
{% endhint %}

## Building for Linux from source

{% hint style="info" %}
Building source works for many popular Ubuntu, Debian, & Fedora distros. We officially support Ubuntu 18.04 LTS "Bionic Beaver"
{% endhint %}

#### Install Ubuntu/Debian dependencies

```
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget curl bsdmainutils automake
```

#### Install Fedora dependencies (if not using Ubuntu/Debian OS)

```
sudo dnf install git pkgconfig automake autoconf ncurses-devel python python-zmq wget gtest-devel gcc gcc-c++ libtool curl patch
```

#### Build zelcashd

```
git clone https://github.com/zelcash/zelcash.git
cd zelcash
git checkout master
./zcutil/build.sh -j$(nproc)
```

#### Create config file

```
mkdir ~/.zelcash
echo "rpcuser=username" >> ~/.zelcash/zelcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >> ~/.zelcash/zelcash.conf
echo "rpcallowip=127.0.0.1" >> ~/.zelcash/zelcash.conf
echo "addnode=explorer.zel.cash" >> ~/.zelcash/zelcash.conf
echo "addnode=explorer.zel.zelcore.io" >> ~/.zelcash/zelcash.conf
```

#### Fetch params

```
cd zelcash
./zcutil/fetch-params.sh
```

#### Run zelcashd

```
./src/zelcashd
```

## Building for MacOS from source

#### Install dependencies

```
#install xcode
xcode-select --install

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake autoconf libtool automake coreutils pkgconfig gmp wget

brew install gcc5 --without-multilib
```

#### Build

```
git clone https://github.com/zelcash/zelcash.git
cd zelcash
git checkout master
./zcutil/build.sh -j$(sysctl -n hw.ncpu)
```

#### Fetch params

```
./zcutil/fetch-params.sh
```

#### Create config file

```
mkdir ~/Library/Application Support/zelcash/
echo "rpcuser=username" >> ~/Library/Application Support/zelcash/zelcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >> ~/Library/Application Support/zelcash/zelcash.conf
echo "rpcallowip=127.0.0.1" >> ~/Library/Application Support/zelcash/zelcash.conf
echo "addnode=explorer.zel.cash" >> ~/Library/Application Support/zelcash/zelcash.conf
echo "addnode=explorer.zel.zelcore.io" >> ~/Library/Application Support/zelcash/zelcash.conf
```

#### Run zelcashd

```
./src/zelcashd
```

## Building for Windows from source

#### Install dependencies

```
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev cmake unzip git python zlib1g-dev wget bsdmainutils automake mingw-w64 curl
```

#### Build zelcashd

```
git clone https://github.com/zelcash/zelcash.git
cd zelcash
git checkout master
./zcutil/build-win.sh -j$(nproc)
```

#### Create config file

Create folder %AppData%/Roaming/ZelCash

Create txt file zelcash.conf in above folder. Copy/paste the below into zelcash.conf and save, close. **Change rpc username and password**

```
rpcuser=randomusername
rpcpassword=RandomPasswordChangeme
rpcallowip=127.0.0.1
addnode=explorer.zel.cash
addnode=explorer.zel.zelcore.io
```

#### Fetch params

Create folder %AppData%/Roaming/ZcashParams

Download the below links into this folder

```
https://zelcore.io/zelcore/sapling-output.params 
https://zelcore.io/zelcore/sapling-spend.params 
https://zelcore.io/zelcore/sprout-groth16.params 
https://zelcore.io/zelcore/sprout-proving.key 
https://zelcore.io/zelcore/sprout-verifying.key
```

#### Run zelcashd

```
zelcashd.exe
```

## Install using APT repo

{% hint style="info" %}
The APT repo works with many popular Ubuntu & Debian distros
{% endhint %}

```
echo 'deb https://zelcash.github.io/aptrepo/ all main' | sudo tee --append /etc/apt/sources.list.d/zelcash.list
gpg --keyserver keyserver.ubuntu.com --recv 4B69CA27A986265D
gpg --export 4B69CA27A986265D | sudo apt-key add -

sudo apt-get update
sudo apt-get install zelcash
```

This installs zelcashd, zelcash-cli, zelcash-tx and zelcash-fetch-params

```
cd zelcash
chmod +x zelcash-fetch-params
./zelcash-fetch-params
```

## Building for ARM from source (cross-compile)

{% hint style="info" %}
Cross-compile works on Debian 9 and Ubuntu 18.04, possibly other versions and distros. This build is not officially supported.
{% endhint %}

#### Install dependencies

```
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget curl bsdmainutils automake
sudo apt-get install gcc-aarch64-linux-gnu
sudo apt install g++-aarch64-linux-gnu
```

#### Build zelcashd

```
git clone https://github.com/zelcash/zelcash.git
cd zelcash
git checkout master
HOST=aarch64-linux-gnu ./zcutil/build.sh
```

This will build zelcashd, zelcash-cli, and zelcash-tx

Move the above files to your ARM device under \~/zelcash/src/

#### Fetch params

```
mkdir ~/zelcash/zcutil && cd ~/zelcash/zcutil
wget https://raw.githubusercontent.com/zelcash/zelcash/master/zcutil/fetch-params.sh
chmod +x fetch-params.sh
./fetch-params.sh
```

#### Run zelcashd

```
~/zelcash/src/zelcashd
```
