# Junod Installation and setup

### Choose an Operating System

The operating system you use for your node is entirely your personal preference. You will be able to compile the `junod` daemon on most modern linux distributions and recent versions of macOS.

{% hint style="info" %}
For the tutorial, it is assumed that you are using an Ubuntu LTS release.

If you have chosen a different operating system, you will need to modify your commands to suit your operating system.
{% endhint %}

### Install pre-requisites

```bash
# update the local package list and install any available upgrades
sudo apt-get update && sudo apt upgrade -y

# install toolchain and ensure accurate time synchronization
sudo apt-get install make build-essential gcc git jq chrony -y
```

### Install Go

Follow the instructions [here](https://golang.org/doc/install) to install Go.

For an Ubuntu, you can probably use:

```bash
wget https://golang.org/dl/go1.19.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz
```

Please install Go v1.19.2 or later.

Unless you want to configure in a non standard way, then set these in the `.profile` in the user's home (i.e. `~/`) folder.

```bash
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
```

After updating your `~/.profile` you will need to source it:

```bash
source ~/.profile
```

### Build Juno from source

```bash
# from $HOME dir
git clone https://github.com/CosmosContracts/juno
cd juno
git fetch
git checkout <version-tag>
```

The `<version-tag>` will need to be set to either a [testnet `chain-id`](https://docs.junonetwork.io/joining-the-testnets#current-testnets) or the latest [mainnet version tag](https://docs.junonetwork.io/validators/joining-mainnet).

{% hint style="warning" %}
For genesis (Phoenix 2), the mainnet genesis version tag will be `v9.0.0` - i.e:

```bash
git checkout v9.0.0
```

{% endhint %}

{% hint style="warning" %}
If you plan to use a snapshot or state sync to sync your node, you will need the latest binary. Check [#mainnet-upgrades](https://docs.junonetwork.io/joining-mainnet/mainnet-upgrades#mainnet-upgrades "mention") for the latest upgraded binary version.
{% endhint %}

Once you're on the correct tag, you can build:

```bash
# from juno dir
make install
```

To confirm that the installation has succeeded, you can run:

```bash
junod version

# v9.0.0
```

## Configure \`junod\` to connect to public RPC

Follow these instructions to configure your `junod` binary to connect to public RPC for submitting transactions and making queries to the Juno network if you will not be syncing a node.

Set the `chain-id`

```bash
junod config chain-id juno-1
```

Set the public RPC `node`

```bash
junod config node https://rpc-juno.itastakers.com:443
```

You will now be able to make transactions and queries with `junod`. For more information on junod commands see [modules](https://docs.junonetwork.io/cli/modules "mention") or execute `junod --help`


---

# 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.junonetwork.io/validators/getting-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.
