Updating xahaud
The process for updating xahaud varies depending on the install method used, however, all three methods rely on the releases published at https://build.xahau.tech. When updating a validator, hub, or other ‘critical’ infrastructure, please check the network health prior to restarting a server to install an update. It is possible to automate the update process using a crontab entry and an update script, however, administrators are discouraged from doing so, as automatic updates may result in restarts at times when the network is unstable. Similarly, human presence allows operators to ensure updates are successful, thereby minimizing downtime.
Backup
Section titled “Backup”Users should always keep backups of:
- The primary configuration file:
xahaud.cfg
- Location varies based on install type.
- The trusted validators file:
validators-xahau.txt
- Location is specified in ‘xahaud.cfg’.
- The server’s identity credentials:
wallet.db
- Located in the database directory defined in ‘xahaud.cfg’.
- Validators must keep their validation private key backed up in a secure, offline location.
Updating Docker Containers
Section titled “Updating Docker Containers”Updating xahaud inside a Docker container involves replacing the currently running binary with the new version, downloaded from https://build.xahau.tech. This can be accomplished either by replacing the xahaud binary inside the container or by updating the entire container.
To update the xahaud binary inside a running Docker container:
- Download the script:
wget https://gist.githubusercontent.com/WietseWind/2ed35d85dcd056d82645de2958934f86/raw/34be773fd6af42e82cc3a21baf70bfb1e2a6c583/update.sh
- Edit the script and change the first line to the release version you would like to install.
- Run the script:
bash ./update.sh
- Verify xahaud is running:
docker exec xahaud-[mainnet/testnet] xahaud server_info
To replace the current Docker image with a new version, without overwriting databases or configuration files (which are ignored via the .gitignore file):
- Navigate to the repository:
cd [/path/to/docker-repo]
- Update to the latest version
git pull
- List running Docker containers and note the name of the xahaud container:
docker ps
- Stop the old xahaud instance:
docker stop xahaud-[mainnet/testnet]
- Remove the old instance:
docker rm xahaud-[mainnet/testnet]
- Start the new instance:
./build && ./up
Updating Local Installations
Section titled “Updating Local Installations”To update a locally installed version of xahaud, simply replace the current binary with a new binary:
- Download the new binary from: https://build.xahau.tech
- Mark the new binary executable:
chmod +x [/path/to/download]
- Stop the currently running xahaud instance:
/opt/xahaud/bin/xahaud stop
- Replace the old binary with the new:
mv [/path/to/download] /opt/xahaud/bin/xahaud
- Start xahaud:
systemctl start xahaud
- Verify xahaud is running:
/opt/xahaud/bin/xahaud server_info
A script that automates the above steps is available.
Updating Binary Files
Section titled “Updating Binary Files”Updating the xahaud binary files is essentially the same as the original install instructions:
- Remove the currently running version:
rm [/path/to/xahaud]
- Download the new version: https://build.xahau.tech
- Mark the download as executable:
chmod 500 [/path/to/xahaud]
- Start xahaud:
./[path/to/xahud] --net --conf [/path/to/xahaud.cfg]