diff --git a/docker/README.md b/docker/README.md index c7028329964436081bdcff9f44c620dabb440e00..4ed7083760ef61c7ccb49870837af0b413e81547 100644 --- a/docker/README.md +++ b/docker/README.md @@ -54,7 +54,7 @@ ### Run If you just want to test Conduit for a short time, you can use the `--rm` flag, which will clean up everything related to your container after you stop it. -## Docker-compose +### Docker-compose If the `docker run` command is not for you or your setup, you can also use one of the provided `docker-compose` files. @@ -138,3 +138,56 @@ ### Use Traefik as Proxy 6. Run `docker-compose up -d` 7. Connect to your homeserver with your preferred client and create a user. You should do this immediately after starting Conduit, because the first created user is the admin. + + + + +## Voice communication + +In order to make or receive calls, a TURN server is required. Conduit suggests using [Coturn](https://github.com/coturn/coturn) for this purpose, which is also available as a Docker image. Before proceeding with the software installation, it is essential to have the necessary configurations in place. + +### Configuration + +Create a configuration file called `coturn.conf` containing: + +```conf +use-auth-secret +static-auth-secret=<a secret key> +realm=<your server domain> +``` +These same values need to be set in conduit. You can either modify conduit.toml to include these lines: +``` +turn_uris = ["turn:<your server domain>?transport=udp", "turn:<your server domain>?transport=tcp"] +turn_secret = "<secret key from coturn configuration>" +``` +or append the following to the docker environment variables dependig on which configuration method you used earlier: +```yml +- CONDUIT_TURN_URIS=["turn:<your server domain>?transport=udp", "turn:<your server domain>?transport=tcp"] +- CONDUIT_TURN_SECRET="<secret key from coturn configuration> +``` +Restart Conduit to apply these changes. + +### Run +Run the [Coturn](https://hub.docker.com/r/coturn/coturn) image using +```bash +docker run -d --network=host -v $(pwd)/coturn.conf:/etc/coturn/turnserver.conf coturn/coturn +``` + +or docker-compose. For the latter, paste the following section into a file called `docker-compose.yml` +and run `docker-compose up -d` in the same directory. + +```yml +version: 3 +services: + turn: + container_name: coturn-server + image: docker.io/coturn/coturn + restart: unless-stopped + network_mode: "host" + volumes: + - ./coturn.conf:/etc/coturn/turnserver.conf +``` + +To understand why the host networking mode is used and explore alternative configuration options, please visit the following link: https://github.com/coturn/coturn/blob/master/docker/coturn/README.md. +For security recommendations see Synapse's [Coturn documentation](https://github.com/matrix-org/synapse/blob/develop/docs/setup/turn/coturn.md#configuration). +