This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
nextcloud-talk-high-performance-backend [2021/04/20 20:53] – admin | nextcloud-talk-high-performance-backend [2021/04/23 20:04] (current) – [Using Gitlab Omnibus shipped Redis?] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Nextcloud - janus, signaling, coturn ====== | ====== Nextcloud - janus, signaling, coturn ====== | ||
+ | |||
+ | Inspired by | ||
+ | * https:// | ||
+ | * https:// | ||
Line 6: | Line 10: | ||
* Janus Gateway ('' | * Janus Gateway ('' | ||
* Coturn ('' | * Coturn ('' | ||
- | * Signaling (see https://nichteinschalten.de/signalisierungsserver-fuer-nextcloud-aufsetzen-how-to/) | + | * Signaling (see https://github.com/ |
+ | * NATS Server via Docker (https:// | ||
+ | ===== Using Gitlab Omnibus shipped Redis? ===== | ||
+ | |||
+ | Try to login '' | ||
+ | Add webserver user '' | ||
+ | |||
+ | < | ||
+ | sudo usermod -aG git www-data | ||
+ | </ | ||
+ | |||
+ | Now '' | ||
===== Settings ===== | ===== Settings ===== | ||
- | * < | + | * < |
- | * < | + | * < |
- | * < | + | * < |
- | * < | + | * < |
- | * <turnSecret> | + | * <ipAddress> - IP Address of your server |
- | * <ipAddress> | + | * <signalingPort> |
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | |||
+ | ===== NATS Server ===== | ||
+ | |||
+ | Run NATS server using docker | ||
+ | |||
+ | <code bash> | ||
+ | docker run --restart=always --name=NATSSERVER -d -p 4222:4222 -ti --restart=always nats: | ||
+ | </code> | ||
===== Configs ===== | ===== Configs ===== | ||
- | <code bash / | + | <code bash / |
[http] | [http] | ||
listen = 127.0.0.1:< | listen = 127.0.0.1:< | ||
Line 37: | Line 64: | ||
[backend-1] | [backend-1] | ||
- | url = https:// | + | url = < |
secret = < | secret = < | ||
Line 49: | Line 76: | ||
[turn] | [turn] | ||
apikey = < | apikey = < | ||
- | secret = <turnSecret> | + | secret = <coturnSecret> |
- | servers = turn:< | + | servers = turn:< |
</ | </ | ||
+ | |||
+ | <code bash / | ||
+ | # TURN listener port for UDP and TCP (Default: 3478). | ||
+ | # Note: actually, TLS & DTLS sessions can connect to the | ||
+ | # " | ||
+ | # | ||
+ | listening-port=< | ||
+ | |||
+ | # TURN listener port for TLS (Default: 5349). | ||
+ | # Note: actually, " | ||
+ | # port(s), too - if allowed by configuration. The TURN server | ||
+ | # " | ||
+ | # endpoints (the " | ||
+ | # functionality; | ||
+ | # For secure TCP connections, | ||
+ | # TLS version 1.0, 1.1 and 1.2. | ||
+ | # For secure UDP connections, | ||
+ | # | ||
+ | tls-listening-port=< | ||
+ | |||
+ | # Listener IP address of relay server. Multiple listeners can be specified. | ||
+ | # If no IP(s) specified in the config file or in the command line options, | ||
+ | # then all IPv4 and IPv6 system IPs will be used for listening. | ||
+ | # | ||
+ | listening-ip=< | ||
+ | |||
+ | # Uncomment to use fingerprints in the TURN messages. | ||
+ | # By default the fingerprints are off. | ||
+ | # | ||
+ | fingerprint | ||
+ | |||
+ | # Uncomment to use long-term credential mechanism. | ||
+ | # By default no credentials mechanism is used (any user allowed). | ||
+ | # | ||
+ | lt-cred-mech | ||
+ | |||
+ | # TURN REST API flag. | ||
+ | # Flag that sets a special authorization option that is based upon authentication secret. | ||
+ | # This feature can be used with the long-term authentication mechanism, only. | ||
+ | # This feature purpose is to support "TURN Server REST API", see | ||
+ | # "TURN REST API" link in the project' | ||
+ | # https:// | ||
+ | # | ||
+ | # This option is used with timestamp: | ||
+ | # | ||
+ | # usercombo -> " | ||
+ | # turn user -> usercombo | ||
+ | # turn password -> base64(hmac(secret key, usercombo)) | ||
+ | # | ||
+ | # This allows TURN credentials to be accounted for a specific user id. | ||
+ | # If you don't have a suitable id, the timestamp alone can be used. | ||
+ | # This option is just turning on secret-based authentication. | ||
+ | # The actual value of the secret is defined either by option static-auth-secret, | ||
+ | # or can be found in the turn_secret table in the database (see below). | ||
+ | # | ||
+ | use-auth-secret | ||
+ | |||
+ | # ' | ||
+ | # If not set, then the turn server | ||
+ | # will try to use the ' | ||
+ | # in user database (if present). The database-stored | ||
+ | # by a separate program, so this is why that other mode is ' | ||
+ | # | ||
+ | static-auth-secret=< | ||
+ | |||
+ | # PostgreSQL database connection string in the case that we are using PostgreSQL | ||
+ | # as the user database. | ||
+ | # This database can be used for long-term credential mechanism | ||
+ | # and it can store the secret value for secret-based timed authentication in TURN RESP API. | ||
+ | # See http:// | ||
+ | # versions connection string format, see | ||
+ | # http:// | ||
+ | # for 9.x and newer connection string formats. | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # MySQL database connection string in the case that we are using MySQL | ||
+ | # as the user database. | ||
+ | # This database can be used for long-term credential mechanism | ||
+ | # and it can store the secret value for secret-based timed authentication in TURN RESP API. | ||
+ | # | ||
+ | # Optional connection string parameters for the secure communications (SSL): | ||
+ | # ca, capath, cert, key, cipher | ||
+ | # (see http:// | ||
+ | # command options description). | ||
+ | # | ||
+ | # Use string format as below (space separated parameters, all optional): | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Redis database connection string in the case that we are using Redis | ||
+ | # as the user database. | ||
+ | # This database can be used for long-term credential mechanism | ||
+ | # and it can store the secret value for secret-based timed authentication in TURN RESP API. | ||
+ | # Use string format as below (space separated parameters, all optional): | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Redis status and statistics database connection string, if used (default - empty, no Redis stats DB used). | ||
+ | # This database keeps allocations status information, | ||
+ | # and delivering traffic and allocation event notifications. | ||
+ | # The connection string has the same parameters as redis-userdb connection string. | ||
+ | # Use string format as below (space separated parameters, all optional): | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # The default realm to be used for the users when no explicit | ||
+ | # origin/ | ||
+ | # server is not using any database (just the commands-line settings | ||
+ | # and the userdb file). Must be used with long-term credentials | ||
+ | # mechanism or with TURN REST API. | ||
+ | # | ||
+ | realm=< | ||
+ | |||
+ | # Total allocation quota. | ||
+ | # default value is 0 (no quota). | ||
+ | # This option can also be set through the database, for a particular realm. | ||
+ | # | ||
+ | total-quota=100 | ||
+ | |||
+ | # | ||
+ | # Maximum server capacity. | ||
+ | # Total bytes-per-second bandwidth the TURN server is allowed to allocate | ||
+ | # for the sessions, combined (input and output network streams are treated separately). | ||
+ | # | ||
+ | bps-capacity=0 | ||
+ | |||
+ | # Uncomment if extra security is desired, | ||
+ | # with nonce value having limited lifetime (600 secs). | ||
+ | # By default, the nonce value is unique for a session, | ||
+ | # but it has unlimited lifetime. With this option, | ||
+ | # the nonce lifetime is limited to 600 seconds, after that | ||
+ | # the client will get 438 error and will have to re-authenticate itself. | ||
+ | # | ||
+ | stale-nonce | ||
+ | |||
+ | # Certificate file. | ||
+ | # Use an absolute path or path relative to the | ||
+ | # configuration file. | ||
+ | # | ||
+ | cert=/ | ||
+ | |||
+ | # Private key file. | ||
+ | # Use an absolute path or path relative to the | ||
+ | # configuration file. | ||
+ | # Use PEM file format. | ||
+ | # | ||
+ | pkey=/ | ||
+ | |||
+ | # Allowed OpenSSL cipher list for TLS/DTLS connections. | ||
+ | # Default value is " | ||
+ | # | ||
+ | # | ||
+ | cipher-list=" | ||
+ | |||
+ | # Flag that can be used to disallow peers on the loopback addresses (127.x.x.x and ::1). | ||
+ | # This is an extra security measure. | ||
+ | # | ||
+ | no-loopback-peers | ||
+ | |||
+ | # Flag that can be used to disallow peers on well-known broadcast addresses (224.0.0.0 and above, and FFXX:*). | ||
+ | # This is an extra security measure. | ||
+ | # | ||
+ | no-multicast-peers | ||
+ | </ | ||
+ | |||
+ | Change these options in janus | ||
+ | |||
+ | <code bash / | ||
+ | nat: { | ||
+ | stun_server = "< | ||
+ | stun_port = < | ||
+ | full_trickle = true | ||
+ | turn_server = "< | ||
+ | turn_port = < | ||
+ | turn_type = " | ||
+ | turn_rest_api_key = "< | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Extend < | ||
+ | <code bash apache.vhost> | ||
+ | < | ||
+ | # ... | ||
+ | # Enable proxying Websocket requests to the standalone signaling server. | ||
+ | ProxyPass "/ | ||
+ | |||
+ | RewriteEngine On | ||
+ | # Websocket connections from the clients. | ||
+ | RewriteRule ^/ | ||
+ | # Backend connections from Nextcloud. | ||
+ | RewriteRule ^/ | ||
+ | # ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Nextcloud GUI configuration ===== | ||
+ | |||
+ | |||
+ | {{:: |