Installing xahaud
When running a node, users will have to configure settings based on whether the node will run on the test network or the main network. When transitioning a single node from one network to the other, database files must be wiped, except wallet.db, which contains the server’s identity credentials.
In addition to building from scratch, there are three ways to install xahaud: Docker, locally, and using a portable binary. The below install methods all rely on the xahaud builds published at: https://build.xahau.tech, though the end result is different.
Docker Container
Section titled “Docker Container”To run xahaud in a Docker Container:
- Clone the appropriate (Mainnet or Testnet) Xahau Docker GitHub repository using the URL in the table below:
git clone [repository-url]
- Navigate to the repository directory:
cd [repository-name]
- Run:
./build
- Run:
./up
- Commands and additional information are located in the README.md file in the Docker repository. Configuration files and databases are located in the
store
directory inside the Docker directory.
Local Install
Section titled “Local Install”The Xahau Docker repositories (Mainnet and Testnet) each contains a script to automate the local install process, so that xahaud can be run outside of Docker. These scripts will create systemd files, a ‘xahaud’ user, and default configuration files. The URLs for these scripts are in the table at the bottom of this page. To install locally:
- Download and run the install script:
curl -sL [https://link-to-script] | bash
- Edit the configuration file:
/opt/xahahud/etc/xahaud.cfg
- Verify and, if needed, edit the contents of the trusted validators file:
/opt/xahaud/etc/validators-xahau.txt
- Start and enable xahaud to run automatically:
systemctl enable —now xahaud
- Verify xahaud is running:
/opt/xahaud/bin/xahaud server_info
Binary Files
Section titled “Binary Files”Users seeking to install xahaud in non-traditional environments (e.g., outside Ubuntu) may benefit from the binary release packages, which are built with necessary dependencies. This install process is essentially the same as the “Local Install”, however, xahaud is not configured as a systemd service and config files are not installed in default directories.
- Download the latest release from https://build.xahau.tech
- Download and edit the relevant configuration and trusted validators files (see the table below for links to Mainnet and Testnet configurations). Ensure the paths to the validators-xahau.txt file, the database directory, and the logfile are accessible.
- Change permissions on the downloaded binary, so it is executable:
chmod 500 [/path/to/xahaud]
- Consider restricting access to xahaud.cfg and validators-xahau.txt:
chmod 400 xahaud.cfg validators-xahau.txt
- Run the binary:
./[path/to/xahaud] —net —conf [path to xahaud.cfg]
- Verify xahaud is running:
./[path/to/xahaud] server_info
Resources, Peering, and Configurations
Section titled “Resources, Peering, and Configurations”This peering is relevant for both Docker containers and local installations.