# Rainbow Protocol Node Setup

<figure><img src="/files/iTEQqUHmi79T0rRqN1vZ" alt="" width="563"><figcaption></figcaption></figure>

Contabo :  <https://bit.ly/contabourl> \
PQ : <https://pq.hosting/?from=627713> \
Hetzner : <https://hetzner.cloud/?ref=ASjlHtRt2swV> \
Digital Ocean : <https://digitalocean.pxf.io/q465nn>

| CPU | RAM | Disk    | Ubuntu | Network                    |
| --- | --- | ------- | ------ | -------------------------- |
| 2+  | 4+  | 70+ SSD | 22.04  | Stable internet connection |

### Install Update / Packages :&#x20;

```
sudo apt update -y && sudo apt upgrade -y
```

```
sudo apt install jq -y
```

```
sudo apt install ca-certificates zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev curl git wget make jq build-essential pkg-config lsb-release libssl-dev libreadline-dev libffi-dev gcc screen unzip lz4 -y
```

### Install Docker  :&#x20;

```
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```

```
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
```

### Verify Docker  Installation :&#x20;

```
sudo systemctl status docker
```

#### CTRL + C

### Download Files :&#x20;

```
mkdir -p /root/project/run_btc_testnet4/data
git clone https://github.com/rainbowprotocol-xyz/btc_testnet4
cd btc_testnet4
```

#### Docker - Compose :&#x20;

```
VER=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f 4)
```

```
curl -L "https://github.com/docker/compose/releases/download/"$VER"/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```

```
chmod +x /usr/local/bin/docker-compose
```

```
docker-compose --version
```

### Docker Permission to User

```
sudo groupadd docker
```

```
sudo usermod -aG docker $USER
```

### Build Container&#x20;

```
docker-compose up -d
```

## Create a new wallet <a href="#id-56db" id="id-56db"></a>

```
docker exec -it bitcoind /bin/bash
```

#### Change walletname :&#x20;

```
bitcoin-cli -testnet4 -rpcuser=demo -rpcpassword=demo -rpcport=5000 createwallet walletname
```

### Your Wallet Adress :&#x20;

```
bitcoin-cli -testnet4 -rpcuser=demo -rpcpassword=demo -rpcport=5000 getnewaddress
```

<figure><img src="/files/i0C5BMJAnRSdEHlxqqzz" alt=""><figcaption></figcaption></figure>

TYPE exit AND CONTINE

### Clone Repo And Binary

```
cd
git clone https://github.com/rainbowprotocol-xyz/rbo_indexer_testnet && cd rbo_indexer_testnet
```

```
wget https://github.com/rainbowprotocol-xyz/rbo_indexer_testnet/releases/download/v0.0.1-alpha/rbo_worker
chmod +x rbo_worker
```

### Configure Compose.yml :&#x20;

```
nano docker-compose.yml
```

Paste This Code [⬇️](https://emojigraph.org/tr/down-arrow/) And CTRL X - CTRL Y - Enter. Saved

Link : <https://github.com/RPCdotcom/NodeFiles/blob/main/rainbow.yml>

### Build Container :&#x20;

```
docker-compose up -d
```

<figure><img src="/files/26c2pKz9DQLpUnb9hwd5" alt=""><figcaption></figcaption></figure>

If yo See Error Message - Delete Container And Build

```
docker ps -a
```

#### Copy bitcoind container id&#x20;

```
docker stop <paste your container id>
docker rm <paste your container id>
```

```
docker-compose up -d
```

## Connect Bitcoin Core and Run indexer <a href="#id-80f0" id="id-80f0"></a>

#### Crate Screen :&#x20;

```
screen -S Rainbow
```

#### Run Indexer :&#x20;

```
./rbo_worker worker --rpc http://127.0.0.1:5000 --password demo --username demo --start_height 42000
```

<figure><img src="/files/hQdIUeQjpdLE7vS2BT6m" alt=""><figcaption></figcaption></figure>

#### LFG ! Competed. CTRL A + CTRL D exit the screen.

#### Run the indexer daily

## **Get your Principal ID** <a href="#id-57d3" id="id-57d3"></a>

```
nano ./identity/principal.json
```

<figure><img src="/files/4e2usMBdsiDkfNOgbTsj" alt=""><figcaption></figcaption></figure>

### Copy your ID and visit : <https://testnet.rainbowprotocol.xyz/explorer>

<figure><img src="/files/SDjU4u7uov5e4XASDDAZ" alt=""><figcaption></figcaption></figure>

## Locate your private key and save :  <a href="#dbe6" id="dbe6"></a>

```
nano ./identity/private_key.pem
```

For exit : CTRL + X

<figure><img src="/files/lP7MDHEl35cHHxFMeIHA" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://services.rpcdot.com/rainbow/rainbow-protocol-node-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
