# Run on local PC

\*You can skip this part and go to [Run on cloud service](/docs/setup/run-on-cloud-service.md) if you don't need to test on your local PC.

### Prerequisites of this guide

* Node.js v22.14.x\~
* yarn v1.22.17\~

### Steps

1. Install source code.

```
git clone https://github.com/junta/tradingview-alert-connector.git
```

```
cd tradingview-alert-connector
```

&#x20;  2\. Get your Keys

a. For Perpetual Protocol or GMX, [Export your account's private key](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key#:~:text=On%20the%20account%20page%2C%20click,click%20%E2%80%9CConfirm%E2%80%9D%20to%20proceed.)

(creating a new and dedicated account is strongly recommended)

b. For dYdX v4, [Export your secret phrase ](https://tv-connector.gitbook.io/docs/setup/dydx-v4-setup#export-your-secret-phrase-a-set-of-24-words-from-dxdx-website-then-put-it-in-.env-file)

&#x20;  3\. Rename ".env.sample" file to ".env"

&#x20;  4\. Open .env in an editor and fill each variable

#### Environment Variables

<table><thead><tr><th width="255.98808258934082">Key</th><th width="278.7299875770638">Value</th><th>Required</th></tr></thead><tbody><tr><td>PERPETUAL_PRIVATE_KEY</td><td>Your Private Key of Ethereum Address</td><td>Yes for Perpetual Protocol</td></tr><tr><td>GMX_PRIVATE_KEY</td><td>Your Private Key of Ethereum Address</td><td>Yes for GMX</td></tr><tr><td>GMX_LEVERAGE</td><td>Number. Put 2 for 2x Leverage</td><td>Yes for GMX</td></tr><tr><td>DYDX_V4_MNEMONIC</td><td>Your mnemonic(seed) phrase</td><td>Yes for dYdX v4 </td></tr><tr><td>BLUEFIN_MNEMONIC</td><td>Your mnemonic(seed) phrase of SUI chain compatible wallet</td><td>Yes for Bluefin</td></tr><tr><td>HYPERLIQUID_PRIVATE_KEY</td><td>Your Private Key of Ethereum Address</td><td>Yes for hyperliquid</td></tr><tr><td>TRADINGVIEW_PASSPHRASE</td><td>Unique password to enhance your security. Optional but recommended to be set.</td><td>No</td></tr><tr><td>SENTRY_DNS</td><td>your sentry.io URL.<br>If you want to add monitoring by Sentry.io, please follow <a href="/pages/4PQC40gcfcHnEDaDvHEl">this guide</a>.</td><td>No</td></tr></tbody></table>

5\.  Install ngrok, sign up, and add authtoken with the following guide

We use ngrok to get public URL and tunnel to your localhost to receive webhook from Tradingview

{% embed url="<https://ngrok.com/download>" %}

6\. Run the connector web server

#### Option1: Run on docker container(recommended)

Install docker desktop(if not installed yet)

{% embed url="<https://www.docker.com/products/docker-desktop/>" %}

Build and start docker container

```
// run for mainnet
docker-compose up -d
```

&#x20;Open a **new terminal window** and start ngrok

```
yarn ngrok:docker
```

#### Option2: Run without docker

Open Terminal, then

* Install dependencies.

```
npm install --force
```

* Start the web server

```
yarn start
```

* Open a **new terminal window** and start ngrok

```
yarn ngrok
```

7. check your console running ngrok. outputs should be as follows.

![](/files/1SMTIeMPJm7OzG8xfaVg)

8\. Open your browser and access <http://localhost:3000/accounts>

If you see a status message of your set up on your browser, the server is running properly.

<figure><img src="/files/2zMgM3e38MyNZAVZHXGG" alt=""><figcaption></figcaption></figure>

9\. Go to [Test Tradingview strategy alert](/docs/setup/test-tradingview-strategy-alert.md) page and check if you can receive alert from Tradingview


---

# 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://tv-connector.gitbook.io/docs/setup/run-on-local-pc.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.
