Mattermost encryption in transit and at rest

How to encrypt every Mattermost connection, from client TLS and proxy traffic to LDAP, cluster gossip and Calls media, and which data-at-rest options to confirm for your deployment.

On this page

Mattermost encryption in transit and at rest: what you need to lock down

A security or platform lead who must show that a self-hosted Mattermost encrypts its traffic and stored data before go-live needs to know that encryption covers several separate connections, each configured in a different place. Client TLS, the link between the reverse proxy and the application server, LDAP over TLS, gossip traffic between cluster nodes, DTLS and SRTP for Calls, and the protection of data at rest are independent controls, so a secure browser connection tells an assessor nothing about the others. For a regulated organization, each link carries something different: user credentials and session tokens on the client path, directory lookups that expose identity data, and message traffic between nodes that holds the same content as the client path.

This page takes each of those connections in turn: client TLS, proxy to application TLS, LDAP over TLS, cluster gossip encryption, DTLS and SRTP for Calls, and the options for data at rest. For each one it explains what to configure, what to verify, and what evidence to keep for a security review. Start by drawing a simple inventory of every network hop between a user and the database, and mark which hops your deployment has and which ones are encrypted today. Confirm the exact setting names and the supported TLS versions against the Mattermost documentation for your server version, since those details change between releases.

DeployOpen configures these controls in your infrastructure, tests them, and documents how each one is set up so your compliance and security teams can review the evidence. DeployOpen does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those determinations, so agree early with your assessor which artifacts they will accept, such as configuration exports, certificate inventories and scan results.

Which encryption control covers which Mattermost connection

This table maps each connection in a self-hosted Mattermost deployment to the encryption control that protects it, where that control is set, and when it fits. Read it row by row against your architecture diagram, and treat any row without a clear owner as a gap to close before go-live. The main takeaway is that TLS on the client path is only one of several connections that need protection.

ConnectionControl and where it is setWhen it fits
Browser or app to serverTLS on the Mattermost server or at the reverse proxy, using your certificate and keyEvery deployment. Mobile and desktop clients depend on this path.
Reverse proxy to Mattermost application serverTLS on the upstream connection, configured in the proxy and the application server settingsWhen the proxy and application server sit on different hosts or networks. Confirm proxy upstream TLS support.
Mattermost to LDAP or ADLDAP over TLS or STARTTLS, set in the AD/LDAP connection settingsAny directory sync or login over a network. AD/LDAP user sync is included from the Professional plan.
Cluster nodes (gossip)Gossip encryption between high availability nodes, set in cluster configurationHigh availability clusters only. Clusters are available on Enterprise and Enterprise Advanced. Confirm the current setting in the HA docs.
Calls media (DTLS and SRTP)Media encrypted with DTLS key exchange and SRTP, with TURN and port design in the networkOnly when Calls is enabled. Confirm TURN and firewall design in the Calls documentation.
Application to PostgreSQLTLS on the database connection, set through the database connection stringAny database on a separate host or network segment. Confirm the TLS mode your PostgreSQL version supports.
Shared file storage in transitTLS to Amazon S3, an S3-compatible service, or NAS mounts, set in file storage settingsRequired for high availability because each node needs the same shared file storage.
Data at rest (database, file storage, backups)Volume, disk, bucket or database encryption at the infrastructure layer, outside MattermostRegulated deployments that need evidence of encryption. Ask your platform team which keys and key owners apply.

How encrypted traffic flows through a self-hosted Mattermost

The diagram starts with users on web, mobile and desktop clients, whose connections terminate TLS at the reverse proxy in the DMZ. The proxy then opens a second TLS hop to the application servers in the internal tier, which reach PostgreSQL, LDAP or Active Directory, and shared file storage. Cluster nodes exchange gossip traffic between themselves, and Calls media takes its own DTLS and SRTP path. Check each hand-off that crosses a trust boundary, since that is where encryption is most often missing.

Trust boundaries and the encrypted hand-offs between clients, proxy, application servers and data services.

Setting up TLS and cluster encryption in the right order

This sequence secures each connection in the order that avoids breaking dependencies, so every hop is encrypted and verified before the next one depends on it.

  1. Inventory every connection and certificate authority

    Before changing any setting, list each network path that carries Mattermost traffic: client browsers and apps to the proxy, proxy to the application server, application server to PostgreSQL, LDAP or Active Directory, storage, cluster nodes talking to each other, and Calls media paths. For each path, record the protocol, the ports, the hostnames, who issues the certificate, and whether the clients trust that authority. Your network or security team owns this inventory, and it is done when every path has an owner, a certificate source and a named check. This list drives every later step.

  2. Terminate client TLS at the proxy

    Configure your reverse proxy or load balancer to accept HTTPS from users with a certificate whose chain every client trusts, including managed desktop and mobile devices. Confirm the Mattermost site URL uses HTTPS so links, SSO redirects and mobile connections all point to the secure address. Verify the result by checking the full certificate chain from a client that has no custom trust store, and by confirming that plain HTTP requests redirect or fail. Your platform team and the proxy administrator own this step.

  3. Encrypt proxy to application server traffic

    If the proxy and Mattermost application servers run on different hosts, encrypt the hop between them with TLS and make the application server trust the internal certificate authority used there. Restrict the application listener to the proxy network so no unencrypted client path bypasses the proxy. The step is complete when a request sent directly to the application server over plain HTTP is refused, and a request through the proxy completes with a valid internal chain. Confirm with your network team which hosts can reach the listener.

  4. Enable TLS to LDAP or Active Directory

    If you use AD or LDAP for login and user sync, switch the directory connection to LDAP over TLS, using either an LDAPS endpoint or StartTLS, and load the directory's certificate authority into the Mattermost server trust store. Avoid simple binds over cleartext. Test with a bind account and a single user lookup before enabling full sync. Verify by confirming the connection succeeds with certificate validation on, and that a deliberately wrong hostname or untrusted certificate causes a failure. Your directory team should supply the CA and confirm the endpoint name.

  5. Enable gossip encryption on high availability clusters

    Mattermost high availability is available on the Enterprise and Enterprise Advanced plans, so confirm your plan before you design a cluster. Each node must mount shared file storage (Amazon S3, an S3-compatible service or NAS) because local file system storage does not work correctly in a cluster and risks corrupting files. Once that storage is in place, enable gossip encryption between cluster nodes using the setting documented for your release, and restart nodes in a controlled order. Verify that all nodes show as healthy in the cluster status and that a message sent on one node appears on another. Your platform team owns this step with the Mattermost cluster documentation for the release you run.

  6. Configure Calls ports and certificates

    Calls uses its own media path, so review the ports and transport modes it needs and apply certificates to the components that terminate them, following the Calls documentation for your version. Keep media encryption on (DTLS for key exchange and SRTP for media) and confirm that TURN or relay services that sit on the path use TLS where they are supported. Check that firewall rules allow only the documented ports. Verify with a test call between two clients on separate networks, and confirm the media path is encrypted using your network tooling. Your voice or network team should own this step.

  7. Verify each hop and record the results

    Run one final check per connection from the inventory: validate the certificate chain and expiry from each client and service, confirm hostnames match, run a connection test to PostgreSQL, LDAP, storage and cluster peers, and confirm plain-text listeners are closed. Record the output, the date and the owner for each path so auditors and your security team can repeat the checks. Schedule renewal dates for every certificate and rerun the checks after each Mattermost upgrade, since monthly releases and ESRs can change defaults. The step is done when every path in the inventory has a passing, dated check.

Data-at-rest options for the database, file storage and backups

Mattermost runs on PostgreSQL, and every message, channel, user record and configuration value you care about lives in that database. Encryption at rest for the database is a platform decision. It is normally provided by the database host, the managed database service or the volume beneath PostgreSQL, not by the Mattermost application. Confirm what your database layer offers before writing the control into your design.

  • Volume or instance encryption: Confirm whether the storage under the PostgreSQL data directory is encrypted, which key manages it, and whether the key can be rotated without downtime.
  • Managed service settings: If you use a managed PostgreSQL offering, check whether encryption is on by default, whether it can be turned on only at creation, and who holds the key.
  • Replicas and standby copies: Read replicas and standby servers hold the same data. Confirm they are encrypted with the same controls as the primary.
  • Logs and temporary files: Query logs, WAL archives and temporary sort files can also contain sensitive content. Ask where they are written and whether they are covered by the same encryption.
  • Key custody: Record who can access the key, how access is audited, and how the key is recovered if the key service fails.

Ask your database vendor or infrastructure team to show the encryption setting on the live instance, not only in a datasheet.

Security and operational risks in encrypted Mattermost deployments

Encryption in transit and at rest only protects a Mattermost deployment while the certificates, ciphers and credentials behind it stay correct. The risks below cluster around who renews what, how keys are stored and rotated, and whether anyone notices when something expires or drifts after an upgrade.

Expired or mismatched certificates

A certificate that expires or does not match the hostname clients use will break web, desktop and mobile sign-in, and users often respond by clicking through warnings or switching to unmanaged paths. Check that each certificate covers the public name, the proxy name and any cluster-facing names, and that the chain is complete. Confirm which certificate each client trusts, especially for mobile apps that may pin or ignore custom authorities.

Deployment planning docs

Weak cipher configuration

Encryption that accepts old protocol versions or weak cipher suites gives a false sense of coverage, and the weakness usually sits in the reverse proxy rather than in Mattermost itself. Review the TLS settings on the proxy and on any load balancer in front of the application servers, and test them from outside the network. Record the accepted protocol versions and suites so the configuration can be compared after each change.

Unencrypted hops inside the cluster

Traffic between the proxy and the application server, between database replicas and the primary, and between cluster nodes can stay in plain text even when client connections are encrypted. Map every hop in a high availability deployment and decide where TLS or gossip encryption applies. Confirm the database connection settings on each node, because a single node left on an unencrypted path can expose the whole data flow.

High availability docs

LDAP bind credentials

The account Mattermost uses to query the directory is a standing credential with read access to user records, and a bind over an unencrypted channel exposes it on the wire. Use a dedicated service account with the narrowest read permissions the sync needs, and confirm that the connection uses LDAP over TLS. Document who can change the bind password and how the change is rolled out to every node.

Key storage and rotation

Private keys, certificate files and database encryption material need a defined home, restricted file permissions and a rotation process. Keys copied to shared drives, chat exports or configuration repositories are a common source of exposure. Ask who holds each key, where backups of keys are kept, how a compromised key is replaced on every node and proxy, and how the old material is destroyed.

Renewal ownership and evidence

Certificate expiry is most often missed when no named team owns renewal across the proxy, the server, the mobile trust configuration and the directory connection. Assign an owner for each certificate, a calendar entry before expiry and a test after every Mattermost upgrade, since monthly releases can change how the server reads certificate settings. Keep dated records of renewals, configuration exports and test results so an assessor can trace each control to evidence.

Server releases page

How much effort does encrypting Mattermost take and what do you need to provide?

What drives the effort of encrypting a Mattermost deployment?

The effort scales with the number of encrypted connections you must cover and how many components sit behind them. Each client path, reverse proxy hop, LDAP or AD connection, database connection, and cluster node adds certificates, trust chains and configuration to test. Existing PKI matters a great deal: a mature internal certificate authority with automated issuance and renewal shortens the work, while building issuance and renewal from nothing lengthens it. Your choice of proxy, cluster size and whether you run Calls also change the scope. Ask for a written list of every connection in scope before agreeing on effort.

Can our internal team encrypt Mattermost without outside help?

Often yes, if your team already operates TLS certificates, a reverse proxy and directory integration, and has a test environment to validate changes before production. The harder parts are usually coordination and verification: confirming that every hop uses current protocols, that trust chains validate on every client platform, and that certificate renewal will not cause an outage. If those skills are thin, or the deployment spans a cluster with shared storage, an outside team can take on the build and handover. Decide based on who will renew certificates and check the configuration after each Mattermost upgrade.

What do we need to provide before encryption work starts?

The work depends on access and accurate information. Typically you provide:

  • Access to your certificate authority or the process to request certificates, including who approves them
  • Network diagrams showing the proxy, application servers, database, directory and cluster traffic
  • Storage details, including whether shared files sit on Amazon S3, an S3-compatible service or NAS, and how each node mounts them
  • An LDAP service account with the permissions needed for directory queries, plus the directory's certificate chain
  • Test environments and a change window for production

Confirm these items with your own teams before scoping, since gaps here are the most common cause of delay.

How long does it take to encrypt a Mattermost deployment?

Duration depends on the environment, the number of connections in scope, how quickly access and approvals arrive, and how many test cycles your change process requires. A single-server deployment behind one proxy is a different job from a clustered deployment with directory sync, database replicas and Calls. DeployOpen does not publish durations. For a fixed-scope engagement, the timeline is agreed in writing with the scope, and the written scope should state which dependencies, such as certificate approvals or client-side testing, sit on your side.

Does encrypting Mattermost make us compliant?

No. Encryption in transit and at rest is one set of controls among many. Whether it satisfies a framework depends on how your organization scopes the system, what policies and records support it, and what an independent auditor or certification body concludes. DeployOpen prepares systems, configuration and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Ask your assessor early which evidence they expect, such as configuration exports, certificate inventories and key management records.

What does a DeployOpen encryption engagement produce?

A DeployOpen engagement is fixed-scope, with deliverables agreed in writing before work starts. Deliverables typically include the configured encryption paths in your infrastructure, a connection inventory, certificate and renewal procedures, verification results for each in-scope connection, and operating notes for your team. The work runs in your cloud accounts, data centers or air-gapped network. Ongoing upgrades, renewal support and continuous testing can be covered by a retainer. The written scope defines exactly which connections and components are included.

What should we ask for in a quote for this work?

Ask the provider to break the quote into the components in scope: client TLS, proxy to application server TLS, LDAP over TLS, cluster gossip encryption, Calls, and data at rest. For each, ask what is one-time work and what recurs, such as certificate renewal and post-upgrade checks. Ask what assumptions the quote makes about your certificate authority, storage and directory, and what changes would reopen the price. Confirm who performs verification, how findings are reported, and what happens if a connection fails testing.

What to ask for in a quote for encryption work

A quote for Mattermost encryption work should break the effort into the components that actually change how the server is built: planning of the certificate authority, trust chains and which connections are in scope; certificate and PKI integration for client TLS, the reverse proxy to application server link, and LDAP over TLS; proxy and cluster configuration, including gossip encryption between nodes; Calls network work covering DTLS and SRTP; and verification and evidence. DeployOpen does not publish prices, and a quote follows from the written scope, so the scope itself is what you are buying. Ask for each component as a separate line with its deliverables, and ask which items assume an existing internal CA and which create one.

Some costs are one-time and some recur. Initial configuration, the first set of test results and the evidence pack are one-time. Certificate renewal, rotation of cluster and LDAP trust material, and retesting after each Mattermost server upgrade recur, and the upgrade cadence follows the monthly releases and Extended Support Releases described in the upgrade planning guidance. Ask the quote to state whether renewal automation is included, who owns the renewal runbook after handover, and whether retesting after upgrades is covered by a retainer or billed per event. Also confirm whether the Calls work includes TURN configuration, since that changes the network scope considerably.

Before you accept a quote, confirm in writing: the list of connections in scope with their endpoints, the TLS versions and cipher policy your security team will accept, which data-at-rest option is in scope (database and file storage encryption are usually managed outside Mattermost, so confirm the storage layer and key custody), who holds the keys, what evidence is delivered and in what format, and what happens if a finding needs a fix outside the agreed scope. Confirm with Mattermost which of these features your plan includes before the work starts, using the Mattermost pricing page as the starting reference. A scope that answers these questions can be priced and checked without guesswork.

How DeployOpen delivers Mattermost encryption in your infrastructure

DeployOpen plans, builds and documents Mattermost encryption in transit and at rest inside your own cloud accounts, data centers or air-gapped networks. The work is scoped in writing first, so your security, network and compliance teams agree on every connection and key before anything changes.

How we scope

  • Inventory every connection: client TLS, proxy to application server, LDAP, cluster gossip, and Calls media.
  • Agree in writing which certificates, certificate authorities and key stores each path will use.
  • Confirm your plan level, since high availability and FIPS 140-3 compliance sit on Enterprise and above.

How we build

  • Configure TLS on the reverse proxy and the Mattermost server with certificates from your authority.
  • Enable encryption for cluster gossip and TLS for LDAP connections to your directory.
  • Document data-at-rest options for the database and shared file storage, and test each path.

How we hand over

  • Deliver a connection map showing protocol, port, certificate owner and renewal process for each path.
  • Provide verification steps your team can rerun, including certificate expiry and cipher checks.
  • Record configuration changes and runbooks so operators can rotate certificates without a rebuild.

How we support

  • Engagements are fixed-scope, and ongoing support is available as a retainer for upgrades and renewals.
  • Plan retesting after each Mattermost monthly release or Extended Support Release upgrade.
  • Retest encryption settings after infrastructure changes, such as a new proxy, database or storage service.

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.