Cover photo

🌍Avail: Setting Up Your Light Client - by Cryptonaito

Testnet Airdrop link:- https://t.me/Cryptonaito

https://t.me/Cryptonaito

1- Preparations

To continue, we can update the packages by running the following commands in the terminal. The first part of the command (sudo apt update) updates the package lists for upgrades, and the second part (sudo apt upgrade -y) actually performs the upgrades with the “-y” flag allowing for automatic confirmation of prompts during the upgrade process:

sudo apt update && sudo apt upgrade -y

Now, we’ll get our toolkit ready by installing all the necessary packages. Just run the following command:

sudo apt install make git nano clang pkg-config libssl-dev build-essential

This will set us up with everything we need for our next steps.

Part 2:

Install Rust To begin, we will install Rust using the rustup installer:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 

When asked to select an installation option, we will enter “1” for the default installation and then press the Enter key:

post image

We will use the source command which loads environment variables and configurations for the Rust programming language into the current shell session:

source $HOME/.cargo/env

Let’s now check the Rust version:

rustc --version

The expected output should look like this, with the version being a minimum of 1.76.0:

Part 3:

Download And Build Light Client Binaries Next, we’ll build the Light Client from its source code. To ensure a trouble-free process, please copy and paste the commands one by one into your server, as pasting them all at once might lead to errors:

# Clone the repository:
git clone https://github.com/availproject/avail-light.git

# Change into the cloned directory:
cd avail-light

# Build the project with Cargo, targeting a release build:
cargo build --release

This process will take a few minutes since many packages will be built.

part 4

Create Avail Light Client Service

Now, let’s install the Avail Light Client Service. You can copy and paste the entire code block below in one go:

sudo tee /etc/systemd/system/availightd.service > /dev/null <<EOF

[Unit]
Description=Avail Light Client
After=network.target
StartLimitIntervalSec=0
[Service]
User=root
ExecStart=/root/avail-light/target/release/avail-light --network goldberg
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target
EOF

part 5

Register And Start Avail Light Client Service

Now, we’re ready to register and start the Avail Light Client Service. Follow these steps:

# Refresh the system's service list:
sudo systemctl daemon-reload

# Set the Avail Light Client Service to start automatically:
sudo systemctl enable availightd

# Restart the service to apply any changes:
sudo systemctl restart availightd

part 6

Change Your Avail Wallet

When you first start the Avail Light Client, it will create a new wallet for you. If this is your first time using Avail, you can use this wallet and move ahead. But, if you’ve used Avail before, like setting up a node or joining Clash of Nodes challenges, you should to use your existing wallet. Here’s how to switch to your existing wallet:

sudo systemctl stop availightd

Open the file to edit it

nano /identity.toml

Insert your secret seed phrase inside marks:

avail_secret_seed_phrase = 'your_secret_seed_phrase_here'

Now, press “CTRL + X” to exit the file, then type “Y” to save the changes to the file, and finally, press “Enter” to confirm the file name.

Restart the service to apply the changes:

sudo systemctl daemon-reload
sudo systemctl restart availightd

Check Your Service Logs

To monitor your Service Logs and manage the Avail light client, here are the commands you’ll find useful:

  • To view the current status of your service:

systemctl status availightd.service

To check detailed logs:

journalctl -u availightd -fo cat
post image

Mint nft for support

#Avail #Avail_light_client #avail_light_node #availlightclient #availlightnode #IncentivizedTestnet