# BTC-RPC-EXPLORER

## Node.js&#x20;

{% hint style="info" %}
We will be completely operating from your main device, unless otherwise stated. So grab your laptop, and follow along.
{% endhint %}

Determine which download you need:

```
$ uname -m
```

Now head to: <https://nodejs.org/en/download/>

Right click on the correct download to "Copy link address" you need. For this example I'll use the linux x64 download.

```
$ wget https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz
```

Unpack and install

```
$ tar -xf node-v10.16.3-linux-x64.tar.xz
$ sudo rm -r *.tar.xz
$ cd node-v10.16.3-linux-x64
$ sudo cp -R * /usr/local/
```

Check the version

```
$ node -v
v10.16.3
$ npm -v
6.9.0
```

And that's it for node.js!

## Install the Explorer

First, head over to github and read up on the explorer: <https://github.com/janoside/btc-rpc-explorer>

Ok, now we are going to pull the repo using git (alternatively you can use wget) and install it using npm.&#x20;

```
$ git clone https://github.com/janoside/btc-rpc-explorer.git
$ cd btc-rpc-explorer
$ npm install
```

Now we need to set the .env file. To do this we are going to edit the .env-sample file, then save as .env to activate it.

```
$ sudo nano .env-sample
##Make sure you UNCOMMENT out the following:
BTCEXP_HOST=127.0.0.1
BTCEXP_PORT=3002 (you can change this, you will put this in the web browser)


BTCEXP_BITCOIND_HOST=192.168.X.XX (this should be the IP of you pi you configured in the Electrs guide)
BTCEXP_BITCOIND_PORT=28256 (if default dojo)
BTCEXP_BITCOIND_USER=dojoRPCusername
BTCEXP_BITCOIND_PASS=dojoRPCpasswrod
BTCEXP_BITCOIND_RPC_TIMEOUT


Rest are optional, but I opted for the following:
BTCEXP_DEMO
BTCEXP_PRIVACY_MODE
BTCEXP_BASIC_AUTH_PASSWORD=(whatever you want)

##One you are happy with your settings..
Ctrl+X, y, (delete the .env-sample, type: .env) Enter
```

{% hint style="warning" %}
WARNING: To be clear to save as, before hitting Enter, you should see the file name:    .env   &#x20;

If you still have: .env-sample    It will not work.&#x20;
{% endhint %}

Ok, now we are all set... all thats left is to start.

```
$ npm run
$ npm start
```

Go to 127.0.0.1:3002 (or whatever port you used) and you should now have access to your full explorer!

## Credits

Huge shout out to janoside for making this RPC explorer. And the Dojo Telegram group for all the help.&#x20;

Join the telegram group at: <https://t.me/samourai_dojo>

DM me on Twitter: @BTCxZelko or Telegram @BTCxZelko if you have any questions.

<https://tippin.me/@BTCxZelko>  <---So my wife doesn't kill me :sweat\_smile:&#x20;


---

# 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://bitcoin-on-raspberry-pi-4.gitbook.io/workspace/btc-rpc-explorer.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.
