# Run an Archive Node

## Requirements

### Linux Instance

OS - Ubuntu 22.04 or a higher version

### Specifications

| Specifications | Recommended                                                       |
| -------------- | ----------------------------------------------------------------- |
| CPU            | 8 Core                                                            |
| RAM            | 32 GB                                                             |
| Disk           | <ul><li>SSD 6 TB 8,000 IOPS</li><li>250 MB/s throughput</li></ul> |
| Network        | > 10 MB/s                                                         |

### Allowed Inbound and Outbound

* Protocol - TCP and UDP
* Port - 30303
* Source IP - 0.0.0.0/0

## Installation

Create a new directory for your validator node

```sh
mkdir -p kub-node && cd kub-node
```

Download the Genesis file and the configuration file using [wget](https://www.gnu.org/software/wget/)

{% tabs %}
{% tab title="KUB Mainnet" %}

<pre class="language-shell"><code class="lang-shell"><strong>wget https://raw.githubusercontent.com/kub-chain/bkc-node/main/mainnet/genesis.json
</strong>wget https://raw.githubusercontent.com/kub-chain/bkc-node/main/mainnet/config.toml
</code></pre>

{% endtab %}

{% tab title="KUB Testnet" %}

```shell
wget https://raw.githubusercontent.com/kub-chain/bkc-node/main/testnet/genesis.json
wget https://raw.githubusercontent.com/kub-chain/bkc-node/main/testnet/config.tom
```

{% endtab %}
{% endtabs %}

Download the [latest release](https://github.com/kub-chain/bkc/releases); the current version is `v2.4.0`

```sh
wget https://github.com/kub-chain/bkc/releases/download/v2.4.0-bkc/geth2.4.0.linux-amd64.tar.gz
```

{% hint style="warning" %}
Verify that the downloaded version is compatible with your device. KUB supports Darwin ARM64, Linux x86-64, and Linux ARM64. Visit the [latest release](https://github.com/kub-chain/bkc/releases) page to view the available versions under the assets section.
{% endhint %}

Extract the downloaded file

```sh
tar -xvf geth2.4.0.linux-amd64.tar.gz -O /use/bin/
```

Initialize the Genesis file

```sh
./geth --datadir ./data init ./genesis.json
```

Run `geth` using the following command

```shell
./geth --datadir ./data \
    --config ./config.toml --gcmode
```

Please allow some time for your system to download and sync the network data.


---

# 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://docs.kubchain.com/run-a-kub-node/run-an-archive-node.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.
