Mattermost Calls network ports, STUN and TURN

Mattermost Calls network planning depends on where your users sit, which ports reach the media service, and whether a STUN or TURN path is needed. This page explains each decision and what to confirm before you open firewall rules.

On this page

How Mattermost Calls network ports, STUN and TURN fit your network

Plan the firewall rules, public addresses and relays for Mattermost Calls before you deploy the media service. Calls traffic has three parts: the media service that carries audio and video, the STUN service that helps clients discover their public address, and an optional TURN relay that carries media when a direct path is blocked. Port 8443 over UDP and TCP is the path clients use to reach the media service, and the STUN and TURN decisions depend on where your users sit relative to that service. Treat this section as a map of the elements, and treat the port numbers and service roles as provisional until you check them against the Mattermost Calls documentation for the exact version you run.

Mattermost Calls is designed so that most users on a corporate network can reach the media service directly. STUN lets a client learn the public address its traffic appears to come from, which matters when the media service sits behind NAT or when clients are outside your perimeter. TURN is a relay: it forwards encrypted media between participants when no direct path can be established, usually because of restrictive firewalls or proxies. Each element adds an exposure point, so the question is not whether to open everything but which paths your users actually need. Confirm with the Mattermost documentation whether the STUN service is reached over the public internet in your release, and whether your network needs an internal alternative.

Which network path each Mattermost Calls option needs

This table compares four ways clients can reach the Calls media service: direct UDP and TCP 8443, Mattermost STUN for public address discovery, a TURN relay, and private addresses for internal-only use. Read each row by first checking the network condition, then the ports and extra infrastructure it adds, then the trade-off. Confirm every port beyond UDP and TCP 8443 in the Mattermost Calls documentation before you write firewall rules.

Network pathNetwork condition it fitsPorts, services and added infrastructureMain trade-off
Direct UDP and TCP 8443Clients can reach the media service directly, either on the same internal network or through firewall rules that allow the traffic end to end.UDP and TCP 8443 to the media service. Needs firewall rules and, on Kubernetes, a UDP-capable load balancer (confirm the annotations in the Calls docs).Fastest and simplest path, but it fails for users behind firewalls or proxies that block UDP or the required TCP traffic.
Mattermost STUN for public IP discoveryClients sit behind NAT and need to learn the server's public address so media can reach it.Outbound access from the Calls host to the Mattermost STUN service. Confirm the STUN port and the exact endpoint in the Calls docs.Adds a dependency on an external service, and it cannot be used in networks with no internet access.
TURN relayUsers sit behind restrictive firewalls or proxies that block direct media, so traffic must be relayed through a reachable server.A TURN server with public reachability, credentials and its own relay ports (confirm the port range in the Calls docs). Adds a server to deploy, patch and monitor.All relayed media passes through the relay, which adds bandwidth use, latency and another service to size and operate.
Private addresses (internal only)The media service and all participants are on a private network with no internet access and no remote users.UDP and TCP 8443 inside the internal network, with no public STUN. Needs internal DNS and routing that match the addresses clients see.Simple to secure, but external and remote users cannot join, and address mismatches cause calls to fail without an obvious error.

How a call's media path crosses your network

The diagram starts with a client on the corporate network and a client behind a restrictive firewall, both signaling through the Mattermost server in the internal network. Media is handled by the Calls media service in the DMZ, which the internal client reaches directly. The client behind the restrictive firewall may need a path through the internet, shown as an optional STUN lookup for public address discovery and an optional TURN relay when direct media is blocked. Check which trust boundary each flow crosses and whether UDP is permitted before deciding whether a relay is needed.

Signaling and media paths across internet, DMZ and internal network trust boundaries.

When STUN and TURN are needed by network environment

When users sit on a network with direct UDP paths to the media service and no address translation between them and it, clients usually connect without a relay. Public IP discovery through STUN matters mainly when the media service sits behind NAT and clients must learn the address the other side sees. Test the direct path first, then add components only where a test fails.

  • Direct paths: Confirm that UDP and TCP 8443 are allowed from user subnets to the media service address.
  • STUN need: Public IP discovery is needed only when the address clients reach differs from the address the media service advertises.
  • TURN need: A relay is usually unnecessary here. Add one only if a pilot shows calls failing for a defined group of users.
  • Load impact: With no relay, media flows directly between endpoint and service, so there is no extra relay bandwidth and no added hop.
  • Test: Place a call between two desktop clients on different subnets, then check the connection path reported in client or server logs, if your version exposes it.

Confirm that a call between two sites connects directly and that no relay appears in the media path before you close the design.

How media encryption protects Mattermost Calls traffic

Media encryption in Mattermost Calls protects the audio and video streams that flow between participants and the media service, but it does not hide everything about a call. The first step in your security review is to separate two kinds of traffic. Signaling is the control traffic that sets up, joins and manages a call, and it travels through the Mattermost server and the Calls plugin. Media is the live audio, video and screen-share data that passes between clients and the RTCD media service on UDP or TCP 8443. Your review should record how each path is protected, because the controls, certificates and reviewers involved are often different for each.

Do not assume the encryption mechanism from general knowledge or from this page. Check the official Calls documentation for the exact protocols, key handling and whether media is protected end to end or only hop by hop through the media service. Then confirm the answer in your own environment with a packet capture taken during a test call between two clients, one on the internal network and one behind the TURN relay if you deploy one. In the capture, confirm that the payload is not readable as plain audio or video, that the expected ports are the only ones in use, and that signaling requests to the Mattermost server use HTTPS. Keep the capture, the test date, the Mattermost server version and the Calls plugin version together as evidence.

Encryption does not protect the metadata of a call. A network operator, cloud provider or anyone with access to flow logs can usually see which client addresses connected, which ports and transports were used, when the call started and ended, roughly how much data moved, and which server or relay handled it. If you run a TURN relay, the relay also sees the addresses on both sides of the connection. Encryption also does not protect the endpoints: a compromised client, a modified browser extension or a host with recording software can capture media before or after it is encrypted. Record these limits in your security review, along with who can read the flow logs, how long they are kept, and whether call recording or transcription, which is handled by a separate service, changes the data your organization stores.

Planning Mattermost Calls network ports before deployment

This sequence turns user locations and network controls into a tested plan for UDP and TCP 8443, STUN and TURN before any Calls component is installed. The output is a documented set of firewall rules, addressing decisions and test results that the deployment team can build against.

  1. Inventory user locations and network controls

    The network or security team lists every place Calls users will connect from: head office, branches, remote staff, VPN pools, contractor networks and any segment with a proxy or egress allow list. For each location, record whether outbound UDP is permitted, whether TCP 443 passes through an inspecting proxy, and which firewalls or NAT devices sit between users and the Mattermost server. Confirm the list with the firewall owners, not from memory. The step is complete when every user segment has a row showing its outbound UDP and TCP policy and the device that enforces it.

  2. Confirm server and Calls versions against the release schedule

    The platform owner records the Mattermost server version in use or planned, and the Calls plugin and RTCD versions that will be deployed alongside it. Check the version against the server releases page, noting whether it is a monthly release or an Extended Support Release and when its support ends. Network rules depend on the component layout for that release, so confirm the port and service documentation for the exact versions you will run. The step is complete when a signed-off version matrix exists and nobody is planning against an out-of-support release.

  3. Decide on public IP discovery and TURN

    Decide whether clients need the Mattermost STUN service to learn their public addresses, or whether they can reach the media service directly on the local network. Where users sit behind restrictive firewalls or proxies that block direct UDP, decide whether a TURN relay is required and where it will be hosted. Document the decision per user segment, because an internal-only pilot and a remote workforce often need different answers. Ask the vendor or your deployment partner to confirm the current STUN and TURN requirements for your chosen version. The step is complete when a written decision exists for each segment, with a named owner for any relay.

  4. Map firewall rules and load balancer exposure

    Translate the decisions into a firewall change request covering UDP and TCP 8443 to the media service, plus any STUN or TURN ports chosen in the previous step. Specify source ranges, destination addresses, direction and whether the traffic traverses a load balancer, since UDP handling differs between load balancer types. Limit exposure to the segments identified in the inventory and avoid opening ports to all sources by default. The step is complete when the change record lists each rule with source, destination, protocol and port, and the firewall reviewer has approved it.

  5. Set private addresses where the network is internal

    For deployments where all users and the media service sit on internal networks, configure the media service to advertise private addresses and skip public IP discovery. Confirm that clients on each internal segment can route to those private addresses and that no hostname resolves to a public address by mistake. Note the advertised addresses in the configuration record so later changes to DNS or NAT do not silently break calls. The step is complete when a configuration review confirms the advertised addresses match the internal routing table.

  6. Test from representative user networks

    Run test calls from a machine on each representative segment, including one behind the most restrictive firewall or proxy in the inventory, a remote laptop on a home network and a VPN client. Verify that audio and screen sharing establish, record which path media takes, and check that a blocked segment fails in the expected way. Test again after any firewall or load balancer change. The step is complete when each segment has a dated test record with pass or fail results, and any failing segment has either a TURN decision or an accepted limitation signed by the business owner.

Security risks in exposing Mattermost Calls ports

Mattermost Calls adds media paths that sit outside the main server, so each exposed port, STUN endpoint or TURN relay widens what an attacker can reach. The cards below pair each exposure with the control that limits it and the evidence worth keeping for your security and compliance reviews.

Limit exposure of the media service

The media service receives UDP and TCP traffic on port 8443 from users' browsers, so it is the component most directly reachable from the internet. Confirm that only the ports your design requires are open at the firewall and load balancer, and that nothing else on the host listens on the same interfaces. Test from outside your network after every change, because a single permissive rule can expose the whole media path. Document the allowed source ranges as part of your change record.

Deployment planning docs

Control access to public STUN or TURN

A public STUN or TURN endpoint can be discovered and queried by anyone who knows its address, and a TURN relay that accepts unauthenticated allocations can be abused to carry arbitrary traffic. Require that credentials are issued only to authenticated Mattermost users, use short-lived credentials where your TURN software supports them, and restrict relay allocations by address range and bandwidth. Ask your team to confirm how each credential is generated and how quickly it expires.

Log and monitor relay traffic

Relay traffic leaves your Mattermost server boundary, so without logs you cannot tell normal call setup from misuse. Enable connection and allocation logging on the TURN and media hosts, forward it to your central log platform, and alert on unusual volumes, allocations from unexpected networks, or spikes in failed authentication. Agree on retention with your security team before go-live so the logs exist when an incident review needs them.

Patch Calls components with the server

Calls components such as the RTCD media service and the Calls plugin are released separately from the Mattermost server, so a server upgrade does not guarantee that they are current. Mattermost publishes server releases monthly, and the supported version of each component must be tracked with the same change calendar. Build a checklist that covers the server, the Calls plugin, RTCD and any TURN software, and verify compatibility before each upgrade window.

Server release schedule

Review the trust boundary in a DMZ

When a TURN relay sits in a DMZ, it is the bridge between untrusted internet clients and your internal network, so a compromise there can become a pivot point. Restrict the relay's outbound connections to the internal addresses it truly needs, and deny direct access from the relay to databases and management networks. Review the firewall rules against a written data flow diagram, and have a second engineer confirm them before production use.

Document encryption behavior for audit evidence

Reviewers will ask whether call media is encrypted between clients, the media service and any relay, and which parts of that path your organization controls. Record how the Calls components negotiate encryption, which certificates and ciphers are in use, and where any decryption or recording happens. Ask Mattermost and your vendors to confirm these details in writing for your version, because the answers must match what you test rather than what you assume.

What do buyers ask about Mattermost Calls network planning?

Is a TURN server always required for Mattermost Calls?

No. A TURN relay is needed only when some users cannot reach the media service directly, for example users behind restrictive corporate firewalls or proxies that block the UDP and TCP paths Calls uses. Before deciding, test Calls from the networks your users actually work on, including remote and mobile connections, and note which ones fail. If every user can reach the media service on UDP or TCP 8443, a relay adds cost and operations work without solving a problem you have. If some cannot, the relay is an additional server to size, place, secure and monitor. Ask the partner to state in the written scope which networks will be tested and what result will trigger a TURN build.

What does network planning for Mattermost Calls involve, and who should attend?

Planning covers the path from each user network to the media service, the ports and protocols allowed at each firewall and load balancer, whether the Mattermost STUN service is needed for public IP discovery or private addressing is used instead, how media is encrypted in transit, and where any relay would sit. The people who should be in the room are the network or firewall team, the platform or Kubernetes owners if the media service runs there, the Mattermost administrator, and a security reviewer who will sign off on exposed ports. Ask for a written list of firewall changes and an owner for each one, so the work does not stall between teams.

What drives the length of a Calls network review?

The main drivers are the number of network zones and remote access paths, how many firewalls, proxies and load balancers sit between users and the media service, and whether your change process needs formal approvals for each rule. Access to test users on each network and to firewall change records also affects the schedule. A simple, single-site deployment with open internal paths takes far less time than a multi-region estate with proxies and strict egress rules. Ask the partner for a timeline tied to these specific inputs, and for the dates they depend on from your side.

Can our own team do the Calls network work in-house?

Often yes, if you have engineers who understand firewalls, UDP behavior, load balancing and TLS, and time to test calls across every user network. The work is mostly verification and rule changes rather than new software. The risks are gaps in testing, opening more ports than needed, and missing a remote or mobile path that only fails under real use. An outside partner is most useful when the network is complex, the change must pass a formal security review, or your team has no capacity to run tests. Whichever route you take, ask for the port matrix, test results and a rollback plan in writing.

What does the partner need from our side to start?

The partner needs a current network diagram, the firewall and proxy rule sets that apply to Calls traffic, the Mattermost server and media service hosting details, your DNS and TLS certificate arrangements, and a list of user networks to test. They also need named contacts with authority to approve rule changes and a test window that does not disrupt live calls. Access to a non-production Mattermost environment makes testing safer. Missing any of these items usually extends the review, so confirm the inventory is complete before the scope is signed.

What changes when we upgrade Mattermost and Calls?

Upgrades can change how Calls connects, so the network plan should be checked against each new server or plugin release. Mattermost publishes server releases monthly, and Extended Support Releases follow a longer schedule, so the cadence you choose determines how often the network checks repeat. Confirm the required ports and component versions for the target release before upgrading, and retest calls from your key user networks afterward. Ask the partner whether the written scope includes regression testing after upgrades, and whether it is a one-time review or part of a retainer.

What to confirm in your environment before opening ports

Mattermost Calls depends on network paths that vary by version, plan, deployment model and site policy. The cards below list what to verify before a firewall or load balancer change is requested, and where the authoritative answer lives for each check.

Port and service requirements for your version

Confirm the exact ports and protocols your Calls version and media service expect, including the UDP and TCP 8443 media path and any internal API port the Mattermost server uses to reach the media service. Port requirements can change between releases, so check them against the version you will run, not a version you remember. Record each flow as source, destination, protocol and port in your change request.

Deployment planning docs

Calls features in your plan and model

Check that your Mattermost plan and deployment model include the Calls capabilities you need before you design the network around them. Plan levels and deployment options are documented on the pricing page and change over time, so confirm them with Mattermost sales or against the current pricing page. A design built for a feature your plan does not include will be rebuilt later.

Mattermost pricing

Firewall and proxy handling of UDP

Test how your perimeter firewalls, NAT devices and web proxies treat UDP traffic and stateful inspection of media flows. Many corporate networks allow only TCP outbound through proxies, which can block media even when the server ports are open. Run a test call from each user segment, including remote and guest networks, and record which paths succeed.

Load balancer UDP behavior

Confirm whether your load balancers and ingress controllers can forward UDP, how they handle session affinity and health checks for media services, and whether cloud annotations are required. A load balancer that only forwards TCP will silently break media while signaling still works. Ask your platform or cloud team for a written statement of UDP support for the exact product and tier you plan to use.

Air-gapped or restricted network status

Determine whether the environment has any internet egress, because that decides whether public STUN can be used and whether a relay must be hosted internally. Air-gapped sites need private addressing and offline components, and the design differs from an internet-connected site. Document the network zone, egress rules and who approves exceptions before selecting an address model.

Public STUN use under your policy

Check whether your security and data protection policy allows clients and servers to contact a public STUN service for address discovery, and which third-party service, if any, is approved. STUN sends the public address of the caller to that service, so the decision belongs to security and privacy owners, not only the network team. Get a written decision before the firewall rule for outbound STUN is requested.

How DeployOpen plans Mattermost Calls networks

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For Mattermost Calls, that means working out the port, STUN and TURN design for your network before any firewall rule or load balancer is changed, then handing over a design your network and security teams can review.

How we scope

  • Engagements are fixed-scope, with scope and deliverables agreed in writing before work starts.
  • We map which users reach Mattermost from inside the network, from remote locations and through proxies, and where those users sit.
  • We confirm whether UDP and TCP 8443 to the media service can be opened, and record any path that cannot be opened.

How we build

  • We design the STUN and TURN approach for your addressing, including whether public IP discovery or private addresses apply.
  • We document firewall and routing rules for the media service, the Calls plugin path and any relay, and test each one from real client networks.
  • We check how media encryption is handled in transit and record which parts of the setup you need to confirm with Mattermost.

How we hand over

  • You receive a written network design with port tables, data flows, trust boundaries and the reasons behind each choice.
  • We provide test results from each client location, showing which call paths connected and which fell back or failed.
  • Your team receives a runbook for changing rules, rotating relay credentials and checking connectivity after upgrades.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering network changes and new Mattermost releases.
  • We retest call connectivity after firewall, proxy or addressing changes so that regressions are found before users report them.
  • Support covers the network layer only where it is agreed in scope, and we confirm any dependency on other Calls components in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.