# Installing Telliot

{% hint style="info" %}
If you experience ANY issues during the installation and setup please do not hesitate to reach out via the [Fetch Telegram Support](https://t.me/fetchoracle) group!
{% endhint %}

## Prerequisites:

* Some `tPLS` (if you're testing it on <mark style="color:green;">Testnet</mark>) for paying gas fees. If you need `tPLS,` you can obtain some via the [PulseChain Faucet](https://faucet.v4.testnet.pulsechain.com/).
  * If you are reporting to <mark style="color:green;">Mainnet</mark>, you'll need regular PLS.
* A Linux distribution or macOS on your machine, as they are both Unix-based (Ubuntu 22.04 / 24.04 and MAC M1 Ubuntu VM were tested). **Windows is not currently supported.**
* **To install in a mac we recommend using a virtual machine to make sure everything is aligned with this tutorial. Check** [**here**](https://docs.fetchoracle.com/reporting-data/installing-telliot/mac-virtual-machine-with-utm) **for quick steps on how to set up one.**
* Running Telliot and a DVM is fairly lightweight and does not require significant computing power. A single core machine with 1 GB RAM should be enough to get started. It's also highly recommended to run this software on a Virtual Machine, fresh cloud server instance from AWS, Digital Ocean, or other providers.

## Install Script

Helper to install telliot and get up and running in no time.

{% hint style="info" %}
Script is supposed to run in linux bash, like, Ubuntu.
{% endhint %}

{% code overflow="wrap" %}

```bash
curl -O https://raw.githubusercontent.com/fetchoracle/telliot-install-script/refs/heads/main/install.sh && chmod +x install.sh && ./install.sh && cd && cd telliot-feeds && source venv/bin/activate
```

{% endcode %}

You can check the full script [here](https://github.com/fetchoracle/telliot-install-script)

### Running the install script

{% hint style="warning" %}
If you are [updating/reinstalling](#upgrade) you need to **remove**/rename the `telliot-feeds` and `telliot` folder that is created in /Home, before running this script.
{% endhint %}

Simply copy and run the full line above in your terminal to clone the repositories and install telliot-feeds, telliot-core and, optionally, disputable-values-monitor.

Follow the on screen instructions carefully and give permission for needed dependencies.

'Mainnet' is the default option to choose for a stable version.

{% hint style="info" %}
During installation you may be asked permission to install python and update the system.
{% endhint %}

<mark style="color:green;">That's it! Everything should be installed and ready to go!</mark>

Check here how to [upgrade](#upgrade) and make sure to edit your desired [endpoints](#configure-endpoints) to use.

### Confirming installation was successful&#x20;

After installing, the command you pasted will try to enter `telliot-feeds` folder and activate the venv environment with\
`source venv/bin/activate` automatically.

Confirm you are in it by checking for (venv) in the cli:

<figure><img src="https://2715759442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuaWlV2rnUpdykVKTSfXx%2Fuploads%2FQ5pna4Zl8OHW99pR48bF%2Fimage.png?alt=media&#x26;token=23a9c7b7-3adf-4aef-b367-f633fae11f7c" alt=""><figcaption><p>(venv) displayed at the beginning of the line and inside telliot-feeds folder</p></figcaption></figure>

{% hint style="danger" %}
Everytime you run Telliot or DVM you need to enter this virtual environment. To enter it, go to `telliot-feeds` folder and run `source venv/bin/activate`. To exit it, run `deactivate`.

Through the command line you can use `cd <name of folder>` to enter a folder and `cd ..` to move one folder up (go back).
{% endhint %}

Now, inside the folder, run `telliot --help`. If you see the help instructions for Telliot, its installation was successful.

<figure><img src="https://2715759442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuaWlV2rnUpdykVKTSfXx%2Fuploads%2FeOThHzUyNyM32ufa4LPn%2Fimage.png?alt=media&#x26;token=f72a182c-109b-4be7-b3fd-96807c28a4d3" alt=""><figcaption><p>Successful Telliot install</p></figcaption></figure>

If you installed DVM, to check it, `cd disputable-values-monitor` from the `telliot-feeds` folder.

Inside DVM folder, run `cli --help`. If you see the help page for the DVM, installation was successful.

<figure><img src="https://2715759442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuaWlV2rnUpdykVKTSfXx%2Fuploads%2FdtTnQcqXA80Lps2PKcHd%2Fimage.png?alt=media&#x26;token=4947a73a-3020-4d06-a2c2-55167b80fe54" alt=""><figcaption><p>Successful DVM install</p></figcaption></figure>

## Upgrade

Delete `telliot-feeds` and `telliot` folder inside your `Home` directory and just run the install script again to update Telliot. Your accounts will remain saved in the `chained_accounts` folder, in /home, so no need to add them after installation.

If you are a more advanced user and has made changes locally to Telliot, you can upgrade it with regular `git pull` to fetch the latest changes from the branches you're using and install the packages with `pip install -e .`. Repeat this process in `telliot-feeds`, `telliot-core` and `disputable-values-monitor` folders.

To run both versions, you may change the name of `telliot-feeds` and `telliot` folders in /home, although this it not recommended.

{% hint style="info" %}
Make sure to check your `.env` and `.env.example` file after an upgrade if you have made previous changes to it!

There may be new variables to set up in `.env.example`
{% endhint %}

## Configure Endpoints <a href="#configure-endpoints" id="configure-endpoints"></a>

You can check your endpoints config running `telliot config show.`

The default configuration for the endpoints can be found in `~/telliot/endpoints.yaml`:

{% hint style="success" %}
Tip: DVM will monitor **all** chains in this folder. Comment out or remove the ones you don't want it to be listening for new events.

It's recommended to run a single DVM per instance for monitoring on the same chain you are reporting.

If you plan to use DVM or Telliot to monitor/report to different chains, we advise to run each service on different instances for better compatibility.
{% endhint %}

```yaml
type: EndpointList
endpoints:
- type: RPCEndpoint
  chain_id: 943
  network: Pulsechain Testnet
  provider: Pulsechain
  url: https://rpc.v4.testnet.pulsechain.com
  explorer: https://scan.v4.testnet.pulsechain.com/
- type: RPCEndpoint
  chain_id: 369
  network: Pulsechain Mainnet
  provider: Pulsechain
  url: https://rpc.pulsechain.com
  explorer: https://scan.pulsechain.com/
```

Below is an example with PulseChain testnet commented (removed):

```
type: EndpointList
endpoints:
#- type: RPCEndpoint
#  chain_id: 943
#  network: Pulsechain Testnet
#  provider: Pulsechain
#  url: https://rpc.v4.testnet.pulsechain.com
#  explorer: https://scan.v4.testnet.pulsechain.com/
- type: RPCEndpoint
  chain_id: 369
  network: Pulsechain Mainnet
  provider: Pulsechain
  url: https://rpc.pulsechain.com
  explorer: https://scan.pulsechain.com/
```

You can add your RPC endpoints by editing the `endpoints.yaml` file. Here's an example command using the [nano](https://www.nano-editor.org/) text editor to edit the YAML file directly:

```
nano ~/telliot/endpoints.yaml
```
