Skip to content
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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ RUN chmod +x /entrypoint.sh

# Create config and data directories
RUN mkdir -p /etc/opentalk /var/lib/opentalk
COPY controller.toml /etc/opentalk/controller.toml

# Environment variables (set by AppAPI)
ENV APP_HOST=0.0.0.0
ENV APP_PORT=9000
ENV APP_PORT=23000
ENV PYTHONUNBUFFERED=1

# OpenTalk configuration
Expand Down
391 changes: 190 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

199 changes: 122 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,84 @@
# OpenTalk ExApp for Nextcloud
<p align="center">
<img src="img/app.svg" alt="OpenTalk logo" width="80" height="80">
</p>

<h1 align="center">OpenTalk</h1>

<p align="center">
<strong>GDPR-compliant video conferencing for Nextcloud — secure meetings, screen sharing, and end-to-end encryption via the Nextcloud AppAPI</strong>
</p>

<p align="center">
<a href="https://github.com/ConductionNL/opentalk/releases"><img src="https://img.shields.io/github/v/release/ConductionNL/opentalk" alt="Latest release"></a>
<a href="https://github.com/ConductionNL/opentalk/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-EUPL--1.2-blue" alt="License"></a>
</p>

---

> **IMPORTANT DISCLAIMER**
>
> This repository contains only a **Nextcloud ExApp wrapper** for [OpenTalk](https://opentalk.eu/), developed and maintained by [Conduction B.V.](https://conduction.nl). The wrapper packages the upstream OpenTalk controller as a containerized application managed by Nextcloud's AppAPI.
>
> **OpenTalk itself is developed by [OpenTalk GmbH](https://opentalk.eu/).**
>
> Conduction does **NOT** provide:
> - Support, SLAs, or guarantees for the OpenTalk platform
> - Licensing or pricing for OpenTalk
> - Bug fixes or feature development for the upstream OpenTalk controller
> - Any warranty regarding OpenTalk's functionality or fitness for purpose
>
> **For OpenTalk support, licensing, pricing, and services, contact [OpenTalk GmbH](https://opentalk.eu/) directly.**
>
> For issues specific to the **Nextcloud wrapper** (AppAPI integration, container lifecycle, proxy layer), you may open an issue on [this repository](https://github.com/ConductionNL/opentalk/issues).

Nextcloud ExApp (External Application) that integrates [OpenTalk](https://opentalk.eu/) video conferencing.

## About This App
## What is OpenTalk?

This is a **Nextcloud ExApp** that packages the OpenTalk video conferencing controller as a containerized application managed by Nextcloud's AppAPI. When you install this app, Nextcloud will automatically deploy and manage the OpenTalk container.
[OpenTalk](https://opentalk.eu/) is a secure, open-source video conferencing platform developed in Germany by [OpenTalk GmbH](https://opentalk.eu/) with a strong focus on data protection and GDPR compliance. It is designed as a sovereign alternative to commercial cloud-based video conferencing solutions, keeping all communication data under your own control.

**For OpenTalk documentation, see:** https://docs.opentalk.eu/
Key capabilities of the OpenTalk platform:

## What is OpenTalk?
- **Secure Video and Audio Conferencing** -- High-quality WebRTC-based meetings via LiveKit
- **Screen Sharing** -- Present your screen or individual application windows
- **End-to-End Encryption** -- Optional E2EE for maximum confidentiality
- **OIDC / Keycloak Authentication** -- Enterprise single sign-on integration
- **Moderation Tools** -- Meeting controls, waiting rooms, and participant management
- **Recording** -- Server-side meeting recording (when configured)
- **Data Sovereignty** -- Self-hosted, no data leaves your infrastructure

OpenTalk is a secure, open-source video conferencing solution developed in Germany with a focus on data protection and GDPR compliance. It provides:

- Secure video and audio conferencing
- Screen sharing and collaborative features
- End-to-end encryption options
- OIDC/Keycloak authentication integration
For full documentation, see [docs.opentalk.eu](https://docs.opentalk.eu/).

## What This App Does

- Packages OpenTalk controller as a Nextcloud ExApp
- Nextcloud automatically manages the container lifecycle
- Provides video conferencing directly within Nextcloud
- Integrates with Nextcloud's AppAPI for seamless deployment

## Requirements
This Nextcloud ExApp (External Application) wraps the upstream OpenTalk controller in a container that Nextcloud manages through the [AppAPI](https://github.com/nextcloud/app_api) framework. Specifically, this wrapper:

- Nextcloud 30 or higher
- AppAPI app installed and configured with a deploy daemon
- Docker environment for ExApp containers
- Packages the OpenTalk controller binary from the official upstream image
- Implements AppAPI lifecycle endpoints (`/heartbeat`, `/init`, `/enabled`)
- Starts and manages the OpenTalk controller process inside the container
- Proxies all requests from Nextcloud to the OpenTalk controller
- Reports health status back to Nextcloud

### External Dependencies
This app does **not** modify or extend the OpenTalk platform itself. It only provides the integration layer between Nextcloud and the upstream OpenTalk controller.

OpenTalk requires additional services for full functionality:
## Requirements

| Service | Purpose | Required |
|---------|---------|----------|
| PostgreSQL | Database | Yes |
| Redis | Caching | Yes |
| Keycloak | Authentication (OIDC) | Yes |
| LiveKit | WebRTC media server | Yes |
| RabbitMQ | Message broker | Optional |
| Dependency | Version | Notes |
|-----------|---------|-------|
| Nextcloud | 30 -- 33 | |
| [AppAPI](https://apps.nextcloud.com/apps/app_api) | latest | Must be installed and configured with a deploy daemon |
| Docker | -- | Required for ExApp container deployment |
| PostgreSQL | 14+ | OpenTalk database backend |
| Redis | 6+ | Caching and session management |
| Keycloak | 20+ | OIDC authentication provider |
| LiveKit | 1.x | WebRTC media server for video/audio |
| RabbitMQ | 3.x | Message broker (optional) |

## Installation

### Via Nextcloud App Store

1. Ensure AppAPI is installed and configured
2. Search for "OpenTalk" in the Nextcloud app store
3. Click Install - Nextcloud will pull and start the container
1. Ensure **AppAPI** is installed and configured with a deploy daemon
2. Search for **OpenTalk** in the Nextcloud External Apps section
3. Click **Install** -- Nextcloud will pull and start the container automatically

### Manual Registration

Expand All @@ -65,67 +95,82 @@ docker exec -u www-data nextcloud php occ app_api:app:enable opentalk

## Configuration

Configure via Nextcloud Admin Settings or environment variables:
Configure via Nextcloud Admin Settings or container environment variables. All environment variables are defined in `appinfo/info.xml` and passed through by AppAPI.

### OpenTalk Controller

| Variable | Description |
|----------|-------------|
| `OPENTALK_CTRL_DATABASE__URL` | PostgreSQL connection string |
| `OPENTALK_CTRL_OIDC__AUTHORITY` | Keycloak OIDC provider URL |
| `OPENTALK_CTRL_DATABASE__URL` | PostgreSQL connection string (e.g., `postgres://user:pass@host:5432/opentalk`) |
| `OPENTALK_CTRL_REDIS__URL` | Redis connection string (e.g., `redis://localhost:6379/`) |
| `OPENTALK_CTRL_OIDC__AUTHORITY` | Keycloak OIDC provider URL (e.g., `http://keycloak:8080/realms/opentalk`) |
| `OPENTALK_CTRL_LIVEKIT__SERVICE_URL` | LiveKit WebRTC server URL |
| `OPENTALK_CTRL_LIVEKIT__API_KEY` | LiveKit API key |
| `OPENTALK_CTRL_LIVEKIT__API_SECRET` | LiveKit API secret |

## Development

### Building the Docker Image

```bash
# Build locally
make build

# Push to registry
make push
### Keycloak Integration

# Test locally
make test
```
| Variable | Description |
|----------|-------------|
| `KEYCLOAK_URL` | Keycloak server URL (e.g., `http://keycloak:8080`) |
| `KEYCLOAK_REALM` | Keycloak realm name (default: `commonground`) |
| `KEYCLOAK_CLIENT_ID` | OIDC client ID (default: `opentalk`) |
| `KEYCLOAK_CLIENT_SECRET` | OIDC client secret |

### Project Structure
## Architecture

```
opentalk/
├── appinfo/
│ └── info.xml # ExApp manifest
├── ex_app/
│ └── lib/
│ └── main.py # FastAPI wrapper for AppAPI
├── Dockerfile # Container definition
├── entrypoint.sh # Container startup
├── requirements.txt # Python dependencies
└── Makefile # Build automation
+-----------------------------------------+
| Nextcloud + AppAPI |
+-------------------+---------------------+
| AUTHORIZATION-APP-API
v
+-----------------------------------------+
| OpenTalk ExApp Container |
| +-----------------------------------+ |
| | FastAPI Wrapper (port 9000) | |
| | - /heartbeat (health check) | |
| | - /init (initialization) | |
| | - /enabled (enable/disable) | |
| | - /* (proxy to ctrl) | |
| +----------------+------------------+ |
| | |
| +----------------v------------------+ |
| | OpenTalk Controller (port 11311) | |
| | (upstream binary from | |
| | registry.opencode.de/opentalk) | |
| +-----------------------------------+ |
+-----------------------------------------+
| | |
PostgreSQL Redis Keycloak LiveKit
```

## Architecture

This ExApp uses a FastAPI wrapper that:
The FastAPI wrapper (`ex_app/lib/main.py`) handles the AppAPI contract:

1. Implements AppAPI lifecycle endpoints (`/heartbeat`, `/init`, `/enabled`)
2. Starts and manages the OpenTalk controller process
3. Proxies requests to the OpenTalk controller
4. Reports health status back to Nextcloud
1. **`/init`** -- Starts the OpenTalk controller process and waits for it to become healthy (up to 90 seconds)
2. **`/enabled`** -- Starts or stops the controller based on the enabled state
3. **`/heartbeat`** -- Checks controller health by probing `http://localhost:11311/v1/`
4. **`/*`** -- Proxies all other requests to the OpenTalk controller

## Related Projects
## Links

| Project | Description | Links |
|---------|-------------|-------|
| **OpenTalk** | Video conferencing platform | [Website](https://opentalk.eu/) / [Docs](https://docs.opentalk.eu/) / [GitLab](https://gitlab.opencode.de/opentalk) |
| **Nextcloud AppAPI** | External app framework | [GitHub](https://github.com/nextcloud/app_api) / [Docs](https://docs.nextcloud.com/server/latest/developer_manual/exapp_development/) |
| **Open Register** | Nextcloud register management | [GitHub](https://github.com/ConductionNL/openregister) |
| Resource | URL |
|----------|-----|
| OpenTalk Website | [opentalk.eu](https://opentalk.eu/) |
| OpenTalk Documentation | [docs.opentalk.eu](https://docs.opentalk.eu/) |
| OpenTalk Source Code | [gitlab.opencode.de/opentalk/controller](https://gitlab.opencode.de/opentalk/controller) |
| OpenTalk GmbH (Support & Licensing) | [opentalk.eu](https://opentalk.eu/) |
| This Wrapper (GitHub) | [ConductionNL/opentalk](https://github.com/ConductionNL/opentalk) |
| Nextcloud AppAPI | [GitHub](https://github.com/nextcloud/app_api) / [Docs](https://docs.nextcloud.com/server/latest/developer_manual/exapp_development/) |

## License

AGPL-3.0 - See [LICENSE](LICENSE) for details.
EUPL-1.2 -- See [LICENSE](LICENSE) for details.

This license applies to the **Nextcloud ExApp wrapper only**. The upstream OpenTalk controller is licensed separately under its own terms. See the [OpenTalk project](https://gitlab.opencode.de/opentalk/controller) for upstream licensing.

## Authors

## Author
Nextcloud wrapper built by [Conduction B.V.](https://conduction.nl) -- open-source software for Dutch government and public sector organizations.

[Conduction B.V.](https://conduction.nl) - info@conduction.nl
OpenTalk platform developed by [OpenTalk GmbH](https://opentalk.eu/) -- secure video conferencing made in Germany.
40 changes: 37 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "conductionnl/opentalk",
"description": "OpenTalk video conferencing integration for Nextcloud",
"license": "AGPL-3.0-or-later",
"license": "EUPL-1.2",
"authors": [
{
"name": "Conduction b.v.",
Expand All @@ -20,16 +20,50 @@
"cs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"phpcs": "./vendor/bin/phpcs --standard=phpcs.xml",
"phpcs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"psalm": "psalm --threads=1 --no-cache || echo 'Psalm not installed, skipping...'",
"phpmd": "phpmd lib text phpmd.xml || echo 'PHPMD not installed, skipping...'",
"phpmetrics": "./vendor/bin/phpmetrics --report-html=phpmetrics lib/",
"phpmetrics:violations": "./vendor/bin/phpmetrics --violations-xml=phpmetrics/violations.xml lib/",
"psalm": "./vendor/bin/psalm --threads=1 --no-cache || echo 'Psalm not installed, skipping...'",
"phpstan": "./vendor/bin/phpstan analyse --memory-limit=1G || echo 'PHPStan not installed, skipping...'",
"test:unit": "./vendor/bin/phpunit --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"test:all": "./vendor/bin/phpunit --colors=always || echo 'Tests require Nextcloud environment, skipping...'"
"test:all": "./vendor/bin/phpunit --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"check": "E=0; for CMD in lint phpcs psalm test:unit; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:full": "E=0; for CMD in lint phpcs psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:strict": "E=0; for CMD in lint phpcs phpmd psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"fix": [
"@cs:fix"
],
"test:coverage": "./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always",
"coverage:check": "php -r \"\\$xml = simplexml_load_file('coverage/clover.xml'); \\$metrics = \\$xml->project->metrics; \\$statements = (int)\\$metrics['statements']; \\$covered = (int)\\$metrics['coveredstatements']; \\$percentage = \\$statements > 0 ? round((\\$covered / \\$statements) * 100, 2) : 0; echo 'Coverage: ' . \\$percentage . '%' . PHP_EOL; exit(\\$percentage < 75 ? 1 : 0);\"",
"quality:phpcs-score": "./vendor/bin/phpcs --standard=phpcs.xml --report=json lib/ | php -r \"\\$json = json_decode(file_get_contents('php://stdin'), true); \\$errors = \\$json['totals']['errors'] ?? 0; \\$warnings = \\$json['totals']['warnings'] ?? 0; \\$score = 1000 - \\$errors - (\\$warnings / 2); echo 'PHPCS Score: ' . \\$score . ' (Errors: ' . \\$errors . ', Warnings: ' . \\$warnings . ')' . PHP_EOL;\"",
"quality:phpmd-score": "phpmd lib/ json phpmd.xml | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$violations = count(\\$json['files'] ?? []); \\$score = 1000 - (\\$violations * 10); echo 'PHPMD Score: ' . \\$score . ' (Violations: ' . \\$violations . ')' . PHP_EOL;\" || echo 'PHPMD not available'",
"quality:psalm-score": "./vendor/bin/psalm --output-format=json --no-cache | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$errors = count(\\$json ?? []); \\$score = 1000 - (\\$errors * 5); echo 'Psalm Score: ' . \\$score . ' (Errors: ' . \\$errors . ')' . PHP_EOL;\" || echo 'Psalm not available'",
"quality:phpstan-score": "./vendor/bin/phpstan analyse --memory-limit=1G --error-format=json --no-progress | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$errors = \\$json['totals']['file_errors'] ?? 0; \\$score = 1000 - (\\$errors * 5); echo 'PHPStan Score: ' . \\$score . ' (Errors: ' . \\$errors . ')' . PHP_EOL;\" || echo 'PHPStan not available'",
"quality:score": [
"@quality:phpcs-score",
"@quality:phpmd-score",
"@quality:psalm-score",
"@quality:phpstan-score"
],
"phpqa": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa",
"phpqa:full": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs:0,phpmd:0,phploc:0,phpmetrics,phpcpd:0,parallel-lint:0",
"phpqa:ci": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs,phpmd,phploc,phpmetrics,phpcpd,parallel-lint",
"qa:check": [
"@phpqa"
],
"qa:full": [
"@phpqa:full"
]
},
"require": {
"php": "^8.1"
},
"require-dev": {
"nextcloud/coding-standard": "^1.4",
"nextcloud/ocp": "^31.0",
"phpmd/phpmd": "^2.15",
"phpmetrics/phpmetrics": "^2.8",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.9",
"vimeo/psalm": "^5.26"
Expand Down
Loading
Loading