User Tools

Site Tools


nextcloud-talk-high-performance-backend

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nextcloud-talk-high-performance-backend [2021/04/20 23:45] adminnextcloud-talk-high-performance-backend [2021/04/23 22:04] (current) – [Using Gitlab Omnibus shipped Redis?] admin
Line 1: Line 1:
 ====== Nextcloud - janus, signaling, coturn ====== ====== Nextcloud - janus, signaling, coturn ======
 +
 +Inspired by
 +  * https://nichteinschalten.de/signalisierungsserver-fuer-nextcloud-aufsetzen-how-to/
 +  * https://markus-blog.de/index.php/2020/07/30/how-to-install-nextcloud-talk-high-performance-backend-with-stun-turnserver-on-ubuntu/
  
  
Line 6: Line 10:
   * Janus Gateway (''apt install janus'')   * Janus Gateway (''apt install janus'')
   * Coturn (''apt install coturn'')   * Coturn (''apt install coturn'')
-  * Signaling (see https://nichteinschalten.de/signalisierungsserver-fuer-nextcloud-aufsetzen-how-to/)+  * Signaling (see https://github.com/strukturag/nextcloud-spreed-signaling/
 +  * NATS Server via Docker (https://hub.docker.com/_/nats)
  
 +===== Using Gitlab Omnibus shipped Redis? =====
 +
 +Try to login ''sudo -u www-data redis-cli -s /var/opt/gitlab/redis/redis.socket''. Not working, huh?
 +Add webserver user ''www-data'' to git and gitlab-redis groups.
 +
 +<code>
 +sudo usermod -aG git www-data
 +</code>
 +
 +Now ''www-data'' can connect to redis. But this will be reset after ''gitlab-ctl reconfigure''
 ===== Settings ===== ===== Settings =====
  
Line 14: Line 29:
   * <SharedSecret> - used in Nextcloud Talk settings "Shared Secret" and  - ''openssl rand -hex 16''   * <SharedSecret> - used in Nextcloud Talk settings "Shared Secret" and  - ''openssl rand -hex 16''
   * <apiKey> - janus.jcfg ''turn_rest_api_key'' and server.conf -> [turn] -> apikey - ''openssl rand -base64 16''   * <apiKey> - janus.jcfg ''turn_rest_api_key'' and server.conf -> [turn] -> apikey - ''openssl rand -base64 16''
-  * <turnSecret> - used in server.conf and turnserver.conf - ''openssl rand -hex 32'' 
   * <ipAddress> - IP Address of your server   * <ipAddress> - IP Address of your server
   * <signalingPort> - Listen port for signaling Server   * <signalingPort> - Listen port for signaling Server
   * <NextcloudDomain> - Domain of your Nextcloud instance   * <NextcloudDomain> - Domain of your Nextcloud instance
-  * <coturnDomain> - Domain running coturn+  * <coturnSecret> - used in server.conf and turnserver.conf - ''openssl rand -hex 32'' 
 +  * <coturnDomain> - Domain running coturn including protocol (https!!) 
 +  * <coturnPort> - Port used for turn/stun server 
 + 
 +===== NATS Server ===== 
 + 
 +Run NATS server using docker 
 + 
 +<code bash> 
 +docker run --restart=always --name=NATSSERVER -d -p 4222:4222 -ti --restart=always nats:latest 
 +</code>
  
 ===== Configs ===== ===== Configs =====
Line 52: Line 76:
 [turn] [turn]
 apikey = <apiKey> apikey = <apiKey>
-secret = <turnSecret+secret = <coturnSecret
-servers = turn:<ipAddress>:5349?transport=udp,turn:<ipAddress>:5349?transport=tcp+servers = turn:<ipAddress>:<coturnPort>?transport=udp,turn:<ipAddress>:<coturnPort>?transport=tcp
 </code> </code>
  
Line 61: Line 85:
 # "plain" TCP & UDP port(s), too - if allowed by configuration. # "plain" TCP & UDP port(s), too - if allowed by configuration.
 # #
-listening-port=5349+listening-port=<coturnPort>
  
 # TURN listener port for TLS (Default: 5349). # TURN listener port for TLS (Default: 5349).
Line 73: Line 97:
 # For secure UDP connections, we support DTLS version 1. # For secure UDP connections, we support DTLS version 1.
 # #
-tls-listening-port=5349+tls-listening-port=<coturnPort>
  
 # Listener IP address of relay server. Multiple listeners can be specified. # Listener IP address of relay server. Multiple listeners can be specified.
Line 118: Line 142:
 # by a separate program, so this is why that other mode is 'dynamic'. # by a separate program, so this is why that other mode is 'dynamic'.
 # #
-static-auth-secret=<turnSecret>+static-auth-secret=<coturnSecret>
  
 # PostgreSQL database connection string in the case that we are using PostgreSQL # PostgreSQL database connection string in the case that we are using PostgreSQL
Line 220: Line 244:
 no-multicast-peers no-multicast-peers
 </code> </code>
 +
 +Change these options in janus
  
 <code bash /etc/janus/janus.jcfg> <code bash /etc/janus/janus.jcfg>
Line 227: Line 253:
   full_trickle = true   full_trickle = true
   turn_server = "<coturnDomain>"   turn_server = "<coturnDomain>"
-  turn_port = 5349+  turn_port = <coturnPort>
   turn_type = "udp"   turn_type = "udp"
   turn_rest_api_key = "<apiKey>"   turn_rest_api_key = "<apiKey>"
Line 248: Line 274:
 </VirtualHost> </VirtualHost>
 </code> </code>
 +
 +===== Nextcloud GUI configuration =====
 +
 +
 +{{::nextcloud-signaling-janus-coturn.png|}}
nextcloud-talk-high-performance-backend.1618955156.txt.gz · Last modified: 2021/04/20 23:45 by admin