<p>Here is an example if using Polar.</p>
<p><code>cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.polar/networks/1/volumes/bitcoind/backend1/ --network=regtest</code></p>

CC BY-SA 4.0
2023-01-28T19:06:35.847Z
2023-01-28T19:06:35.847Z
Conor
<p>Nigiri is another way of doing it <a href="https://nigiri.vulpem.com/" rel="nofollow noreferrer">https://nigiri.vulpem.com/</a> though it comes with other things that you probably want to run yourself</p>

CC BY-SA 4.0
2023-01-28T21:33:24.610Z
2023-01-28T21:33:24.610Z
beefgroin
<p>To setup a local instance running in the <code>regtest</code> network, you basically just have to run <code>bitcoind -regtest</code> as usual, and then  follow the instructions given by the <a href="https://github.com/Blockstream/electrs#installing--indexing" rel="nofollow noreferrer"><code>electrs</code> installation instructions</a>:</p>
<pre><code>$ git clone https://github.com/blockstream/electrs &amp;&amp; cd electrs
$ git checkout new-index
$ cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.bitcoin
</code></pre>
<p>However, you have to give a <code>--network=regtest</code> to the last command and possibly need to adapt you bitcoin dir.</p>
<p>After the chain made some progress, the log outputs of <code>electrs</code> will spit out localhost addresses you can give to BDK, LDK transaction sync, or just an instance of <a href="https://github.com/bitcoindevkit/rust-esplora-client" rel="nofollow noreferrer"><code>rust-esplora-client</code></a>:</p>
<blockquote>
<p>INFO - REST server running on 127.0.0.1:3002</p>
</blockquote>
<p>(Note that an Electrum RPC address is also given in case you prefer to use the Electrum protocol)</p>

CC BY-SA 4.0
2023-01-27T15:51:08.587Z
This is how I startup my `bitcoind` for regtest testing, I also enable filters for any CBF testing:


`mkdir -p /tmp/regtest1/bitcoind;
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon
`

For cookie authentication the file is at `/tmp/regtest1/bitcoind/regtest/.cookie`.
Not Mandatory
CC BY-SA 4.0
2023-01-27T15:44:15.317Z
2023-01-27T15:44:15.317Z
tnull
<p>How can I setup a local instance of <a href="https://github.com/Blockstream/electrs" rel="nofollow noreferrer">https://github.com/Blockstream/electrs</a>, for example to test/experiment with the Esplora backend for syncing BDK or LDK?</p>

<electrum-server><lightning-development-kit><esplora>
How do I setup an Esplora instance for local testing
tnull
# How do I setup an Esplora instance for local testing

(Asked by: username_0 on 2023-01-27)

How can I setup a local instance of <https://github.com/Blockstream/electrs>, for example to test/experiment with the Esplora backend for syncing BDK or LDK?

**Tags:** electrum-server, lightning-development-kit, esplora


---

## 3 answers

### Answer by username_0 on 2023-01-27. Score: 3 | Accepted answer

To setup a local instance running in the regtest network, you basically just have to run bitcoind -regtest as usual, and then  follow the instructions given by the electrs installation instructions:
$ git clone https://github.com/blockstream/electrs && cd electrs
$ git checkout new-index
$ cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.bitcoin

However, you have to give a --network=regtest to the last command and possibly need to adapt you bitcoin dir.
After the chain made some progress, the log outputs of electrs will spit out localhost addresses you can give to BDK, LDK transaction sync, or just an instance of rust-esplora-client:

INFO - REST server running on 127.0.0.1:3002

(Note that an Electrum RPC address is also given in case you prefer to use the Electrum protocol)

> **Comments:**
> **username_3**: This is how I startup my `bitcoind` for regtest testing, I also enable filters for any CBF testing:   `mkdir -p /tmp/regtest1/bitcoind; bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon `  For cookie authentication the file is at `/tmp/regtest1/bitcoind/regtest/.cookie`.  

---

### Answer by username_1 on 2023-01-28. Score: 3

Here is an example if using Polar.

`cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.polar/networks/1/volumes/bitcoind/backend1/ --network=regtest`


---

### Answer by username_2 on 2023-01-28. Score: 0

Nigiri is another way of doing it <https://nigiri.vulpem.com/> though it comes with other things that you probably want to run yourself


---

