The documentation server is a run mode provided by the Nyzo verifier codebase. The following instructions are for an Ubuntu Linux system, but the server will also run on Windows, Mac OS, and other Linux distributions.
Ensure that your server has port 80 open to all IP addresses to which you want to permit access. 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. It is not necessary for the core tasks of the documentation server, but 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.
sudo apt install haveged -y
Install the Java development kit (JDK). JDK 8 is preferred for Nyzo.
sudo apt install openjdk-8-jdk -y
Install supervisor. This is used to manage the server Java process.
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
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.
chmod +x nyzoDocumentationServer.sh && ./nyzoDocumentationServer.sh && sudo cp nyzoDocumentationServer.conf /etc/supervisor/conf.d/
Now, the content for the documentation server must be downloaded. For this example, the content will be placed in the /nyzo directory. Create this directory and move to it.
sudo mkdir /nyzo && cd /nyzo
Clone the documentation repository to the /nyzo directory.
git clone https://github.com/n-y-z-o/tech.git
Set the path of the documentation root directory in the Nyzo preferences file.
sudo bash -c 'echo "documentation_data_root=/nyzo/tech" > /var/lib/nyzo/production/preferences'
Start the documentation server.
sudo supervisorctl reload
You should now be able to view your documentation server in a web browser. If you cannot load pages, check the firewall to ensure port 80 is open. Also, refer to /var/log/nyzo-documentation-server.log.
You can direct your server to a different documentation repository to offer alternative documentation, and you can use a different source repository to modify the behavior of the server.