Wire's TURN server: upstream coturn 4.6.2 with the patches Wire needs for its calling services. It ships as the image quay.io/wire/coturn and the Helm chart in charts/coturn, deployed next to wire-server and the SFT.
The upstream README, with the list of supported RFCs and platforms, is kept as docs/README.upstream.md.
- Federation. Clients of two coturn instances exchange media through a single tunnel between the servers, over DTLS with mutual certificate authentication and a whitelist of peers. The SFT uses it for federated calls. A client enters federation by allocating with a username that starts with
sft-. Options--federation-*inREADME.turnserver. - zrest authentication. The TURN REST API with Wire's username format and password derivation, sharing its secret with brig. Option
--zrest. - Drain mode. On
SIGUSR1(ordrainon the CLI) the server stops accepting allocations and waits for the existing ones to end. The chart's preStop hook uses it for rolling restarts. - Rate limiting of 401 responses per client address, with an allow-list reloaded on
SIGRTMIN+3, against reflection attacks. Options--401-req-limit,--401-window,--401-allowlist. - Certificate reload on
SIGUSR2, for the TURNS and the federation certificates. The chart runs a sidecar that sends it when the mounted secrets change. - The Helm chart, with Prometheus metrics, detection of the external IP, SNAT of the federation port and a pod disruption budget.
-
Prepare the release files in
publication/(release note, declaration, compatibility file) and merge them intodev. -
Start the
Prepare releaseworkflow, from the Actions tab or the command line. For the GA of the version prepared ondev:gh workflow run prepare-release.yml -R wireapp/coturn --ref dev -f source_branch=dev -f type=ga -f bump=patch
typeis the channel (alpha,beta,rc,ga).bumpcounts when the last release was a GA: it picks the next version, for the next GA or for the first pre-release of a new line. After a pre-release, keeppatch: the GA takes the version of the pre-release.For a patch of an LTS line, release from its branch, for example
release/5.6. The release files are read from the source branch, so they go intorelease/5.6, notdev:gh workflow run prepare-release.yml -R wireapp/coturn --ref dev -f source_branch=release/5.6 -f type=ga -f bump=patch
-
Approve the publication: the
Publish releasejob waits for a release manager in therelease-publicationenvironment. -
The release is then finalised: the GitHub Release is published with its tag, the image is promoted on Quay and the chart published,
wire-buildsis bumped for a release fromdev, and the release manager is notified. -
For now, pre-releases and GAs land in staging. Pushing to production is a separate, explicit step with its own workflow.
Since 5.6.0 the versions are SemVer X.Y.Z, tagged vX.Y.Z. The image and the chart share the version:
| Artifact | Location |
|---|---|
| Image | quay.io/wire/coturn:X.Y.Z |
| Chart, releases | oci://quay.io/wire/charts/stable/coturn |
| Chart, pre-releases and dev builds | oci://quay.io/wire/charts/dev/coturn |
Every push to dev produces a dev build, <next version>-<timestamp>.g<sha>, published to the dev chart repository. Pre-releases are X.Y.Z-alpha.N, -beta.N or -rc.N. Each release has a GitHub Release with the release note, the release declaration and the compatibility file from publication/.
Releases before 5.6.0 were named 4.6.2-federation-wireapp.N.
devis the trunk and the default branch. Every pull request targets it.release/X.Yis created at each minor release and receives its patch releases. A fix lands ondevfirst and is backported.wireapp/4.6.2-federationis the previous trunk, frozen at the last4.6.2-federation-wireapp.Nbuild.
Dependencies: libevent2 and OpenSSL, plus libmicrohttpd and prometheus-client-c for the metrics, and the client libraries of the databases you want. On Debian or Ubuntu:
apt-get install build-essential pkg-config libevent-dev libssl-dev \
libpq-dev libmariadb-dev libsqlite3-dev libhiredis-dev libmongoc-dev libmicrohttpd-dev./configure
make
make check
(cd examples && ./run_tests.sh)The image is built by docker/Dockerfile (Debian bookworm, OpenSSL 3), and .github/scripts/test-image.sh checks it, including the federation DTLS handshake tests of test/:
docker build -f docker/Dockerfile -t coturn:local .
IMAGE=coturn:local .github/scripts/test-image.shpr.ymlruns on every pull request: build and tests, image, chart, release files. The four checks are required to merge.dev.ymlruns on every push todev: it publishes the dev build, image and chart, and declares it to the release manager.prepare-release.ymlis started by hand with the source branch, the channel (ga,alpha,beta,rc) and the bump. It builds the candidate and a draft GitHub Release.publish-release.ymlthen waits for a release manager's approval in therelease-publicationenvironment, promotes the image by digest, publishes the chart, tags the commit and declares the release.
The release flow and the files in publication/ follow Wire's release standard with the shared actions of wire-rm-actions.
The code is owned by @wireapp/avs; the workflows and publication/ also by @wireapp/release-managers (see CODEOWNERS). Open pull requests against dev. Keep the patches on top of upstream as small as you can: the fork is meant to be rebased on newer upstream versions.
README.turnserver,README.turnadmin,README.turnutils: all the options.charts/coturn/README.md: deploying the chart.docs/: the upstream documentation (build, configuration, databases, testing).publication/release-note.md: the note of the release in preparation.