Why one-to-one Jitsi calls need a coturn relay and who should set it up
When some one-to-one calls on your self-hosted Jitsi connect and others fail, the usual cause is that the two browsers cannot open a direct media path to each other. This is most often caused by symmetric NAT or a strict firewall on one side, which blocks the peer-to-peer route that the browsers try first. coturn is a TURN relay: when direct connection fails, both participants send their media to the relay, which forwards it between them. Jitsi Meet encrypts audio and video in transit with DTLS-SRTP, so the relay carries encrypted media it cannot read, but it still consumes bandwidth and must be sized and reachable from both sides.
The answer to the page question is a coturn service that issues short-lived credentials through Prosody, the XMPP server in your Jitsi stack, so browsers never hold a long-lived TURN password. The service also needs to listen on the ports and TLS endpoints your users' networks allow, which is the part that varies most between sites. Plan who owns this work before you start: someone must control DNS, certificates, firewall rules on both the internal and internet sides, and the Prosody configuration that hands out credentials. Confirm the exact coturn settings, the Prosody keys and the ports against the coturn documentation and the Jitsi handbook versions you run, since both change between releases.
Treat this as a service you operate, not a single setting. A coturn left open to anyone with its address can be used as an open relay to carry traffic for third parties, so access control and credential lifetime are part of the design, not an afterthought. Decide early whether your in-house team has the networking and security skills to run a public-facing relay, or whether an implementation partner should plan, build and verify it with you, with the handover documented for your operators.
How a coturn relay, Prosody and the browsers fit together
The diagram starts with a browser joining a Jitsi meet page served by the web server. The web app asks Prosody for TURN credentials, which Prosody issues as time-limited values derived from a shared secret that is held only by Prosody and coturn. When direct media paths fail, both browsers connect to coturn over UDP 3478 or TCP 5349 and relay traffic from there. Check that the secret never reaches the browser and that the trust boundary between your network and the internet matches your firewall rules.
Credential issuance and relayed media paths around the trust boundary.
Which coturn and Jitsi options to decide before you install
This table compares the build decisions that change a coturn server for Jitsi peer-to-peer calls, with the fit and main trade-off for each option. Read each row before you choose a host, ports or credential model, and confirm exact configuration keys against the coturn and Jitsi versions you plan to run.
| Decision | Option | When it fits | Main trade-off |
|---|---|---|---|
| Coturn host | Separate VM | Production calls where TURN traffic and bandwidth should not compete with the web server | Another machine to patch, monitor and firewall |
| Coturn host | Shared with the Jitsi web server | Small pilots with light traffic and a single operator | Relay bandwidth and port ranges can affect web serving under load |
| Public DNS name and certificate | Dedicated TURN hostname with a valid certificate | Clients that must use TLS to reach TURN, including networks that filter non-standard ports | Certificate renewal must cover the TURN host as well as the web host |
| STUN and TURN listening port | 3478/UDP (optional in the quick start) | Standard STUN and TURN over UDP for clients with open outbound UDP | Networks that block UDP fall back to TCP or TLS options |
| TLS listening port | 5349/TCP (listed as TCP fallback in the quick start) | Users behind restrictive firewalls that allow outbound TLS | Needs a valid certificate on the TURN host and extra testing from restricted networks |
| Shared secret for ephemeral credentials | Static auth secret that Prosody uses to mint short-lived TURN credentials | Peer-to-peer calls that should authenticate through the Jitsi stack without storing user passwords in TURN | The secret must match in both systems and is a high-value credential to store and rotate |
| Relay port range | A bounded UDP range for relayed media, sized to expected concurrent calls | Known user counts where firewall rules and cloud security groups can be scoped tightly | A narrow range limits concurrency, and a wide range widens the attack surface |
| Bandwidth limits | Per-allocation and total bandwidth caps on the coturn server | Shared hosts or multi-tenant networks where one call should not consume all capacity | Caps set too low degrade call quality, and caps set too high allow misuse |
| TCP fallback | Offer TCP or TLS relay transports alongside UDP | Corporate networks that allow only TCP or TLS egress | More listening ports, more connections to monitor, and higher relay load |
Which TURN setup fits your network situation
Most participants on home broadband and open office Wi-Fi can reach each other directly once the browsers exchange candidates, so a one-to-one call often connects without a relay. TURN matters for the minority of sessions where NAT mappings fail. The usual symptom is a call that stalls at connecting or shows a black video for one side, and the failures often cluster on particular remote networks.
- Symptom: failures that follow a specific carrier, hotel or branch router rather than your whole user base.
- Ports: coturn on 3478/UDP is usually enough for the relay path. The Jitsi Debian/Ubuntu quick start lists 5349/TCP as the TCP fallback, so confirm both are reachable from outside.
- When to move on: you do not need the TCP 443 setup unless failures trace to networks that allow only HTTPS.
- Relay exposure: a TURN server that anyone on the internet can use becomes an open relay, so confirm the credential and allocation controls are in place before you publish the address.
- Test first: place a call between two external networks, then check the selected candidate pair in the browser's WebRTC statistics to see whether a relay candidate was used.
Check which candidate pair the failed sessions used before you change any firewall rules.
Corporate networks often block outbound UDP while allowing TCP, so calls from managed laptops fail even though the same users connect from home. The symptom is usually a connection that never establishes or audio that never starts, with the same user connecting normally on another network. In this case coturn on 3478/UDP is unreachable, and the TCP path is the only one left.
- Egress filtering: ask the network team which outbound UDP and TCP ports are open before you test, because UDP blocking is a common policy.
- TCP listener: a coturn TCP listener on 5349 can serve clients that cannot send UDP, as long as the certificate matches the hostname that clients use.
- TLS inspection: a proxy that re-signs TLS traffic can break the handshake unless managed endpoints trust its certificate chain.
- Test location: test from a managed device on the corporate network, not from a lab machine on an open segment, because the lab result will not show the policy.
- Escalation: if 5349/TCP is blocked too, plan the TCP 443 setup, which the sibling topic on TCP 443 covers.
Confirm that a managed laptop on the corporate network completes a call through the TCP path before you consider the TURN setup working.
Some networks allow only outbound HTTPS, so every port except 443/TCP is closed. Here the call never connects even when coturn is healthy, because clients cannot reach 3478, 5349 or 10000/UDP at all. The symptom looks like a total failure for that network, and changing the coturn ports will not help.
- Required port: 443/TCP is the only port the path can use, so the TURN service must answer there through a separate hostname.
- Web server sharing: port 443 is already used by the Jitsi web server, so the design has to multiplex the traffic, which the TCP 443 sibling topic describes.
- Certificate: the certificate must be valid for the name clients use. The Jitsi handbook warns that self-signed certificates cause problems, especially with mobile clients.
- Websocket rules: a proxy or firewall that blocks the signalling websocket paths will fail the call even when TURN works, so check that path as well.
- Test location: test from a restricted segment that allows only 443, because a home test with every port open proves nothing about this environment.
Run a complete call from a segment that allows only 443 before you tell users the network is supported.
Organizations that host meetings for staff on the office LAN and for external guests often have one Jitsi deployment serving both. Coturn can relay traffic, but it cannot correct addresses that the bridge or the DNS answers get wrong. The symptom is that internet users connect while LAN users fail, or the reverse, and the failures may appear only when both participants share the same building network.
- Consistent names: if internal DNS returns a private address for the TURN name while external users get a public address, clients may pick a path that does not work for the other side.
- Hairpin routing: test whether LAN clients can reach the public address of the TURN server from inside the network, because many firewalls do not route that traffic back correctly.
- Addressing decisions: the advertised addresses and split horizon topics cover the bridge and DNS settings, so change those first and treat TURN as the fallback.
- Mixed pairs: test one call with both participants on the LAN and another with one inside and one outside.
- Relay necessity: LAN-to-LAN pairs often connect directly, so confirm whether a relay candidate appears at all before you adjust the TURN configuration.
Run three test calls (LAN to LAN, LAN to internet, internet to internet) and record which candidate pair each one selected.
Setting up coturn with ephemeral credentials through Prosody
This sequence gives one-to-one Jitsi calls a TURN fallback when direct media paths fail. Each step ends with a check, so the team knows the relay is issuing short-lived credentials and carrying traffic before users depend on it.
Prepare DNS and a valid certificate
The network or platform team creates a DNS name for the TURN server, such as turn.example.org, that resolves to the host's public address, and obtains a certificate from a trusted authority for that name. The Jitsi handbook says self-signed certificates cause problems for audio and video, especially on mobile clients, so do not substitute one. Check that the name resolves from outside your network and that the certificate chain validates from a client machine before continuing.
Install coturn and open the required ports
The operator installs the coturn package on a dedicated host, separate from the Jitsi web and bridge roles, and opens the listening ports in the host firewall and any cloud security group. Confirm the exact port set against the coturn documentation and your Jitsi version, since the Jitsi quick start lists 5349/TCP for TCP fallback and 3478/UDP for STUN as optional. Check that the service starts cleanly and that the listening sockets show up on the host, for example with a socket listing command.
Generate the shared secret and enable time-limited credentials
The operator generates a long random shared secret and places it in the coturn configuration, enabling the REST API style of time-limited credentials that the coturn project documents. Store the secret in your secrets manager or a root-only file, because anyone who holds it can mint TURN credentials. Confirm the exact configuration keys and file locations for the installed coturn version. Check that the file permissions restrict reads to the service account and that the service reloads without errors.
Lock down relay rules to prevent an open relay
Before any client uses the server, the operator restricts which peers coturn can relay to, typically by denying private and loopback address ranges and limiting the realm and the allowed port range. Also set a total quota or bandwidth limit per user if your coturn version supports it. Test from an outside host that a TURN allocation to an internal address is refused. A relay that accepts that request is an open relay and must be fixed before you continue.
Configure Prosody to issue ephemeral credentials
The Jitsi administrator adds the TURN host, port and shared secret to the Prosody and Jitsi web configuration so that authenticated clients receive short-lived TURN credentials with each session. The exact settings are in the Jitsi handbook for your installed release, and the file names and keys must be confirmed against that version before editing. Restart Prosody and the web service. Check that a joined client's session carries TURN server entries with a username that includes an expiry timestamp.
Verify credential expiry and relay use
The team confirms that a credential stops working after its lifetime by reusing an old username and password pair from a test client, which should be rejected. Then they place a one-to-one call from a network that blocks direct peer media, such as a restricted test segment or a firewall rule that drops UDP between the two clients. Check that the connection statistics show a relayed candidate and that the call completes with audio and video. Keep the test log for the change record.
Monitor the relay and rotate the secret
The operator watches coturn logs and host bandwidth for unexpected allocations, especially from addresses outside your user base, and sets an alert on unusual relay volume. Plan a rotation procedure for the shared secret that updates coturn and Prosody together, and confirm that a rotation does not break active calls beyond the expected credential refresh. Check that a rotation test passes on a staging host before the same change goes into production.
Keeping the TURN server from becoming an open relay
A coturn server that accepts anyone can carry traffic for strangers, reach internal hosts and run up your bandwidth bill. The controls below work together: Prosody issues short-lived credentials, coturn refuses anything without them, and the relay is fenced off from networks it has no business reaching. Test each one from outside your network before you call the server finished.
Credentials minted only by Prosody
Use the shared secret and ephemeral credential scheme so that Prosody generates a time-limited username and password for each call and coturn validates them against the same secret. Nobody gets a static TURN account on the client side. Check that the TURN secret lives only on the Prosody and coturn hosts, that it is not in any client-side configuration, and that a credential copied from a browser stops working after its lifetime ends.
Jitsi quick startRefusing unauthenticated allocations
Configure coturn so that every allocation request must carry valid long-term credentials, and reject requests that omit them. An anonymous allocation is the simplest way for a stranger to use your server as a relay. From outside your network, send an allocation request with no credentials and with an expired credential. Both should fail, and the server log should show the rejection.
Blocking access to internal networks
Configure denied peer address ranges so the relay cannot forward traffic to private networks, loopback, link-local and cloud metadata addresses, and any subnet that holds your internal services. Without this, a valid user can point the relay at hosts you never meant to expose. Test by attempting a relayed connection to an internal address from a test client and confirming it is refused.
Limiting relay ports and bandwidth
Restrict the relay port range to the ports your bridge and clients actually need, and set per-user bandwidth and total allocation limits so that one account cannot saturate the link. Relay traffic is the expensive part of a TURN server, so these limits protect both availability and your hosting bill. Confirm the limits with a load test that opens several allocations under one credential and checks that the extra ones are refused.
Logging allocations and reviewing them
Turn on coturn logging for allocation creation, refusal and termination, and ship the log to a store your security team can search. Relay logs show which credential was used, from which address and to which peer, which is what you need when a call or an abuse report is investigated. Check that logs record refused requests as well as successful ones, and that retention matches your organization's policy.
Patching coturn and keeping it off the admin plane
Track coturn releases from your distribution or the project and apply security updates on a set schedule. Run the TURN host in its own network segment, with no access from the management network and no shared administrator accounts with Prosody or the bridge. Verify from outside that only the intended TURN ports answer, and that administrative interfaces are not reachable from the internet.
How ports, TLS and firewall rules affect TURN reachability
The firewall and the coturn relay range must agree, because a change to one often breaks the other. The Jitsi Debian/Ubuntu quick start opens 80/TCP and 443/TCP for the web server, 10000/UDP for the videobridge media, and lists 5349/TCP for TCP fallback and 3478/UDP for STUN as optional. On a coturn host, the listening ports (typically 3478 for STUN and TURN, and 5349 for TURN over TLS) must be reachable inbound from client networks, while the relay port range that coturn allocates for each allocation should be open outbound to the internet and restricted to what the relay actually needs. Confirm the exact relay range, listening ports and any port reuse with your coturn configuration before you write firewall rules, and confirm that the ports on the TURN host do not collide with the web server or the videobridge already on that machine.
Clients that only reach TCP depend on TLS on the TURN name. A TURN service reached over TCP on 5349 presents a certificate, so the certificate must match a DNS name that the client resolves, and it must be trusted by the client's browser or operating system. The Jitsi handbook notes that HTTPS with a proper domain certificate is necessary for working audio and video and warns that self-signed certificates cause problems, especially with mobile clients. Plan the TURN name and its certificate with the same care as the meeting domain, and test the TLS path from a restricted network, not only from your office, because a corporate proxy or firewall may block 5349 while allowing 443.
Treat each firewall change as a test event. After opening or closing a port, or changing the relay range, place a one-to-one call from a network that must use TURN, and check the browser's connection type in its statistics. If you restrict outbound relay traffic to limit abuse, confirm that allocations still succeed for legitimate peers. Record the firewall rules, the relay range and the certificate expiry date together, so that the next person who edits one of them can see what depends on it.
Limits to confirm before you rely on a coturn relay
A coturn relay only helps if the versions, credential method, capacity and ownership of the setup line up. The cards below cover what to confirm in your own environment before you route one-to-one calls through it, and who on your side or your partner's side confirms each point.
Coturn and Jitsi versions
Record the exact coturn package or container version and the Jitsi Meet build you run, then check that both are current enough for the TURN credential handling you plan to use. Confirm the coturn release notes and the Jitsi release notes for your build, since the two projects change independently. The platform team owns this check and repeats it at every upgrade.
Jitsi Meet repositoryCredential method and Prosody settings
Ephemeral credentials depend on a shared secret and on Prosody and Jicofo passing the right settings to clients. Verify that your Jitsi release and Prosody configuration support the method you choose, and that the shared secret is set in both places. The team that runs the Jitsi server confirms this in a test call from a network where direct media fails.
Debian quick startBandwidth and concurrent relay capacity
A relay carries the full media stream for every call it handles, so bandwidth and concurrent sessions set the real limit, not the server's CPU alone. Estimate peak simultaneous one-to-one calls from your own usage data, then load test the coturn host with that profile. Confirm the uplink from the server and the number of allocations the host can hold before users depend on it.
Open relay prevention controls
A TURN server that accepts relay requests from anyone can be abused to send traffic to arbitrary destinations. Confirm that your configuration restricts relayed peers, requires authenticated allocations, and blocks private address ranges according to the coturn documentation for your version. The security team should test this from outside your network before launch.
Configuration management for the relay
The Jitsi scalable setup guide warns that building scalable infrastructure is not a task for beginning Jitsi administrators and recommends configuration management tools such as Ansible or Puppet. Decide whether your team will manage coturn, Prosody and Jicofo settings in code, because hand-edited files drift between the TURN host and the Jitsi servers. Your operations lead confirms the tooling and who reviews changes.
Scalable setup guideQuotes follow a written scope
DeployOpen does not publish a price list, and a quote follows from a written scope that names the coturn hosts, Jitsi servers, testing and handover. Ask for the scope to list what is one-time work, such as build and testing, and what recurs, such as monitoring, upgrades and retesting. Your procurement team confirms the scope before any work starts.
What coturn for Jitsi costs, how long it takes and what you must provide
What drives the cost of a coturn build for Jitsi?
The main driver is how many network zones the TURN service must serve, because each zone adds firewall rules, addressing decisions and tests from that side. Certificate and DNS work follows, since TURN over TLS needs a name and a certificate that clients trust, and a second name is needed if you also plan TCP 443 access. Testing from restricted networks and the monitoring you want in place add further effort. A quote should break these out so you can see which items you can drop or do in-house.
Which parts of a coturn setup are one-time and which recur?
The one-time work covers the initial build, the Prosody integration that issues ephemeral credentials, port and firewall configuration, TLS setup and the testing that proves one-to-one calls fall back to TURN when direct connections fail. The recurring work covers operating system and coturn patching, certificate renewal, credential and configuration review after Jitsi upgrades, and periodic capacity review as call volume changes. Ask any partner to state which items are fixed and which are retainer work before you sign.
How long does a coturn build for Jitsi take?
Duration depends on the same factors as cost: the number of network zones, how quickly DNS and firewall changes are approved, and how many restricted networks must be tested. No duration is fixed here, so treat any figure you are given as an estimate tied to the written scope. Your schedule will move most with the change approvals on your side, so start those requests early and ask the partner to list which steps wait on your teams.
Can our in-house team set up coturn for Jitsi without outside help?
Yes, if your team has Linux server administration experience, can manage DNS and TLS certificates, and can work with the Prosody configuration that a Jitsi deployment uses. The Jitsi scalable setup guide warns that building a scalable infrastructure is not a task for beginning Jitsi administrators, and the same caution applies to TURN. Choose an outside partner when the team lacks those skills, when restricted-network testing needs a separate lab, or when you want a fixed-scope handover with documentation.
What must our team provide before the work starts?
Plan to provide DNS access for the names clients will use, the ability to open and test the ports the TURN service needs, and firewall change requests for each network zone. You also need a test network that resembles the restricted environments your users work from, and access to the Prosody configuration so credential integration can be verified against your running Jitsi. Confirm who holds each of these access rights and how long approvals take in your organization.
How does the written scope determine the quote?
DeployOpen works on fixed-scope engagements, so scope, deliverables and timelines are agreed in writing before work starts, and the quote follows from that written scope. The scope should name the network zones, the names and certificates, the Prosody integration, the test networks, the monitoring and the handover documents. Any item left out of the scope is a change to negotiate later. DeployOpen does not publish a price list, so compare quotes by checking that each one covers the same items.
Why must TURN stay closed to anyone without valid credentials?
A TURN server that accepts relay requests from anyone can be used by outsiders to relay their traffic through your bandwidth, so the server must issue and check credentials for each user. Jitsi's ephemeral credential approach through Prosody is meant to give each call a short-lived login, which limits the damage from a leaked value. Ask a partner how the build restricts relayed addresses, enforces time-limited credentials and tests that an unauthenticated request is refused.
What operational risks should we review before accepting a coturn build?
The main risks are an open relay left by a misconfigured credential check, certificates that expire and break TLS-based TURN, firewall rules that block the relay range, and configuration drift after Jitsi upgrades change the Prosody setup. Each risk should have a named owner, a monitoring signal and a test you can repeat. The Jitsi handbook also warns that self-signed certificates cause problems, particularly with mobile clients, so the certificate plan belongs in the review.
How DeployOpen scopes and delivers a coturn setup for Jitsi
DeployOpen approaches coturn for Jitsi peer-to-peer calls as a scoped piece of infrastructure work inside your own network and cloud accounts. We agree the written scope first, then build, test and document the TURN service so your team can run it after handover.
How we scope
- Map which users, networks and call paths currently fail to connect directly and need TURN relay.
- Confirm the Jitsi deployment layout, Prosody credential method, DNS names and certificate sources before any build starts.
- Agree in writing the coturn hosts, ports, TLS settings and relay restrictions that form the fixed scope.
How we build
- Configure coturn with time-limited credentials issued through Prosody, matching the shared secret used by your Jitsi services.
- Open only the ports the design requires, and set peer address and relay limits so the server cannot act as an open relay.
- Test one-to-one calls from inside and outside your network, including a restricted network where direct paths are blocked.
How we hand over
- Document the final configuration, firewall rules, certificate renewal steps and the credential flow between Prosody and coturn.
- Provide a verification checklist your team can rerun after upgrades, certificate renewals or network changes.
- Walk your operators through logs and failure signs so they can spot unauthorized relay use early.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer once the handover is complete.
- Retest the TURN configuration after Jitsi or coturn updates, since the relay and credential settings can change.
- Confirm with your team which support tier, response expectations and update windows fit your environment before signing.

