# Unable to connect to server

**URL:** <https://openvidu.discourse.group/t/unable-to-connect-to-server/3801>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [March 16, 2022, 11:57am UTC](https://openvidu.discourse.group/t/unable-to-connect-to-server/3801 "2022-03-16T11:57:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mochr](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/mochr/32/1856_2.png) [@mochr](https://openvidu.discourse.group/u/mochr)\
**Post date:** [March 16, 2022, 11:57am UTC](https://openvidu.discourse.group/t/unable-to-connect-to-server/3801/1 "2022-03-16T11:57:39Z")

</div>

I’m trying to develop an ASP.NET application that should use OpenVidu to stream video from IP-cameras. The application should be hosted on premise with the IP cameras in the same LAN. When I try to connect to the REST API of the Docker development container (`openvidu/openvidu-server-kms:latest`) I get the error “The SSL connection could not be established. The remote certificate is invalid because of errors in the certificate chain.”. I guess this is because the develoment container uses a self signed certificate. Is it possible to change this certificate to a different certificate that is approved by the .NET runtime?  
If this is not possible, I guess we should go for the on premise deployment also during development. I have tried to follow the on premise instructions, installing OpenVidu on WSL2 on a Windows machine. The containers start, but then I’m not able to connect to the server. I added a password and `DOMAIN_OR_PUBLIC_IP=127.0.0.1` to the .env file. I then started openvidu as root. On the Windows host I use Chrome to navigate to [https://127.0.0.1/](https://127.0.0.1/) but then I only get ERR\_CONNECTION\_REFUSED. I also tried http :// 127.0.0.1:5443 and 5442 that should be available behind the proxy, but got the same error.

How can I access the OpenVidu server during development, and how can I deploy the solution in a LAN without registering a domain?

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [March 18, 2022, 1:28pm UTC](https://openvidu.discourse.group/t/unable-to-connect-to-server/3801/2 "2022-03-18T13:28:49Z")

</div>

You can do two different things:

1. Simply configure your development environment to ignore certificate errors when consuming openvidu-server-kms REST API.
2. Override this environment variables to whatever you want when launching openvidu-server-kms container:

```auto
server.ssl.key-store=classpath:path-to-your-certificate.p12
server.ssl.key-store-password= ********

```

---

<div class="post-metadata">

**Author:** ![mochr](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/mochr/32/1856_2.png) [@mochr](https://openvidu.discourse.group/u/mochr)\
**Post date:** [March 18, 2022, 2:08pm UTC](https://openvidu.discourse.group/t/unable-to-connect-to-server/3801/3 "2022-03-18T14:08:31Z")

</div>

Thanks for your quick reply! I’ll try the development solution with a different certificate then.  
Do you have any answer for the deployment trouble? Why is the connection refused when connecting to either Nginx at port 443 or OpenVidu at port 5443?
