The Nyzo client is a run mode provided by the Nyzo verifier codebase. The following instructions are for an Ubuntu Linux system, but the client will also run on Windows, Mac OS, and other Linux distributions.
If you want to activate web and/or API endpoints, ensure that your server has the proper port open to all IP addresses to which you want to permit access. The default port is 80, but other ports can be used, as is explained later in these instructions.
Begin the installation by updating apt.
sudo apt update
Next, install haveged. This is a program that provides entropy for cryptographically secure random-number generators. The Verifier class loads its private seed in a static block, and lack of sufficient entropy on a system can cause the application to block indefinitely when trying to generate a new private seed for the verifier. The verifier's key is used to sign all Nyzo messages originating from the client.
sudo apt install haveged -y
Install the Java development kit (JDK). JDK 8 is preferred for Nyzo.
sudo apt install openjdk-8-jdk -y
If you want to run the client as a background process, install supervisor. If you only want to run the client on demand, this step can be skipped.
sudo apt install supervisor -y
Clone the Nyzo verifier repository.
git clone https://github.com/n-y-z-o/nyzoVerifier.git
Change to the new nyzoVerifier directory and build the code.
cd nyzoVerifier && ./gradlew build
Make the Nyzo data root directory.
sudo mkdir -p /var/lib/nyzo/production
Copy the trusted entry points file to the data root directory.
sudo cp trusted_entry_points /var/lib/nyzo/production
If you want to run the client as a long-running background process, create the supervisor configuration file. The first command makes the script executable. The second command runs the script to generate the file. The third command copies the file to the supervisor configuration directory. If you only want to run the client on demand, this step can be skipped.
chmod +x nyzoClient.sh && ./nyzoClient.sh && sudo cp nyzoClient.conf /etc/supervisor/conf.d/
If you want to use the web listener and you want to use a port other than 80, add the appropriate line to /var/lib/nyzo/production/preferences. For example, if you wanted to use port 8080 for all run modes, you would add this line:
If you wanted to use port 593 for just the client, you would add the following line:
If you want to run the client as a background process, reload supervisor.
sudo supervisorctl reload
If you want to run the client on demand, run the following command from the nyzoVerifier directory:
sudo java -jar build/libs/nyzoVerifier-1.0.jar co.nyzo.verifier.client.Client