Spreed.ME Nextcloud integration tutorial video
In this video, we walk you through the tutorial below from beginning to end.
Getting started in 3 steps
We will describe how to get Spreed.ME integrated in your server using the Spreed WebRTC source, binaries or a Docker image and the Nextcloud Spreed.ME app.
To install, the following dependencies are required:
- A host that can run a Docker container OR a development environment to built Spreed WebRTC (which is based on the Go programming language)
- An Apache server with some enabled modules
- A valid SSL certificate for your Nextcloud
1. Install Spreed WebRTC
You can either install the Spreed WebRTC Docker container, install packages for your distribution or built the binary yourself.
There is a Docker image. It requires that you first create the server.conf, taking the template as can be found on the Docker hub page and modify it following the directions in the third section below. You then have to put it in a place where the Docker image can reach it, in the example below we picked
/srv/extra/server.conf for that.
docker run --rm --name my-spreed-webrtc -p 127.0.0.1:8080:8080 -p 127.0.0.1:8443:8443 -v /srv/extra:/srv/extra -v path-to-your-nextcloud/apps/spreedme/extra:path-to-your-nextcloud/apps/spreedme/extra -i -t spreed/webrtc -c /srv/extra/server.conf
Once it is running, the server will listen on "localhost:8080". You have to change the following in the server.conf of the spreed.me server: section:
listen = 0.0.0.0:8080.
If you are running it in a virtual machine, you may not have enough entropy in /dev/random and the server stick at the keygeneration. To get around this, execute
rngd -f -r /dev/urandom in another terminal session.
To run the container in the background, start the container with:
run -t -d --name my-spreed-webrtc -p 127.0.0.1:8080:8080 -p 127.0.0.1:8443:8443 -v /srv/extra:/srv/extra -v path-to-your-nextcloud/apps/spreedme/extra:path-to-your-nextcloud/apps/spreedme/extra -i -t spreed/webrtc -c /srv/extra/server.conf
Now we just need to configure Apache to serve Spreed WebRTC from there.
There are packages for Ubuntu, see instructions here
Building Spreed WebRTC is relatively simple as it is written in Go. Follow these steps, adjusting for your system:
zypper install go
Install Go so you can built a Go app like Spreed WebRTC
Go to the root of where your webserver is installed
Grab the Spreed WebRTC code
Extract the code
Enter the folder you just extracted the files into
Generate configure and Makefile
Detect all dependencies and get ready to built
Build Spreed WebRTC
You should now have Spreed WebRTC installed.
2. Install the Spreed.ME Nextcloud app
We will now install the Spreed.ME app. This can be done either from the Nextcloud App Store (if it is available there for your version of Nextcloud) or, as we will show here, directly from GitHub.
Go to the Nextcloud app folder on your server
Download the zip file with the app
Extract the app
mv nextcloud-spreedme-master spreedme
Rename the folder to spreedme
The app is now installed.
3. Configure the server and apps
In this last step we have to do, we configure Apache to make Spreed WebRTC accessible and configure both Spreed WebRTC and the Spreed.ME Nextcloud app to talk to each other. Let us start with Apache.
While you could run Spreed WebRTC on a dedicated domain (see the Spreed.ME README), it complicates things so we will put it in its own subpath named
Note: The instructions below are for openSUSE, you have to modify them for other Linux variants. Debian, for example, puts web server files in
Go to where Apache loads your virtual hosts from
Edit your Nextcloud vhost configuration. We will put the subpath there. Use your editor of choice, like nano instead of vi. In vi you can edit files only after you hit
i and to save and quit the editor, hit the ESC button and type
:wq followed by enter.
- Locate the closing tags for your virtual host:
And insert this above it:
# Spreed WebRTC config (must be in same vhost)
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
Now restart the Apache webserver
Nginx users should check out the Nginx config file here.
We now have to configure the Spreed.ME app.Click on
At first, go to the Nextcloud App Store, locate the app in the 'not enabled' section and click on
Open the Nextcloud admin settings page (/index.php/settings/admin#goto-spreed.me) in your browser and configure this app:
Generate new shared secret. It will output a random string which you will need in one of the next steps. Copy it to your clipboard or a temporary text file.Click on
Spreed WebRTC config
Now we will adjust the Spreed WebRTC config, this is server.conf or webrtc.conf if you have installed packages. This is a large number of steps, each relatively simple but it is important not to miss anything!
Go to the folder where you installed the Spreed WebRTC server software
cp server.conf.in server.conf
Create the config file from the default file
Edit the config file and make these modifications:
- In the
basePath by removing the
; character in front of the line and set it to the basePath we install Spreed WebRTC in:
/webrtc/. It now should look like:
basePath = /webrtc/
- In the
authorizeRoomJoin and set it to true:
authorizeRoomJoin = true
extra and set it to the full absolute path of the
spreedme/extra directory in your apps folder of your Nextcloud installation:
extra = /srv/www/htdocs/nextcloud/apps/spreedme/extra
plugin and set it to
plugin = extra/static/owncloud.js
sessionSecret to a random 64-character HEX string. Do NOT use the string given below. You can generate your own 64-character HEX string by running
xxd -ps -l 32 -c 32 /dev/random or
openssl rand -hex 32 in a console. It should look like:
sessionSecret = bb04fb058e2d7fd19c5bdaa129e7883195f73a9c49414a7eXXXXXXXXXXXXXXXX
encryptionSecret to a random 64-character HEX string. Do NOT use the string given below. See above on how to generate such a random secret. It should look like:
encryptionSecret = bb04fb058e2d7fd19c5bdaa129e7883195f73a9c49414a7eXXXXXXXXXXXXXXXX
- In the
enabled and set it to true:
enabled = true
mode and set it to
mode = sharedsecret
sharedsecret_secret and set it to the random string you have in your clipboard / temporary text file. It should look like:
sharedsecret_secret = bb04fb058e2d7fd19c5bdaa129e7883195f73a9c49414a7eXXXXXXXXXXXXXXXX
- Now save and close the file.
Now, start the server by running ./spreed-webrtc-server in the folder where Spreed WebRTC is located. You can configure a script to run the server automatically when you boot up your system.
At this point, you should be able to go to the Spreed.ME app in your Nextcloud and have a working video- and audio conferencing system. Congratulations!
Troubleshooting and other documentation
Community members are already discussing the Spreed.ME integration. You can find a how-to for installing Spreed.ME under Ubuntu 16.04 an armhf-device (odroid xu4) here!