# Deployment

## Install go-kardia

### From source

You'll need `go` [installed](https://golang.org/doc/install) and the required environment variables set, which can be done with the following commands:

```
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
```

### Get Source Code

```
git clone https://github.com/kardiachain/go-kardia.git $GOPATH
```

### Installation Prerequisites

* Install [libzmq](https://github.com/zeromq/libzmq)

### Compile & Install

```
cd $GOPATH/src/github.com/kardiachain/go-kardia/cmd
go install
```

The latest **cmd** is now installed.

### Run Kardia Network

#### Mainnet (coming soon)

```
./cmd --network mainnet --node <path/to/kai_config.yaml>
```

#### Testnet

* Config [file](https://raw.githubusercontent.com/kardiachain/go-kardiamain/master/deployment/testnet/node_testnet.yaml?token=ACGGGNBLR42JFWA4XOU2PH273MFHK), see [deplopyment/configuration ](https://docs.kardiachain.io/deployment/configuration)for more details.

```
./cmd --network testnet --node <path/to/kai_config_testnet.yaml>
```

#### Local

* Config [file](https://github.com/kardiachain/go-kardiamain/tree/master/deployment/local), see [deplopyment/configuration ](https://docs.kardiachain.io/deployment/configuration)for more details.

```
./cmd --network devnet --node <path/to/kai_config_devnet_node1.yaml>
./cmd --network devnet --node <path/to/kai_config_devnet_node2.yaml>
./cmd --network devnet --node <path/to/kai_config_devnet_node3.yaml>
```

### Or run Kardia Network by docker

#### **Run Local Testnet with docker**

* See [deplopyment/local ](https://docs.kardiachain.io/deployment/local)for more details.

#### Join Public Testnet

* See [deplopyment/testnet](https://docs.kardiachain.io/deployment/public-testnet) for more details.

#### Join Mainnet (coming soon)

* See [deplopyment/mainne](https://docs.kardiachain.io/deployment/mainnet)t for more details.


---

# 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.kardiachain.io/docs/archived-docs/deployment.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.
