# Connecting QNEKT to regtest

Due to browser security settings, Qnekt needs to connect to Janus over https

With the Janus docker image there is [a script](https://github.com/qtumproject/janus/blob/master/docker/configure_https.sh) that will auto generate self signed ssl keys

```bash
docker run --network=qtum -it --rm \
  --name janus_regtest \
  -v `pwd`/https:/https \
  -p 23889:23889 \
  --entrypoint /go/src/github.com/qtumproject/janus/docker/configure_https.sh \
  qtum/janus:latest
```

This will drop two files in `./https/` and we need to configure Janus to read them.

```bash
docker run --network=qtum -it --rm \
  --name janus_regtest \
  -v `pwd`:/root \
  -p 23889:23889 \
  qtum/janus:latest \
  --bind 0.0.0.0 --dev --qtum-rpc=http://qtum:testpasswd@qtumd_regtest:3889 \
  --https-key /root/https/key.pem --https-cert /root/https/cert.pem
```

Now, you need to allow self-signed cerficiates for localhost in your browser.

For Chrome, you can do this by setting a flag `chrome://flags/#allow-insecure-localhost`

![](https://docs.qtum.site/en/Connecting-Qnekt-to-regtest/chrome-self-signed-certificates.PNG)

You can switch networks from the top right drop down menu

![](https://docs.qtum.site/en/Connecting-Qnekt-to-regtest/qnekt-switch-network-regtest.PNG)

After selecting regtest, you shold be good to go, you can monitor Janus logs for RPC requests

![](https://docs.qtum.site/en/Connecting-Qnekt-to-regtest/qnekt-network-regtest.PNG)

See [Seeding regtest with Qtum](https://docs.qtum.site/en/part2/truffle.md#seeding-regtest-with-qtum) on how to mine blocks to your regtest account.


---

# 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://docs.qtum.info/qtum-documentation/qnekt/connecting-qnekt-to-regtest.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.
