# Secure websocket connection failure despite an apparently valid certificate

**URL:** <https://community.neo4j.com/t/secure-websocket-connection-failure-despite-an-apparently-valid-certificate/12767>\
**Category:** Newbie Questions\
**Tags:** websocket, authentication, neovis\
**Created:** [December 12, 2019, 5:06am UTC](https://community.neo4j.com/t/secure-websocket-connection-failure-despite-an-apparently-valid-certificate/12767 "2019-12-12T05:06:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.strayhorn4](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/david.strayhorn4/32/4441_2.png) [@david.strayhorn4](https://community.neo4j.com/u/david.strayhorn4)\
**Post date:** [December 12, 2019, 5:06am UTC](https://community.neo4j.com/t/secure-websocket-connection-failure-despite-an-apparently-valid-certificate/12767/1 "2019-12-12T05:06:10Z")

</div>

Hello everyone,

I am attempting to get neovis.js running on my hosted website, which runs linux redhat, and am encountering problems with the websocket connection used by bolt. If I use http I have no problem and am able to visualize my test graph successfully. When I use https I get the following error:

`Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption.`

I am able to eliminate this error by adding this to my NeoVis config variable:  
`encrypted: "ENCRYPTION_ON", trust: "TRUST_ALL_CERTIFICATES",`

but then I get:

`WebSocket connection to 'wss://54.174.190.115:34764/' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID`

(As you can perhaps tell from the websocket url I am connecting to one of my neo4j sandbox databases. If I connect to my locally hosted neo4j database, I get basically the same behavior as when I connect to the sandbox db.)

However, my certificate, which was issued by Let's Encrypt, appears valid (as you can see here: [OnTheBlockchain.com](http://OnTheBlockchain.com)), according to 4 different browsers (edge on windows and chrome, firefox and safari on mac). Am I missing something about how certificates work? Is it possible that the certificate doesn't work for the bolt port (34764 for the sandbox, 7687 on my localhost) and I need to change to a new port (which I have tried without success)? Or do I need to buy a new certificate that is good for secure websocket connections?

David
