Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add quick install #14165

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
## User documentation

* [User system requirements](user-requirements.md)
* [User feature documentation](https://docs.nextcloud.com/server/latest/user_manual/en/talk/index.html)
* [User feature documentation](https://docs.nextcloud.com/server/latest/user_manual/en/talk/index.html)

## Administration documentation

* [Server system requirements](system-requirements.md)
* [Quick install](quick-install.md)
* [Configuring a TURN server](TURN.md)
* [Configuring coTURN](coturn.md)
* [Configuring eturnal](eturnal.md)
Expand Down Expand Up @@ -45,4 +46,4 @@
* [Webinar management](webinar.md)
* [Settings management](settings.md)
* [Internal Signaling API](internal-signaling.md)
* [Standalone Signaling API](https://nextcloud-spreed-signaling.readthedocs.io/en/latest/)
* [Standalone Signaling API](https://nextcloud-spreed-signaling.readthedocs.io/en/latest/)
206 changes: 206 additions & 0 deletions docs/quick-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
# Quick install

## Introduction

Installing Nextcloud Talk consists of two main parts:

1. **App:** The Nextcloud Server app available in the [Nextcloud app store](https://apps.nextcloud.com/apps/spreed).
2. **High-performance backend:** The High-performance backend developed by our Partner Struktur AG available in [their GitHub organisation](https://github.com/strukturag/nextcloud-spreed-signaling). The High-performance backend itself consists of multiple modules, the most important ones being a signaling server and a WebRTC media gateway.

!!! note

While the High-performance backend is **_optional_**, please note, that it is already **helpful in calls with three participants** (reducing required upload bandwidth by 50%). Even more so in calls with 4+ participants as described in the [Scalability documentation](scalability.md).

Besides performance aspects, some features (e.g. typing indicators) require a High-performance backend as well.

Additional components:

- Most installations require a STUN and TURN server to ensure people can join calls from limited networks and mobile networks.
- **STUN server:** Resolves public IP addresses of participants. A STUN server is provided by default, but you can replace it with your own and e.g. coTURN brings it by default.
- **TURN server:** Relays the audio and video data through firewalls and port restrictions. For a quick guide on TURN, please find the relevant information in our [TURN documentation](TURN.md).
- **Recording backend:** A Recording backend to allow recording audio and video calls. See the [Recording backend documentation](https://github.com/nextcloud/nextcloud-talk-recording/blob/main/docs/installation.md) for detailed steps.
- **SIP bridge:** Available with a Nextcloud Talk Enterprise subscription, the SIP bridge allows participating in meetings via phone as well as calling phone numbers from within Nextcloud Talk. More details are available in the [Nextcloud Enterprise Portal](https://portal.nextcloud.com/article/Nextcloud-Talk/High-Performance-Backend/Installation/Setup-Instructions#content-sip-bridge)

## Installation types

This guide explains the steps and instructions required to install the High-performance backend using Docker and how to quickly configure the basics to get started.

In general, the following installation methods are available

### Nextcloud All-in-One

* **Requirements:** Docker
* **Link:** [github.com/nextcloud/all-in-one](https://github.com/nextcloud/all-in-one)

Nextcloud All-in-One (AIO) is the official Nextcloud installation method. It provides easy deployment and maintanence with most features of Nextcloud already included.

For Nextcloud Talk this means that Nextcloud AIO already includes a ready to use High-performance backend and TURN server.

### Packages

* **Requirements:**: Nextcloud Talk subscription
* **Link:** [Nextcloud Enterprise Portal](https://portal.nextcloud.com/article/Nextcloud-Talk/High-Performance-Backend/Installation-of-Nextcloud-Talk-High-Performance-Backend)

Packages for installing the High-performance backend for Ubuntu, Debian und Red Hat Enterprise Linux are available with a Nextcloud Talk subscription. Additionally, extensive documentation for very large installation, e.g. clustered setups, is available there.

### "How to" from the Nextcloud snap team / Docker Stack

* **Requirements:** Docker
* **Link:** [github.com/nextcloud-snap/nextcloud-snap/wiki/How-to-configure-talk-HPB-with-Docker](https://github.com/nextcloud-snap/nextcloud-snap/wiki/How-to-configure-talk-HPB-with-Docker)

Thanks to the Nextcloud snap team, who created a [how to](https://github.com/nextcloud-snap/nextcloud-snap/wiki/How-to-configure-talk-HPB-with-Docker) for installing the High-performance backend using the Talk container from Nextcloud AIO in a Docker Stack. While provided "as-is" it might help you to setup the High-performance backend for your use-case. Please note that it does not require a Nextcloud snap installation!

### Docker container

* **Requirements:** Docker
* **Link:** _Described in detail below_

Similar to the approach above, we utilize the Nextcloud AIO container to get the High-performance backend up and running.

## System requirements

* A working docker installation
* Checkout [the docker installation guide](https://docs.docker.com/engine/install/)

## Before you begin

Before installing the High performance backend, ensure you have:

* A working Nextcloud installation.
* If you don't have a working Nextcloud installation yet, please checkout [Nextcloud All-in-One](https://github.com/nextcloud/all-in-one) or alteratively our [installation documentation](https://docs.nextcloud.com/server/latest/admin_manual/installation/index.html).
* Nextcloud Talk installed from the [Nextcloud app store](https://apps.nextcloud.com/apps/spreed).
* If you need help installing Nextcloud Talk, please check out [our documentation on apps management](https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html).
* A correctly setup reverse proxy for your Nextcloud installation
* See [our documentation on reverse proxy](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html).

## Installation steps

The following procedure explains how to get the High-performance backend up and running with a standalone docker container. It will utilize the pre-built container from Nextcloud All-in-One.

For more information on how Nextcloud All-in-One builds the container, please [see the Nextcloud AIO repository](https://github.com/nextcloud/all-in-one/tree/main/Containers/talk).

### Step 1 - Create secrets

The High-performance backend requires multiple secrets for authentication with the Nextcloud instance. The talk container from Nextcloud All-in-One needs 3 secrets to work correctly:

* A `TURN` secret
* A `SIGNALING` secret
* A `INTERNAL` secret

While you specify the secrets manually, it is recommended to generate a secure random string. There are multiple ways to do that, one of the easiest is using `openssl`:

```shell
# openssl rand --hex 32
86a057a959534eb761b20afb4122da6b5475a5f8db20ba16abbb91c65132ca03
```

Repeat that another 2 times to have all 3 secrets.

For the following steps we will refer to the secrets as:

* `TURN` = 1111
* `SIGNALING` = 2222
* `INTERNAL` = 3333

Please make sure to replace the values accordingly.

!!! note

While the talk container from Nextcloud AIO also contains a TURN server (and requires a TURN secret), this guide soley focuses on the HPB part.

### Step 2 - Start the docker container

The following command will start the container, please adjust the command to your needs. In addition to the generated secrets, you'll also need the domain of your Nextcloud installation and the port where the signaling server will listen.

```shell
docker run \
--name=nextcloud-talk-hpb \
--restart=always \
--detach \
-e NC_DOMAIN=<your_domain> \
-e TALK_PORT=3478 \
-e TURN_SECRET=<your_turn_secret> \
-e SIGNALING_SECRET=<your_signaling_secret> \
-e INTERNAL_SECRET=<your_internal_secret> \
-p <your_port>:8081 \
nextcloud/aio-talk:latest
```

Example:

```shell
docker run \
--name=nextcloud-talk-hpb \
--restart=always \
--detach \
-e NC_DOMAIN=nextcloud.domain.invalid \
-e TALK_PORT=3478 \
-e TURN_SECRET=1111 \
-e SIGNALING_SECRET=2222 \
-e INTERNAL_SECRET=3333 \
-p 8080:8081 \
nextcloud/aio-talk:latest
```

### Step 3 - Expose the container through the reverse proxy

The container needs to be exposed through the reverse proxy that does TLS offloading, e.g. as `signaling.domain.invalid`. Please checkout the example configs in [the nextcloud-spreed-signaling repository](https://github.com/strukturag/nextcloud-spreed-signaling?tab=readme-ov-file#setup-of-frontend-webserver).

## Verify installation

After finishing all the installation steps, please verify if the signaling server is correctly reachable. You can use query the welcome endpoint for that:

```shell
# curl https://signaling.domain.invalid/api/v1/welcome
{"nextcloud-spreed-signaling":"Welcome","version":"2.0.1~docker"}
```

If you would like to verify it locally from the docker host, you can query the welcome endpoint as well:

```shell
# curl http://localhost:8081/api/v1/welcome
{"nextcloud-spreed-signaling":"Welcome","version":"2.0.1~docker"}
```

Also to show the logs of the docker container, use `docker logs nextcloud-talk-hpb`.

## Post installation

After successfully starting the container, please go to the administrative settings of Talk (`/settings/admin/talk`) to configure the High-performance backend with the following parameters:

* High-performance backend URL: `https://signaling.domain.invalid`
* Shared secret: `2222` (The generated `SIGNALING` secret)

Verify that the connection check succeeds with a green checkmark.

### TURN option

In case you would like to use the TURN option that the Nextcloud AIO container provides, you can modify the docker command like this:

```shell
docker run \
--name=nextcloud-talk-hpb \
--restart=always \
--detach \
-e NC_DOMAIN=<your_domain> \
-e TALK_HOST=<your_signaling_domain> \
-e TALK_PORT=3478 \
-e TURN_SECRET=<your_turn_secret> \
-e SIGNALING_SECRET=<your_signaling_secret> \
-e INTERNAL_SECRET=<your_internal_secret> \
-p <your_port>:8081 \
-p 3478:3478/tcp \
-p 3478:3478/udp \
nextcloud/aio-talk:latest
```

Note that we added the environment variable `TALK_HOST` and additionally exposed port TCP 3478 and UDP ports. The domain entered needs to be the one where the TURN server will be reachable on port 3478.

### TURN post installation

After successfully starting the container, please go to the administrative settings of Talk (`/settings/admin/talk`) to configure the TURN server with the following parameters:

* `turn: only`
* TURN server URL: `signaling.domain.invalid:3478` (no protocol)
* TURN server secret: `3333` (The generated `TURN` secret)
* `UDP and TCP`
3 changes: 3 additions & 0 deletions lib/Settings/Admin/AdminSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use OCP\IUserSession;
use OCP\L10N\IFactory;
use OCP\Settings\ISettings;
use OCP\Support\Subscription\IRegistry;
use OCP\Util;

class AdminSettings implements ISettings {
Expand All @@ -38,6 +39,7 @@ public function __construct(
private ICacheFactory $memcacheFactory,
private IGroupManager $groupManager,
private MatterbridgeManager $bridgeManager,
private IRegistry $subscription,
IUserSession $userSession,
private IL10N $l10n,
private IFactory $l10nFactory,
Expand Down Expand Up @@ -126,6 +128,7 @@ protected function initTurnServers(): void {
}

protected function initSignalingServers(): void {
$this->initialState->provideInitialState('has_valid_subscription', $this->subscription->delegateHasValidSubscription());
$this->initialState->provideInitialState('has_cache_configured', $this->memcacheFactory->isAvailable());
$this->initialState->provideInitialState('signaling_mode', $this->talkConfig->getSignalingMode(false));
$this->initialState->provideInitialState('signaling_servers', [
Expand Down
11 changes: 9 additions & 2 deletions lib/SetupCheck/HighPerformanceBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use OCP\IURLGenerator;
use OCP\SetupCheck\ISetupCheck;
use OCP\SetupCheck\SetupResult;
use OCP\Support\Subscription\IRegistry;

class HighPerformanceBackend implements ISetupCheck {
public function __construct(
Expand All @@ -24,6 +25,7 @@ public function __construct(
readonly protected IURLGenerator $urlGenerator,
readonly protected IL10N $l,
readonly protected Manager $signalManager,
readonly protected IRegistry $subscription,
) {
}

Expand All @@ -39,11 +41,16 @@ public function run(): SetupResult {
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
$setupResult = SetupResult::error(...);
if ($this->talkConfig->getHideSignalingWarning()) {
$setupResult = SetupResult::warning(...);
$setupResult = SetupResult::info(...);
}
$documentation = 'https://nextcloud-talk.readthedocs.io/en/latest/quick-install/';
if ($this->subscription->delegateHasValidSubscription()) {
$documentation = 'https://portal.nextcloud.com/article/Nextcloud-Talk/High-Performance-Backend/Installation-of-Nextcloud-Talk-High-Performance-Backend';
}

return $setupResult(
$this->l->t('No High-performance backend configured - Running Nextcloud Talk without the High-performance backend only scales for very small calls (max. 2-3 participants). Please set up the High-performance backend to ensure calls with multiple participants work seamlessly.'),
'https://portal.nextcloud.com/article/Nextcloud-Talk/High-Performance-Backend/Installation-of-Nextcloud-Talk-High-Performance-Backend',
$documentation,
);
}

Expand Down
12 changes: 8 additions & 4 deletions lib/SetupCheck/RecordingBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ public function getCategory(): string {
}

public function getName(): string {
return $this->l->t('Recording backend');
$name = $this->l->t('Recording backend');
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
return '[skip] ' . $name;
}
return $name;
}

public function run(): SetupResult {
if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) {
return SetupResult::success();
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
return SetupResult::success($this->l->t('Using the recording backend requires a High-performance backend.'));
SystemKeeper marked this conversation as resolved.
Show resolved Hide resolved
}
if (empty($this->talkConfig->getRecordingServers())) {
return SetupResult::info($this->l->t('No recording backend configured'));
}
return SetupResult::error($this->l->t('Using the recording backend requires a High-performance backend.'));
return SetupResult::success();
}
}
12 changes: 8 additions & 4 deletions lib/SetupCheck/SIPConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ public function getCategory(): string {
}

public function getName(): string {
return $this->l->t('SIP dial-in');
$name = $this->l->t('SIP configuration');
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
return '[skip] ' . $name;
}
return $name;
}

public function run(): SetupResult {
if ($this->talkConfig->getSignalingMode() !== Config::SIGNALING_INTERNAL) {
return SetupResult::success();
if ($this->talkConfig->getSignalingMode() === Config::SIGNALING_INTERNAL) {
return SetupResult::success($this->l->t('Using the SIP functionality requires a High-performance backend.'));
}
if ($this->talkConfig->getSIPSharedSecret() === '' && $this->talkConfig->getDialInInfo() === '') {
return SetupResult::info($this->l->t('No SIP backend configured'));
}
return SetupResult::error($this->l->t('Using the SIP functionality requires a High-performance backend.'));
return SetupResult::success();
}
}
9 changes: 6 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ nav:
- 'Overview': 'index.md'
- 'User documentation':
- 'User system requirements': 'user-requirements.md'
- 'User feature documentation ↗': 'https://docs.nextcloud.com/server/latest/user_manual/en/talk/index.html'
- 'Administration documentation':
- 'Server system requirements': 'system-requirements.md'
- 'Quick install': 'quick-install.md'
- 'Scalability': 'scalability.md'
- 'Call experience': 'call-experience.md'
- 'Sample conversations': 'sample-conversations.md'
- 'Occ commands': 'occ.md'
- 'Bots': 'bot-list.md'
- 'Commands (deprecated)': 'commands.md'
- 'Matterbridge integration': 'matterbridge.md'
- 'Developer documentation':
- 'Developer setup': 'developer-setup.md'
- 'Bots and webhooks': 'bots.md'
- 'Constants': 'constants.md'
- 'Capabilities': 'capabilities.md'
Expand All @@ -50,8 +52,9 @@ nav:
- 'Bots management': 'bot-management.md'
- 'Integration by other apps': 'integration.md'
- 'Webinar management': 'webinar.md'
- 'Settings': 'settings.md'
- 'Signaling API': 'internal-signaling.md'
- 'Settings management': 'settings.md'
- 'Internal Signaling API': 'internal-signaling.md'
- 'Standalone Signaling API↗': 'https://nextcloud-spreed-signaling.readthedocs.io/en/latest/'
- 'Configuring a TURN server':
- 'Overview': 'TURN.md'
- 'coTURN': 'coturn.md'
Expand Down
Loading
Loading