# Build process

## Milestone before continue

At this point you should already have installed:

1. Golang
2. Node.js
3. PNPM
4. PM2

{% hint style="success" %}
**If so, continue, if not, return to the previous page** :wink:
{% endhint %}

## Next step - clone the core repository&#x20;

Use it via GitHub

```sh
git clone https://github.com/KlyntarNetwork/KlyntarCore.git

cd KlyntarCore
```

Now depending on your OS run the following commands:

## Install dependencies

```sh
pnpm install
```

## Link core to make it available from any location

```sh
npm link
```

## Build Golang addons

Run a simple script

{% tabs %}
{% tab title="Unix" %}

```bash
chmod 700 build_must_have_addons.sh

./build_must_have_addons.sh
```

{% endtab %}

{% tab title="Windows" %}

```sh
build_must_have_addons.bat
```

{% endtab %}
{% endtabs %}

## Build KLY-EVM

{% tabs %}
{% tab title="Unix" %}

```sh
cd KLY_VirtualMachines/kly_evm

pnpm install

chmod 700 build_kly_evm.sh

./build_kly_evm.sh
```

{% endtab %}

{% tab title="Windows" %}

```sh
cd KLY_VirtualMachines\kly_evm

pnpm install

build_kly_evm.bat
```

{% endtab %}
{% endtabs %}

## Return to main directory

```sh
cd ../../

// Linux/Mac only
chmod 700 klyntar_core.js
```

{% hint style="success" %}
**At this stage, the build process ends and the preparation of files for work begins**
{% endhint %}

## Prepare configuration and genesis files

Depending on the network you want to connect to, you will need an appropriate genesis file, as well as a set of configurations for your node.

To find the files that suit you, follow the instructions in the section [**Networks**](/build-core-and-join-network/networks.md)

1. [Setup testnet node](/build-core-and-join-network/networks/testnet/public-testnets/setup-testnet-node.md)
2. [Setup mainnet node](/build-core-and-join-network/networks/mainnet/setup-mainnet-node.md)


---

# 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.klyntar.org/build-core-and-join-network/run-kly-node/build-process.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.
