Before you begin, ensure your system meets the following requirements:
- Operating System: Ubuntu 20.04 LTS or similar Linux distribution.
- Dependencies: Install required software packages for compiling the source code.
Run the following commands to install the dependencies:
sudo apt update
sudo apt install -y git build-essential gcc g++ make jq wget curl libssl-dev libgmp-devClone the official Xion GitHub repository to your local machine:
git clone https://github.com/xionprotocol/xion-core.git
cd xion-coreCheck out the specific version of Xion you want to build. Replace <version> with the desired tag or branch name:
git checkout <version>To see available versions, you can use:
git tagXion requires Go (Golang) version 1.19 or later. Install it using the following steps:
- Download the Go tarball:
wget https://go.dev/dl/go1.20.6.linux-amd64.tar.gz
- Extract and set up Go:
sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf go1.20.6.linux-amd64.tar.gz echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc source ~/.bashrc
- Verify the installation:
go version
Run the following command to build the Xion daemon:
make buildThis will compile the source code and generate the binary file.
Once the build process completes, verify the installation by checking the version of the Xion binary:
./build/xiond versionMove the built binary to a system-wide location for easier access:
sudo mv ./build/xiond /usr/local/bin/xiondConfirm that the daemon is installed correctly:
xiond versionInitialize your Xion node by running:
xiond init "<your-node-name>" --chain-id="<chain-id>"Replace <your-node-name> with a unique name for your node and <chain-id> with the appropriate chain ID for your network.
Edit the configuration files located in ~/.xion/config/:
-
Set peers and seeds in
config.toml:nano ~/.xion/config/config.tomlAdd trusted peer addresses under the
persistent_peerssection. -
Customize app settings in
app.toml:nano ~/.xion/config/app.toml
Run the following command to start your node:
xiond startMonitor the logs to ensure the node is running smoothly.