Problems with Spreed.me and Nextcloud

Hi, I just installed Nextcloud in a Debian with Nginx, MariaDB and PHP-Fpm. When I installed a spreed-webrtc server and I’ve configured everything (https://help.nextcloud.com/t/complete-nc-installation-on-debian-with-spreed-me-and-turn-step-by-step/2436). I get a white page when I try to enter in the spreed.me app.

Apologize for my english!

I hope to hear from somebody soon. Thanks

i had the same issue, but i dont know what the solutons is anymore. did you double check the settings? Did you check the permissions on the /var/www/nextcloud/apps/spreedme directory (www-data:www-data) and file rights 750? Can you see any errors in the nextcloud.log (in /var/oc_data/ of /var/www/nextcloud/data/)

Now we need the Spreed.me nextcloud app

cd /var/www/nextcloud/apps
wget https://github.com/strukturag/nextcloud-spreedme/archive/master.zip
unzip master.zip
mv nextcloud-spreedme-master spreedme
cd spreedme/config
cp config.php.in config.php
vi config.php

Add your sharedSecret from ealier to the config

OWNCLOUD_TEMPORARY_PASSWORD_LOGIN_ENABLED = true
SPREED_WEBRTC_SHAREDSECRET = ‘1e719578d2345d32f7ce467d891111f1ba6aa8bexxxxxxxxxxxxxxxx’

Thats it. Save and close the file. This concludes the configuration of spreed.me app. 

cd ../extra/static/config
cp OwnCloudConfig.js.in OwnCloudConfig.js

Now we can start spreed.me

cd /var/www/spreed-webrtc-master/
./spreed-webrtc-server

The permissions are okey, and I see no error related with spreed.me in the nextcloud log…

:’(

Thanks

Hi @carbans,

can you please post:

  1. Your Spreed WebRTC config (server.conf)
  2. Your Apache / nginx configuration
  3. The Spreed.ME Nextcloud app config/config.php

Thank you :slight_smile:

Here server.conf of WebRTC:

    [http]
         listen = 127.0.0.1:8080
         basePath = /webrtc/

    [https]

    [app]
    sessionSecret = d193ca23cc80c6c715204439477cde968df6bdf8b5520b9e225b844XXXXX
    encryptionSecret = 636d8138e9dcef0fd1b7e4913acb098eac729a53749c48356191fXXXXX
    authorizeRoomJoin = true
    serverToken = 38e9dcef0fd1b7e4913acb098eac729aXXXXXXXXXXXXXXXX
    serverRealm = local
    extra = /var/www/nextcloud/apps/spreedme/extra
    plugin = extra/static/owncloud.js


    [users]
    enabled = true
    mode = sharedsecret
    sharedsecret_secret = 3db39e702cde1566a1b032bab82081e24c8570f75cade62bb1aa33f83XXXXXX

Nginx configuration:
upstream php-handler {
server 127.0.0.1:9000;
}

server {
listen 80;
server_name nextcloud.local 192.168.10.215;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options “SAMEORIGIN”;
add_header X-XSS-Protection “1; mode=block”;
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
root /var/www/nextcloud/;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ^~ /.well-known/acme-challenge {
default_type text/plain;
root /var/www/letsencrypt;
}
location = /.well-known/carddav { return 301
$scheme://$host/remote.php/dav; }
location = /.well-known/caldav { return 301
$scheme://$host/remote.php/dav; }
client_max_body_size 1G;
fastcgi_buffers 64 4K;
gzip on;
gzip_vary on;
gzip_types application/javascript application/x-javascript text/javascript text/xml text/css;
# or set "gzip off;"
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
location / {
rewrite ^ /index.php$uri;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34]).php(?:$|/) {
fastcgi_split_path_info ^(.+.php)(/.)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_read_timeout 300;
fastcgi_send_timeout 300;
fastcgi_connect_timeout 300;
}
location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}
location ~
.(?:css|js)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control “public, max-age=7200”;
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options “SAMEORIGIN”;
add_header X-XSS-Protection “1; mode=block”;
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
access_log off;
}
location ~* .(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
}
location /webrtc {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_buffering             on;
    proxy_ignore_client_abort   off;
    proxy_redirect              off;
    proxy_connect_timeout       90;
    proxy_send_timeout          90;
    proxy_read_timeout          90;
    proxy_buffer_size           4k;
    proxy_buffers               4 32k;
    proxy_busy_buffers_size     64k;
    proxy_temp_file_write_size  64k;
    proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;
}

}

The Spreed.ME Nextcloud app config:
/**

  • Nextcloud - spreedme
  • This file is licensed under the Affero General Public License version 3 or
  • later. See the COPYING file.
  • @author Leon leon@struktur.de
  • @copyright struktur AG 2016
    */

namespace OCA\SpreedME\Config;

class Config {

    // 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 = '';

    // 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 = '3db39e702cde1566a1b032bab82081e24c8570f75cade62bb1aa33f836e48067';

    // 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 Nextcloud admin.
    // 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 = true;

    // 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 = 'f20e1b84781d80570fef6e2969f61ba91ccb56922398a45eXXXXXXXXXXXXXXXX';

    private function __construct() {

    }

}

First off — as you have posted some secret values — please regenerate them! :slight_smile:

Regarding your nginx config:

  1. If seems you only run the Spreed WebRTC / Nextcloud host on port 80 (unencrypted). This will not work and you will have to add SSL/TLS support.
  2. The Spreed WebRTC config block seems to miss some directives. Please use our example config: https://github.com/strukturag/nextcloud-spreedme/blob/develop/doc/example-config-nginx.md#http-context
  3. Reload nginx afterwards

Your server.conf and config.php look fine.

If the fix of your nginx config didn’t help, please take a look at your browser developer console:

  1. Open the Spreed.ME app in ownCloud/Nextcloud
  2. Append ?debug to the URL, i.e. https://domain.com/index.php/apps/spreedme/?debug
  3. Right click on the ownCloud/Nextcloud site
  4. Click “Inspect element” (very bottom)
  5. Check what it says in the console and paste it to https://pastebin.ubuntu.com/
1 Like

I want to thank for your help!
Thank you!

So how did you fix the problem? Using our example nginx configuration?

I forget to add section http in the nginx.conf and I haven’t got set https. I solve it. Thanks for your help! :slight_smile: