# Bundlr Validator Node

By [GLCstaked](https://paragraph.com/@glcstaked) · 2022-07-15

---

Bundlr makes web3 data storage on Arweave accessible on multiple networks and currently accounts for over 90% of data uploaded to Arweave.

[

The First Programmable Datachain for AI & Beyond
------------------------------------------------

Irys is a Layer-1 blockchain combining low-cost storage, verifiable compute, and AI coordination in a single network.

https://irys.xyz

![](https://storage.googleapis.com/papyrus_images/40e0f81be7fb96e3ebbae8ab650779a6ae6865c2e90b426b11faf15705e091af.png)

](https://bundlr.network/)

It’s a Proof-of-Stake network that sits on top of Arweave. Approximately every 30 minutes, 10 validators are randomly chosen to run the network. Nodes (known as bundlers) are used to bundle multiple layer 2 transactions into a single Arweave (layer 1) transaction.

RUN A BUNDLR VALIDATOR - TESTNET (JUL 2022)
===========================================

![](https://storage.googleapis.com/papyrus_images/875f63280765629a381ebd42be28b3788717df01923c8f9b64ce24bbaf45ddb3.png)

[Bundlr Testnet](https://medium.com/bundlr-network/bundlr-launches-its-first-testnet-4bedd76e7c) is now live. You must use a domain or **static IP**, dynamic IPs will cause your validator to become undiscoverable. This guide is assuming a fresh install of Ubuntu 20.04 LTS.

Hardware Specs:

*   Memory: 8 GB RAM
    
*   CPU: Quad-Core
    
*   Disk: 250 GB SSD Storage
    
*   Bandwidth: 1 Gbps for Download/100 Mbps for Upload
    

1\. Install Pre-requisite Software
----------------------------------

Update and install the following packages which are required to continue

    sudo apt update && sudo apt upgrade -y
    

    sudo apt install curl ncdu htop git wget build-essential libssl-dev gcc make libssl-dev pkg-config npm -y
    

### Install Docker

    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh
    

Grant Permissions for docker and confirm it is installed

    sudo usermod -aG docker $USER
    docker --version
    

### Install Docker Compose

docker-compose is a way of saving the docker run command in a file, so that you can just start/stop/modify it easily. Going to be using this for this guide.

    sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 
    sudo chmod +x /usr/local/bin/docker-compose 
    sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
    

Check version and installation success with

    docker-compose --version
    

### Install Rust

Install Rust, the following installs cargo a package manager for Rust and rustc the compiler for Rust.

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

![run what your terminal tells you when it completes](https://storage.googleapis.com/papyrus_images/b95fcb3c514b5d51b9ecc17bb86fea626ad95ded25f7609c86ef069077bca3fb.png)

run what your terminal tells you when it completes

restart your terminal/ current shell and confirm its installed successfully by running the following commands

![](https://storage.googleapis.com/papyrus_images/4a3be740ad7ab9590622c3d01790255e1fc6a9eed21763ae42a17f22dd724ca4.png)

### Install NVM (node version manager)

NVM or Node version manager, is an open source manager for node.js and makes it easy to switch between versions of node and NPM, both of which are required for Bundlr.

**Install NVM on Ubuntu**

    curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 
    source ~/.bashrc   
    

**Use NVM to install Node**

Install a specific version of node and use that version

    nvm install 16.18.0
    nvm use 16.18.0
    

![](https://storage.googleapis.com/papyrus_images/78fc22c1acc69adda6f782a77a836daa83e6788286fdcbee9d92c1d8158f8e91.png)

2\. Download Repository and Set-up
----------------------------------

### Clone the validator repository

    git clone --recurse-submodules https://github.com/Bundlr-Network/validator-rust.git
    

### Create Arweave Wallet

You can generate a new one [here](https://arweave.app/), ensure you save the Seed and json file, Now create a file to save your Arweave wallet in the project root at `./wallet.json`.

    sudo nano ./wallet.json
    

open your .json file you created from the arweave wallet using notepad, copy the entire contents to the terminal, save/write out with ‘ctrl+O’ then exit with ‘ctrl+X’

confirm its there, you should see your wallet.json after using this command to list files

    ls -la
    

**Copy Wallet to /validator-rust/ directory also**

    sudo cp ./wallet.json /home/$USER/validator-rust
    

make sure its the correct location (might be different from /home/ubuntu/, you can use ‘ls -la’ to find and also confirm its there once done.

### Environment Variables

change directory

    cd validator-rust
    

you should have a example.env file in your /validator-rust/ copy the example.env file

    sudo cp example.env .env
    

open the file to edit

    sudo nano .env
    

Replace the contents of the Example file in the terminal with the following

    PORT=80
    VALIDATOR_KEY=./wallet.json
    GW_WALLET=./wallet.json
    BUNDLER_URL="https://testnet1.bundlr.network/"
    GW_CONTRACT="RkinCLBlY4L5GZFv8gCFcrygTyd5Xm91CzKlR6qxhKA"
    GW_ARWEAVE="https://arweave.testnet1.bundlr.network/"
    

This is from the [docs](https://docs.bundlr.network/docs/participate/Types%20of%20Nodes/Validator/validator-join#environment-variables), Database\_URL can be ignored, the 1st validator Contract for this Testnet is the following:RkinCLBlY4L5GZFv8gCFcrygTyd5Xm91CzKlR6qxhKAbe sure to check the pinned messages on Discord, for any updates on this

![](https://storage.googleapis.com/papyrus_images/3ae625aa4b8c75b85deca7029ace638f8212bb3223d0678f62517f4ce83e2d48.png)

3\. Build and Run the Validator
-------------------------------

change to the correct directory

    cd validator-rust
    

once in the Directory run to start docker file, -d to detach and run in the background

    sudo docker compose up -d
    

this should start 3 docker containers, if successful we can confirm by running, which shows all running containers

    docker ps -a
    

![Check the Logs of all three, to confirm no errors](https://storage.googleapis.com/papyrus_images/1e86026fcb156c02d939d1e7c8ab9f96229bc5f8ea090e97a75faf1367e747a7.png)

Check the Logs of all three, to confirm no errors

    docker logs -f <container-name>
    

if you need to go back to make any changes such as checking your .env file or wallet.json file is correct (usually to culprit of errors) you need to stop and remove all three running containers

    docker stop <container-name> && docker rm <container-name>
    

Now we should have the validator running in the background, we can move on the registering and staking the validator

4\. Register Validator and Stake
--------------------------------

### Install Testnet CLI

    sudo npm i -g @bundlr-network/testnet-cli@latest
    

### Claim Tokens from the Faucet

You can claim Testnet tokens [here](https://bundlr.network/faucet), you will need a valid twitter account and the Arweave wallet address created earlier.

**check balance**

    npx @bundlr-network/testnet-cli@latest balance <YOUR-WALLET-ADDRESS>
    

![should see something like this, press y to confirm, it may take a while to output your token balance](https://storage.googleapis.com/papyrus_images/4545a681edd35ada7b8199bab20595fe3434cdfc3145608fe27eefa35b935107.png)

should see something like this, press y to confirm, it may take a while to output your token balance

### Register Validator and Stake

to join the Testnet run the following

    npx @bundlr-network/testnet-cli@latest join <validator-contract> -w <path-to-wallet> -u <validator-url> -s <stake-tokens>
    

1st validator Contract (in pinned messages on discord): `RkinCLBlY4L5GZFv8gCFcrygTyd5Xm91CzKlR6qxhKA`

Path to wallet: `./wallet.json`

Validator URL: `http://<your-static-IP-address-here>:80`

Stake Tokens (amount claimed from Faucet): 25000000000000. `-s <stake-tokens>` this can be omitted and the CLI will default to the minimum required stake in atomic units

When successful it should say ‘done’ and this can take up to 20-30mins.

4\. Other Commands
------------------

**Check Validator balance**

    npx @bundlr-network/testnet-cli@latest balance <address>
    

**Check validator is active**

    npx @bundlr-network/testnet-cli@latest check <validator contract address> <your address>
    

![press y to proceed and it should return the result like so](https://storage.googleapis.com/papyrus_images/ed55e58992dd5bdeb8b7b585156ce410954cfdd91ca0cf06fc3661f3a9867ddd.png)

press y to proceed and it should return the result like so

5\. Additional Info
-------------------

### Troubleshooting

**PWD not set error**

If you get the following error on starting the node

![](https://storage.googleapis.com/papyrus_images/832e789ae4d43fccde1f31714aefebcca30c30b5a474225bdfa794cd5710331f.png)

This is a path error, that some have encountered, it will result in some files not being found

![](https://storage.googleapis.com/papyrus_images/bb9c437f7e263c07292f658733086a6ca3be2dcf528e3b37246955562c921244.png)

Can be fixed by editing the `docker-compose.yml`

    cd validator-rust
    nano docker-compose.yml
    

Everywhere you see `source: ${PWD}/`, replace with your path, in my case `/home/glc/validator-rust/`. Like so

![](https://storage.googleapis.com/papyrus_images/806e16b2393b2d630dd0a68845fcda302fe6b99c0db666ece6d11ad608955c61.png)

### Upgrade validator (latest release)

to upgrade to latest software version run the following from the `validator-rust` directory

update the repository

Build

Run again, check logs using the command from part .3

    sudo docker compose up -d
    

### Validator Migration

should you wish to transfer your validator to another server use the following steps

**Backup Files**

the only thing you need to back up is the `wallet.json` for your Arweave wallet

**Set up new device**

follow steps 1-2 on new device, At STEP 3: shut down the Validator on old Device

**Un-stake validator**

    npx @bundlr-network/testnet-cli@latest leave <validator contract> -w path/to/wallet.json
    

This can take a while to complete, to confirm you should see the balance return to your wallet

    npx @bundlr-network/testnet-cli@latest balance <address>
    

**Re-register validator with new IP**

Follow Steps 3-4 to complete.

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/bundlr-validator-node)*
