Install Spreed.ME on Nextcloud
This installation guide is tested with Nextcloud 13 on Ubuntu 16.04 and Spreed.ME 0.3.11.
Be sure that you have installed WebRTC and Coturn.
Configure Apache
# Spreed WebRTC config (must be in same vhost as NC) # https section of Apache vhost config <Location /webrtc> ProxyPass http://127.0.0.1:8080/webrtc ProxyPassReverse /webrtc </Location> <Location /webrtc/ws> ProxyPass ws://127.0.0.1:8080/webrtc/ws </Location> ProxyVia On ProxyPreserveHost On RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
a2enmod proxy proxy_http proxy_wstunnel headers
service apache2 restart
systemctl restart spreed-webrtc
Install the app
of the Nextcloud app store apps.nextcloud.com/apps/spreedme
Configure Spreed.ME
Navigate to Admin settings | Spreed.ME
Note that 2 config files were not found.
Missing config files
config/config.php was not found
extra/static/config/OwnCloudConfig.js was not found
They are not missing, it’s just the extension .in
added to the file name. So go to the root directory of the app
cd /var/www/nextcloud/apps/spreedme ls -al config ls -al extra/static/config
Create OwnCloudConfig.js
Copy OwnCloudConfig.js.in
to OwnCloudConfig.js
and don’t forget to adjust the ownership of user/group
cd extra/static/config/ cp OwnCloudConfig.js.in OwnCloudConfig.js chown www-data:www-data OwnCloudConfig.js
Reload admin settings page
and click on
Generate Spreed WebRTC config
Note that config/config.php
is still not found at this time.
server.conf
is on Ubuntu 16.04 webrtc.conf
.
vi /etc/spreed/webrtc.conf
Delete everything here and paste the generated WebRTC config.
Adjust the root path
to webrtc-server in the http section (remove the semicolon at the beginning of the line)
[http] listen = 127.0.0.1:8080 basePath = /webrtc/ root = /usr/share/spreed-webrtc-server/www
Add turn server and turn secret
to the [app]
section of webrtc.conf
grep static-auth-secret /etc/turnserver.conf
583bAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF
turnURIs = turn:turn.domain.xx:3478?transport=udp turn:turn.domain.xx:3478?transport=tcp
turnSecret = 583bAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF
The complete webrtc.conf
file should look like that
; Minimal Spreed WebRTC configuration for Nextcloud
[http]
listen = 127.0.0.1:8080 basePath = /webrtc/ root = /usr/share/spreed-webrtc-server/www
[app]
sessionSecret = 4c3eAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF encryptionSecret = b057AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF authorizeRoomJoin = true serverToken = 8562AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF serverRealm = local extra = /var/www/nextcloud/apps/spreedme/extra plugin = extra/static/owncloud.js turnURIs = turn:turn.domain.xx:3478?transport=udp turn:turn.domain.xx:3478?transport=tcp turnSecret = 583bAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF
[users]
enabled = true mode = sharedsecret sharedsecret_secret = 0f9aAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF
Restart Spreed WebRTC
service spreed-webrtc restart
Create config/config.php
Go to the root directory of the Spreed.ME app
cd /var/www/nextcloud/apps/spreedme
and copy config/config.php.in
to config/config.php
. Also adjust user/group ownership.
cd config/ cp config.php.in config.php chown www-data:www-data config.php
Adjust shared secret
The shared secret has to be the same sharedsecret_secret
you already set in the [users]
section of the webrtc.conf
file from Spreed WebRTC server.
vi config.php
const SPREED_WEBRTC_SHAREDSECRET = '0f9aAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF';
The complete config.php
should look like that
<?php /** * Nextcloud - spreedme * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Leon <[email protected]> * @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 = '0f9aAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFF'; // Set to true if at least one another Nextcloud instance uses the same Spreed WebRTC server const SPREED_WEBRTC_IS_SHARED_INSTANCE = false; // If set to false (default), all file transfers (e.g. when sharing a presentation or sending a file to another peer) are directly sent to the appropriate user in a peer-to-peer fashion. // If set to true, all files are first uploaded to Nextcloud, then this file is shared and can be downloaded by other peers. This is required e.g. when using an MCU. const SPREED_WEBRTC_UPLOAD_FILE_TRANSFERS = false; // Whether anonymous users (i.e. users which are not logged in) should be able to upload/share files and presentations // This value is only taken into account when 'SPREED_WEBRTC_UPLOAD_FILE_TRANSFERS' is set to true const SPREED_WEBRTC_ALLOW_ANONYMOUS_FILE_TRANSFERS = 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 = false; private function __construct() { } }
Congratulations!
Spreed.ME is now configured and running.
Debug
Type about:webrtc
in your Firefox browser.