# Installation

**Chain ID:** jackal-1 | **Latest Version:** v2.0.0

> **NOTE:** These instructions assume a Debian-based OS is used (Ubuntu, Debian, etc.). They have been tested against Ubuntu 20.04 in most cases.

## Install dependencies and pre-requesites

### Update system repos and install tools

```bash
sudo apt update
sudo apt install make curl build-essential gcc git jq -y
sudo snap install lz4 -y
```

### Install Go

```bash
sudo rm -rf /usr/local/go
sudo curl -Ls https://golang.org/dl/go1.19.4.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
tee -a $HOME/.profile > /dev/null << EOF
#Add Go to PATH
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
#Add Go variables
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
EOF
source $HOME/.profile
```

## Build Chain Binaries

```bash
# Clone project's repos
cd $HOME
rm -rf canine-chain
git clone https://github.com/JackalLabs/canine-chain.git
cd canine-chain

# Build daemon binaries
git checkout v2.0.0
make install
```

## Install and Configure Cosmovisor

```bash
# Install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@1.4.0

# Create service
sudo tee /etc/systemd/system/cosmovisor.service > /dev/null << EOF
[Unit]
Description=Cosmovisor service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_NAME=canined"
Environment="DAEMON_HOME=$HOME/.canine"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable cosmovisor

# Create cosmovisor directory structure
mkdir -p $HOME/.canine/cosmovisor/genesis/bin
cp $(which canined) $HOME/.canine/cosmovisor/genesis/bin/

# Create application symlinks
ln -s $HOME/.canine/cosmovisor/genesis $HOME/.canine/cosmovisor/current
sudo ln -s $HOME/.canine/cosmovisor/current/bin/canined /usr/local/bin/canined
```

## Initialize the Node

> **NOTE:** Replace `CryptoChemistrySetup` in this code snippet to change your node's moniker

```bash
MONIKER="CryptoChemistrySetup" && canined init $MONIKER --chain-id jackal-1
canined config chain-id jackal-1

# Download Genesis Files
curl -Ls https://cdn.discordapp.com/attachments/1002389406650466405/1034968352591986859/updated_genesis2.json > $HOME/.canine/config/genesis.json
```


---

# 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.cryptochemistry.io/mainnets/jackal/installation.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.
