How to run a node on Linux
Introduction
This guide explains how to set up a full node for the Hoosat Network (HTND) on a Linux system. Running a node allows you to use features like a private local wallet or solo mining without relying on mining pools and their fees. It also contributes to the network's decentralization by participating in peer-to-peer communication.
Prerequisites:
Before you begin, ensure you have the following installed on your system:
- Go (Golang): Go is a programming language used to build HTND. Download and install the latest stable version of Go from the official website: https://go.dev/doc/install
- Git: Git is a version control system used to manage code repositories. Download and install Git for Linux from the official website: https://git-scm.com/downloads
Instructions:
1. Download HTND Source Code:
- Open a terminal window
- Run the following command to clone the HTND repository from Github:
git clone https://github.com/Hoosat-Oy/HTND.git
This will download the HTND source code into a new folder named "HTND" in your current directory.
2. Build and Install HTND:
- Navigate to the downloaded HTND directory using the cd command in your terminal:
cd HTND
- Run the following command to build and install HTND as a program:
go install . ./cmd/...
This will compile the HTND source code and place the executable files in the ~/.go folder.
3. Running the node:
There are three options for running the HTND node, each with different storage requirements:
- Normal Purging Node (Without Local Wallet):
This option uses minimal disk space but doesn't allow local wallet functionality. To run it, simply execute the following command in your terminal:
HTND --dnsseed mainnet-dnsseed.hoosat.fi --dnsseed mainnet-dnsseed-2.hoosat.fi -a mainnet-node-2.hoosat.fi -a mainnet-node-3.hoosat.fi -a mainnet-node-4.hoosat.fi
- Normal Purging Node (With Local Wallet):
This option allows using a local wallet but requires more storage space than the purging node without a wallet. To run it, use the following command:
HTND --utxoindex --dnsseed mainnet-dnsseed.hoosat.fi --dnsseed mainnet-dnsseed-2.hoosat.fi -a mainnet-node-2.hoosat.fi -a mainnet-node-3.hoosat.fi -a mainnet-node-4.hoosat.fi
- Full Archiving Node (With Local Wallet):
This option downloads and stores the entire blockchain on your system, requiring the most storage space. It also allows local wallet functionality. To run it, use the following command:
HTND --utxoindex --archival --dnsseed mainnet-dnsseed.hoosat.fi --dnsseed mainnet-dnsseed-2.hoosat.fi -a mainnet-node-2.hoosat.fi -a mainnet-node-3.hoosat.fi -a mainnet-node-4.hoosat.fi
4. Verification:
- If the node starts successfully, you'll see messages in the terminal window indicating it's connecting to the network and performing other tasks.
Troubleshooting:
If you encounter any issues during the process, refer to the Hoosat Network documentation or join the 🆘-ticket channel on our Discord server for assistance.Additional Notes:
Running a full archiving node requires significant storage space as it downloads the entire blockchain. Consider your available disk space before choosing this option.- Make sure you keep the HTND node software updated for optimal performance and security.
Updating Node.
You can update node by shutting down the node, then running git pull in the htnd source directory and reinstalling and restarting the node with your settings.
cd location_of_htnd_source
git pull
go install . ./cmd/..
cd location_of_go_binaries
HTND your parameters