Spreed WebRTC, websocket connection to wss:// failed

Hello, I followed a tutorial to install spreed-webrtc-snap on VPS linux 18.04

This tutorial did not really treat the HTTPS part.

I have a subdomain, with a valid let’s encrypt certificate. Spreed WebRTC running on 8443 port, and coturn server on 8444 port.

Here is the vhost config file

<IfModule mod_ssl.c>
<VirtualHost *:443>

        SSLEngine on
        SSLStrictSNIVHostCheck Off
        SSLProxyEngine On
        SSLProxyCheckPeerCN Off
        SSLProxyCheckPeerName Off
        SSLProxyVerify none

<Location />

    <Location /ws>
       ProxyPass wss://
    ProxyVia On
    ProxyPreserveHost On
    #RequestHeader set X-Forwarded-Proto 'https' env=HTTPS

SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
Include /etc/letsencrypt/options-ssl-apache.conf

After I made some modifications; here is the result:

1) Accessing by web address when I enter, the UI loads (not completely), because of this error that displays in browser console.

 websocket connection to wss:// failed

2) Accessing by ip address When I enter IP as https://ip_address:8443, there is two cases; a) Kaspersky running Kaspersky prompts me if I want to continue to the dangerous website (this is normal cause there is no certificate for ip address), I click yes. Kaspersky generates its own certificate (I guess), then, the UI loads completely and the spreed webrtc works really great, I was able to make video call between 2 computers. b) Kaspersky not running This time, it’s the web browser that asks me if I want to continue to dangerous site, when I click yes, the UI do not load completely and I receive the same error on console when I access by web address

 websocket connection to wss://ip_address:8443/ws failed

The goal is that webrtc runs when accessing it by web address, I do not understand the problem.

Any help? Thanks.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer