# 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.
