No webrtc in spreedme app from the internet

Hi,
i use the spreed/webrtc docker image and it works.
But in my nextcloud i have a white side on the spreedme app.
my browser console take thise error:
jquery-migrate.min.js?v=99fcf12…:2 JQMIGRATE: Migrate is installed, version 1.4.0
webrtc:14 GET https://hostname/static/ver=0281/css/font-awesome.min.css
webrtc:15 GET https://hostname/static/ver=0281/css/main.min.css
webrtc:13 GET https://hostname/static/ver=0281/css/bootstrap.min.css
webrtc:24 GET https://hostname/static/ver=0281/js/libs/require/require.js

I have put a config from nextcloudapp to a /srv/extra/server.conf in my docker container.
Where do I have to look?

update:
okay, new state:

the spreedme docker is running, and i can connect in the local network with the nextcloud app.
Then i connect over the internet i have no webrtc in my nextcloudapp and following error:
Webpage error.
The webpage at https://mydns.de:8443/webrtc/?load_config_js=1 might be temporarily down or it may have moved permanently to a new web address.

my browser console says:
GET https://mydns.de:8443/webrtc/?load_config_js=1 net::ERR_INSECURE_RESPONSE

I have open my port 8443 / tcp in my router…
can anybody help?

my spreedme config.php

    // Domain of your Spreed WebRTC server (including protocol and optional port number), examples:
    //const SPREED_WEBRTC_ORIGIN = 'https://mynextcloudserver.com';
    //const SPREED_WEBRTC_ORIGIN = 'https://webrtc.mynextcloudserver.com:8080';
    // If this is empty or only includes a port (e.g. :8080), host will automatically be determined (current host)
    const SPREED_WEBRTC_ORIGIN = ':8443';

    // This has to be the same `basePath`
    // you already set in the [http] section of the `server.conf` file from Spreed WebRTC server
    const SPREED_WEBRTC_BASEPATH = '/webrtc/';

    // This has to be the same `sharedsecret_secret` (64-character HEX string)
    // you already set in the [users] section of the `server.conf` file from Spreed WebRTC server
    const SPREED_WEBRTC_SHAREDSECRET = '1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

    // Set to true if at least one another Nextcloud instance uses the same Spreed WebRTC server
    const SPREED_WEBRTC_IS_SHARED_INSTANCE = false;

    // Set to true if you want to allow access to this app + spreed-webrtc for non-registered users who received a temporary password by an N$
    // You can generate such a temporary password at: /index.php/apps/spreedme/admin/tp (Nextcloud admin user account required)
    const OWNCLOUD_TEMPORARY_PASSWORD_LOGIN_ENABLED = false;

    // If 'OWNCLOUD_TEMPORARY_PASSWORD_LOGIN_ENABLED' is set to true, you also have to provide a signing key here (64-character HEX string)
    // Generate it using `xxd -ps -l 32 -c 32 /dev/random` (better) or `openssl rand -hex 32`
    const OWNCLOUD_TEMPORARY_PASSWORD_SIGNING_KEY = '2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

    private function __construct() {

my server.config

; Minimal Spreed WebRTC configuration for Nextcloud

[http]
listen = 127.0.0.1:8080
basePath = /webrtc/
;root = /usr/share/spreed-webrtc-server/www

[app]
sessionSecret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
encryptionSecret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
authorizeRoomJoin = true
serverToken = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
serverRealm = local
extra = /media/xyz-xyz-xyz-xyz-69f8c9ca8260/nextcloud/apps/spreedme/extra
plugin = extra/static/owncloud.js
stunURIs = stun:stun.spreed.me:443

[users]
enabled = true
mode = sharedsecret
sharedsecret_secret = 1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and my OwnCloudConfig.js

(function(window) {

    var OwnCloudConfig = function() {
            return {
                    // Domain of your Nextcloud server (including protocol and optional port number), examples:
                    //OWNCLOUD_ORIGIN: 'https://mynextcloudserver.com',
                    //OWNCLOUD_ORIGIN: 'https://nextcloud.myserver.com:8443',
                    // If this is empty or only includes a port (e.g. :8443), host will automatically be determined (current host)
                    OWNCLOUD_ORIGIN: '',
            };
    };
    if (typeof define === "function" && define.amd) {
            define(OwnCloudConfig);
    } else {
            window.OwnCloudConfig = OwnCloudConfig();
    }

})(window);

Please try OWNCLOUD_ORIGIN: ':443',

Does your :8443 host serve the same certificate as your :443 vhost?

@leon no, the spreedme Docker create a own. I use for nextclout my own.

I guess the problem is that your browser doesn’t trust this Docker certificate. Please open the URL to Spreed WebRTC in your browser (should be https://mydns.de:8443/webrtc/). If you get a certificate warning, validate that it’s really the certificate coming from the Docker container and accept it.
Then try if the Spreed.ME Nextcloud app works again. If that helped, make sure to create a reverse-proxy for the Docker container so it serves a trusted certificate (e.g. the same your Nextcloud is using).

@leon what should be the contect of the reverse-proxy?
Would add this to the nextcloud conf file work?

<Location /webrtc>
  ProxyPass http://127.0.0.1:8443/webrtc
  ProxyPassReverse /webrtc
</Location>

<Location /webrtc/ws>
  ProxyPass ws://127.0.0.1:8443/webrtc/ws
</Location>

ProxyVia On
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS

@Ark74 yep, that should work (if you Docker container is listening on 127.0.0.1:8443).

@Ark74 & @leon in the nextcloud/config/config.php file?

No, not at all.
You need to run two servers (along with Nextcloud), my guess is that each one can be on a dedicated machine, or all in one.

  • WebRTC has it’s config file: server.conf or webrtc.conf depending on what you are using.
  • TURN/STUN which also has its config file turnserver.conf

Connect WebRTC to Nextcloud then TURN to WebRTC.
That would get you working.

@leon i’ve read that you need two IPs.
Is it because the suggested use of ports 80 and 443 to avoid firewall issues?
Or is there another issue?

Cheers