⚠️ This project is no longer necessary since NextCloud OpenSourced their high performance signaling server ❤️
- https://nextcloud.com/blog/open-sourcing-talk-back-end-rc-of-talk-9-brings-lots-of-improvements/#hpb
- https://github.com/strukturag/nextcloud-spreed-signaling
A simple signaling server for NextCloud Talk to connect and do signaling for WebRTC.
This repository aims to provide a default connection point for NextCloud Talk. It was created from the simple signalmaster for SimpleWebRTC.js, whose open-source version has now been deprecated.
It also supports vending STUN/TURN servers with the shared secret mechanism as described in this draft. This mechanism is implemented e.g. by rfc-5766-turn-server or by a patched version of restund.
Read more:
This project is (currently) using WebSocket-Node.
Running the server requires a valid installation of node.js which can be installed from the nodejs.org website. After installing the package you will need to install the node dependencies.
-
npm install
-
run the server using
node server.js
-
In the console you will see a message which tells you where the server is running:
"NextCloud Talk -- HTTP server is running at: http://localhost:8888" "NextCloud Talk -- signal master is running at: ws://localhost:8888"
You can run unit tests with node:
-
npm install
-
run the test using
node test.js
You can also use a simple web page.
Simply open the test.html
file in your browser to messages exchange with the Web Socket.
- generate your ssl certs
$ ./scripts/generate-ssl-certs.sh
- run in Production mode
$ NODE_ENV=production STUN_SERVER_DOMAIN=your.turn.servers.here STUN_SERVER_PORT=5449 TURN_SERVER_DOMAIN=your.turn.servers.here TURN_SERVER_PORT=5449 TURN_SERVER_SECRET=turnserversharedsecret ALLOWED_ORIGIN=.* NEXTCLOUD_SHARED_SECRET=nextcloudserversharedsecret node server.js
var express = require('express')
var sockets = require('signalmaster/sockets')
var app = express()
var server = app.listen(port)
sockets(server, config) // config is the same that server.js uses
You can build then run this image by calling:
docker build -t talk-signalmaster https://github.com/Monogramm/talk-signalmaster
docker run --name signalmaster -d -p 8888:8888 talk-signalmaster
To run the image from Dockerhub execute this:
docker run --name signalmaster -d -p 8888:8888 monogramm/docker-talk-signalmaster
This will start a signal master server on port 8888 exposed on port 8888.
By default, the docker image will run as production.
Environment variables:
HOST=localhost
PORT=8888
ROOM_MAX_CLIENTS=0
STUN_SERVER_DOMAIN=stun.l.google.com
STUN_SERVER_PORT=19302
TURN_SERVER_DOMAIN=
TURN_SERVER_PORT=
TURN_SERVER_SECRET=
SSL_KEY=./sslcerts/key.pem
SSL_CERT=./sslcerts/cert.pem
SSL_PASSWORD=
ALLOWED_ORIGIN=cloud.domain.com