> For the complete documentation index, see [llms.txt](https://docs.truebit.io/v1docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truebit.io/v1docs/getting-started/master.md).

# Install Truebit on Ethereum

{% hint style="warning" icon="siren" %}
**Important Update:** [Please see our latest announcement on X](https://x.com/Truebitprotocol/status/2009328032813850839).
{% endhint %}

{% hint style="info" %}
The Getting Started Guide has been updated to provide instructions on testing Truebit v1 using Hardhat and a locally forked Ethereum node. This replaces the previous version of the guide, which referenced the [deprecated Goerli testnet](https://github.com/eth-clients/goerli). The Goerli testnet is expected to sunset in early 2024, and Truebit recommends updating your test environment as soon as possible.
{% endhint %}

## Install Prerequisites

**1. Download & Install** [**Git**](https://git-scm.com/downloads)

**2. Clone the** [**Truebit on Ethereum Git repository**](https://github.com/TruebitProtocol/truebit-eth)**.**

```sh
git clone https://github.com/TruebitProtocol/truebit-eth
```

**3. Download & Install** [**Docker**](https://docs.docker.com/get-docker/)**.**

**4. Build the Truebit on Ethereum Docker container.**

```sh
docker pull truebitprotocol/truebit-eth:latest
```

**5. Install hardhat**

Create a new directory called "v1" and move into it

```bash
npm install hardhat@"2.20.1"
```

```bash
npx hardhat init
```

Copy the following file into the directory

{% file src="/files/ZLNgJYJ0YKaFkoHJvS0J" %}

Open the file and update the field \<YOUR\_INFURA\_API\_KEY> with your API KEY generated at the [Prerequisites](/v1docs/getting-started/master.md#register-on-infura-and-get-the-infura-api-key). Copy the following file into the directory.

Verify the Installed version to validate that the installed version corresponds to the "2.20.1"

```
npx hardhat --version 
```

**6. Register on Infura and get the Infura API Key.**

To fork from Ethereum Mainnet, you need a free Infura account.&#x20;

* Create an Infura account  [Ethereum API | IPFS API & Gateway | ETH Nodes as a Service](https://www.infura.io/)
* Create a New Project and then click on "Create"

<figure><img src="https://1705716299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIJ0ssLBn8FjVyBhsqsw%2Fuploads%2Fd7WYJbwoYkn4m64U26YA%2Fimage.png?alt=media&amp;token=cf3724ea-f9b6-4fcd-85e3-026762261d3e" alt="" width="563"><figcaption></figcaption></figure>

* After the creation, click on your **key**<br>

<figure><img src="https://1705716299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIJ0ssLBn8FjVyBhsqsw%2Fuploads%2FsfkLxtNkQ9yDcnYCKbN4%2Fimage.png?alt=media&amp;token=9605efdf-d69e-487a-9d43-399530df03a2" alt=""><figcaption></figcaption></figure>

* Copy the **API KEY** string

<figure><img src="https://1705716299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIJ0ssLBn8FjVyBhsqsw%2Fuploads%2FzNS0LrYJkChFVmlIo7so%2Fimage.png?alt=media&amp;token=69d6a3a3-d7fb-44ce-a07f-e1d7bad97569" alt=""><figcaption></figcaption></figure>

## Accessing Truebit on Ethereum Smart Contracts with MetaMask (Optional)

**1. Install the** [**MetaMask**](https://metamask.io/) **browser extension.**

**2. Import** **account from Docker shared folder (keystore).**

<div align="center"><figure><img src="https://1705716299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIJ0ssLBn8FjVyBhsqsw%2Fuploads%2FyQyFboA0kF307vVlNuBe%2FMM1.png?alt=media&amp;token=c63ab424-a25a-497f-b5e4-baaa5315234f" alt="" width="278"><figcaption><p>My Accounts -> Import Account</p></figcaption></figure></div>

<figure><img src="https://1705716299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIJ0ssLBn8FjVyBhsqsw%2Fuploads%2F4GN8ABEwr5NaAy373uhS%2FMM2.png?alt=media&amp;token=d006b749-c5ff-469c-9493-f013aadc9abf" alt="" width="278"><figcaption><p>Import Account -> Type Json File</p></figcaption></figure>

<figure><img src="https://1705716299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNIJ0ssLBn8FjVyBhsqsw%2Fuploads%2Foak5MruENMX1czaNIyAJ%2FMM3.png?alt=media&amp;token=e33f6ec5-6850-46a7-b9fa-a26ea4db1659" alt="" width="375"><figcaption><p>Path to get Keystore</p></figcaption></figure>

**3. Add TRU token contract to each address.**

```
Ethereum Mainnet
Contract: 0xf6**************************************
Decimals: 18
```
