⚙️ Installation

🛠️ Hardware Requirements

Additional requirements

⚡ Automatic installation

bash <(curl -s https://raw.githubusercontent.com/UnityNodes/scripts/main/nulink/autoinstall-en.sh)

📝 Manual installation

1️⃣ Installation packeges and dependencies

# Install dependencies for building from source
sudo apt update && sudo apt-get update
sudo apt install ufw -y
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings

# Open ports
sudo ufw allow ssh
sudo ufw allow https
sudo ufw allow http
sudo ufw allow 9151
sudo ufw allow 9151/tcp

# Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
source .bash_profile

2️⃣ Install node

2.1 Install Geth

wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.23-d901d853.tar.gz
tar -xvzf geth-linux-amd64-1.10.23-d901d853.tar.gz
cd geth-linux-amd64-1.10.23-d901d853/

2.2 Create an Ethereum account and keystore. You will be prompted to enter and confirm a password.

Note. Save the address of the key and the path to the secret key file in a text document.

./geth account new --keystore ./keystore

Example:

2.3 Extract the latest NuLink image

docker pull nulink/nulink:latest

2.4 Create a directory on your main machine for later use

cd /root
mkdir nulink

2.5 Next, enter the command below, pre-editing it with your path to the secret key file we got earlier

cp /root/geth-linux-amd64-1.10.23-d901d853/keystore/* /root/nulink

Example: cp /root/geth-linux-amd64-1.10.23-d901d853/keystore/UTC--2023-12-31T17-42-14.316243885Z--f3defb90c2f03e904ba9662a1f16dcd1ca69b00a /root/nulink #Highlighted in red - here you need to replace it with your value

2.6 Make sure this directory has 777 permissions

chmod -R 777 /root/nulink

2.7 Next, we send a certain number of tBNB tokens to your worker address (public address of the key) through the metamask. For example 0.1

2.8 Choose a password of at least 8 characters to lock and unlock the private storage created by NuLink Worker. It is important to remember this password for future access to important information. Use the password you created earlier. And edit the following codes according to your password

export NULINK_KEYSTORE_PASSWORD=<YOUR NULINK STORAGE PASSWORD>
export NULINK_OPERATOR_ETH_PASSWORD=<YOUR WORKER ACCOUNT PASSWORD>

Example: export NULINK_KEYSTORE_PASSWORD=12345678 export NULINK_OPERATOR_ETH_PASSWORD=12345678

2.9 Initializing the node configuration. You will configure the configuration according to your information

docker run -it --rm \
-p 9151:9151 \
-v </path/to/host/machine/directory>:/code \
-v </path/to/host/machine/directory>:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
nulink/nulink nulink ursula init \
--signer <ETH KEYSTORE URI> \
--eth-provider <NULINK PROVIDER URI>  \
--network <NULINK NETWORK NAME> \
--payment-provider <PAYMENT PROVIDER URI> \
--payment-network <PAYMENT NETWORK NAME> \
--operator-address <WORKER ADDRESS> \
--max-gas-price <GWEI>

Example: docker run -it --rm -p 9151:9151 -v /root/nulink:/code -v /root/nulink:/home/circleci/.local/share/nulink -e NULINK_KEYSTORE_PASSWORD nulink/nulink nulink ursula init --signer keystore:///code/UTC--2023-12-31T17-42-14.316243885Z--f3defb90c2f03e904bd9662a1f16dcd1ca69b00a --eth-provider https://data-seed-prebsc-2-s2.binance.org:8545 --network horus --payment-provider https://data-seed-prebsc-2-s2.binance.org:8545 --payment-network bsc_testnet --operator-address 0xf3defb90c2f03e904bd9662a1f16dcd1ca69b00a --max-gas-price 10000000000 #You can replace everything highlighted in red with your values

3.0 Save your Public Key and Path to Keystore

3.1 Start the node. The following command will start the node. Make sure you use the same host directory as the configuration

Note 1: You need to get BNB (test) token for Worker account as gas payment

Note 2: If you encounter an error while starting the worker node, first make sure that port 9151 is not occupied by another process. If still not working, check if there is only one json configuration file in </path/to/host/machine/directory>

Note 3. You do not need to change NULINK_KEYSTORE_PASSWORD and NULINK_OPERATOR_ETH_PASSWORD to your passwords, just copy the code, your passwords are stored in variables that will be automatically used in this command.

docker run --restart on-failure -d \
--name ursula \
-p 9151:9151 \
-v /root/nulink:/code \
-v /root/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
-e NULINK_OPERATOR_ETH_PASSWORD \
nulink/nulink nulink ursula run --no-block-until-ready

3.2 Check the node status for the work account

docker logs -f ursula

If the result is stop now RELAX. - it means that everything is working normally.

3.3 After successfully installing the node, go to Staking and bind your address (public address of the key) to the dashboard

Last updated