Logged in as the non-root user, the next step is to install the required packages.
- Install packages
- Validate hardware
- Configure the zend daemon and run a test challenge (this will establish whether the system is capable of passing challenges)
Description | Command | |
---|---|---|
1 | Set an environment variable to match the Fully-Qualified Domain Name of the node - you will need to type this command and change 'FQDN' (the value between the quotes ' ') to the value used in the domain registration for your node | DO NOT USE CAPITAL LETTERS IN PLACE OF 'FQDN' REPLACE ONLY WITH LOWER CASE! FQDN='FQDN' use only lower case letters like the example Example Output zenops@node01:~$ FQDN='node01.zentest.win' |
2 | Add the FQDN variable to the .bashrc file, for the non-root user, this will ensure it is persistent across sessions | echo "export FQDN=$FQDN" >> $HOME/.bashrc |
3 | Update the package cache | sudo apt-get update |
4 | Install the universe repository and the initial packages (build-essential, software-properites-common, apt-transport-https, lsb-release, dirmngr, pwgen, git, jq ufw, curl, aria2) For Debian 9, go to the following link after entering the commands to the right | sudo apt install software-properties-common -y Skip adding the universe repository on Debian systems, DO NOT SKIP THE OTHER ENTRIES IN THIS STEP sudo add-apt-repository universe -y Be sure to copy the entire command, especially for long command strings sudo apt-get install build-essential software-properties-common apt-transport-https lsb-release dirmngr pwgen git jq ufw curl aria2 -y If using Debian, follow the link in the left column after entering the above command, if not using Debian, continue below |
5 | Add the Horizen repository to the 'sources.list' file | echo 'deb https://HorizenOfficial.github.io/repo/ '$(lsb_release -cs)' main' | sudo tee /etc/apt/sources.list.d/zen.list |
6 | Pull the gpg key used to sign Horizen packages | Pulling the gpg key may take some time, if it times out, run it again until it has been imported gpg --keyserver keyserver.ubuntu.com --recv 219F55740BBF7A1CE368BA45FB7053CE4991B669 Alternate key server if the one above fails to respond gpg --keyserver ha.pool.sks-keyservers.net --recv 219F55740BBF7A1CE368BA45FB7053CE4991B669 |
7 | Export the gpg key and add to apt, this enables package verification | gpg --export 219F55740BBF7A1CE368BA45FB7053CE4991B669 | sudo apt-key add - |
8 | Add the repository for certbot For Debian 9, add the stretch-backports repository in place of the command to the right | DO NOT RUN THIS COMMAND ON DEBIAN NODES! sudo add-apt-repository ppa:certbot/certbot -y |
9 | Update the package cache again with the Horizen and certbot repositories added as sources | sudo apt-get update |
10 | Install the zend daemon and certbot | sudo apt-get install zen certbot -y |
11 | Download the required parameters for zend | zen-fetch-params |
12 | Run zend after installation, read the message, it will then stop NOTE: Do not restart zend as you will see in the last two lines of the warning message, proceed to step 13 below | zend |
13 | Create a configuration file for zend, copy and paste the entire block of text on the right and paste on the command line | cat <<EOF > ~/.zen/zen.conf rpcuser=$(pwgen -s 32 1) rpcpassword=$(pwgen -s 64 1) rpcport=18231 rpcallowip=127.0.0.1 rpcworkqueue=512 server=1 daemon=1 listen=1 txindex=1 logtimestamps=1 ### testnet config #testnet=1 EOF |
Optional Step - Bootstrap Blocks and Chainstate Folders and Files From an Existing Node - DO NOT PERFORM IF THIS IS YOUR FIRST NODE! | ||
14 | These are procedures for individuals with existing nodes with a complete copy of the blockchain to get new nodes synchronized quickly (5 to 10 minutes) | |
CONTINUE BELOW IF THIS IS YOUR FIRST NODE | ||
15 | Run zend with the configuration file in place, it should automatically run in the background as a daemon | zend && sleep 8 |
16 | Check that the blocks are increasing, run this command a couple of times with a few seconds in between and verify that the row shown in the example (blocks) shows an increasing number NOTE: While the zend daemon is starting up, the 'zen-cli getinfo' command will initially return what looks like an error. When the daemon has loaded you will see the output as shown under the command on the right. Therefore do not be alarmed if you see the error shown below prior to the example output. error code: -28 | zen-cli getinfo Example Output zenops@node01:~$ zen-cli getinfo |
17 | Configure a swap file and benchmark a jointsplit operation on your node |