Which Mattermost ports to open and why firewall planning comes first
A security or network team must approve firewall rules before a self-hosted Mattermost goes live, so the inbound and outbound paths need to be written down first. Mattermost runs as a single Linux binary with PostgreSQL as its database, and the rules you need depend on the shape of the install: a single server, a server behind a reverse proxy, or a clustered high availability deployment. Each shape exposes a different set of ports, so start by confirming which topology you are approving, then list every path against it. Outbound proxy placement follows from the same list.
On a single server, the inbound ports to plan for are 80 and 443 for browser and client traffic, and 8065, the port the Mattermost application listens on by default. Where a reverse proxy or load balancer terminates TLS in front of the server, users reach the proxy on 443 and the proxy reaches Mattermost on 8065, so the firewall rule for 8065 may only need to allow the proxy host. Port 8074 carries cluster gossip between application nodes and only matters in a high availability cluster, which is available on the Enterprise and Enterprise Advanced plans. Port 8067 serves metrics, so it should be restricted to your monitoring hosts rather than opened broadly.
Every port on the list needs a documented owner: a named team that approves it, operates the service behind it, and removes the rule when the service is retired. Ask the proxy team to own 443 and any proxy-to-application rule, ask the platform team to own 8074 and cluster node addresses, and ask the observability team to own 8067 and its scrape source. Confirm each port number against your installed version and configuration file before the change request is filed, because defaults can be changed in the deployment. The Mattermost server deployment planning guide is the natural starting point for the topology decision.
Inbound and outbound traffic Mattermost needs
Users reach Mattermost through the browser, desktop and mobile apps, and administrators reach the System Console and API at the same web address. Inbound rules should allow only the sources your policy names, and where TLS terminates decides which ports face those sources.
- Port 443: HTTPS for users, admins, API clients and WebSocket connections when TLS terminates on the server or on a proxy in front of it.
- Port 80: HTTP, normally used only to redirect clients to HTTPS and for any certificate validation your TLS method requires.
- Port 8065: the Mattermost application listener. When a reverse proxy or load balancer sits in front, forward to this port from that device and keep it closed to general user networks.
- Port 8067: the metrics endpoint. Allow it only from your monitoring systems, and leave it out of any rule that covers user traffic.
Confirm which of these ports your firewalls, load balancers and proxy actually expose, and document which networks may reach the administrator path.
Cluster traffic applies only when you run a high availability cluster, which Mattermost documents for the Enterprise and Enterprise Advanced plans. Application servers in the cluster use port 8074 to communicate with each other, so that path must stay open between every node. Mattermost does not require this rule for a single-server installation, and you should not open it on a standalone server without a reason documented in the high availability guidance.
- Port 8074: gossip traffic between cluster nodes, allowed only between application servers in the same cluster.
- Shared file store access: each node needs its own route to the shared storage, whether that is S3, an S3-compatible service or a NAS mount.
- Database reachability from every node: each node connects to the primary database and to any configured read replicas, so the rule must cover every node, not only the first one.
- Load balancer health checks: the balancer reaches each node on the application port, which is a separate rule from node-to-node traffic.
- Segment crossings: every time cluster traffic crosses a network segment or zone boundary, that crossing needs its own documented rule.
Confirm your cluster layout against the Mattermost high availability cluster deployment guide before opening port 8074 in any zone.
Every Mattermost application server makes outbound connections to its PostgreSQL database, and any server that stores attachments in object storage makes outbound calls to that storage. These paths carry message data and files, so they are often the most sensitive outbound rules in the design. The ports depend on the products you run, so record them from your own configuration and do not assume defaults.
- PostgreSQL: outbound from each application server to the database host on the port your PostgreSQL service listens on, with the primary and each replica listed as separate endpoints.
- Read replicas: if you add replicas for scale, every node needs a route to each replica it is configured to use.
- S3 or S3-compatible storage: HTTPS calls from each node to the storage endpoint, including any regional or private endpoint your provider assigns.
- NAS shares: where file storage sits on a NAS, the mount traffic between nodes and the file server is internal traffic that your storage team must confirm and document.
- Managed database and storage services: if a cloud provider runs the database or bucket, confirm the private endpoint names and whether any traffic leaves your network boundary.
Confirm each destination hostname, port and routing path with the team that owns the database and storage, and check that the rules match the settings in your Mattermost configuration.
These are outbound calls that Mattermost makes when a feature needs them. Directory sync and some sign-in flows depend on LDAP or Active Directory reachability, notifications depend on an SMTP relay, and mobile alerts depend on a push path. Each of these can fail without an obvious error to users, so each destination needs a named owner and a test from the application server itself.
- LDAP or Active Directory: outbound from the application servers to your directory controllers for user sync and login, on the port and encryption your directory team approves.
- SMTP relay: outbound from the servers to your mail relay for notifications and account emails, with the relay configured to accept the sending addresses Mattermost uses.
- Identity provider endpoints: SAML or OIDC metadata, token and key endpoints must be reachable from the server for sign-in to complete.
- Push notifications: confirm in the current Mattermost documentation whether your mobile setup requires an outbound route to a push service, and which destinations it uses.
- Plan availability: according to the Mattermost pricing page, AD/LDAP user sync is included from the Professional plan, so confirm your plan before you finalize the directory rules.
Test each path from the application server, and record the owner, port and destination for every rule in your change record.
How users, proxy, Mattermost nodes and dependencies connect
Users reach a reverse proxy or load balancer on 443, which forwards to Mattermost application nodes on 8065. Nodes talk to each other over gossip on 8074 and expose metrics on 8067 to your monitoring. Outbound calls to PostgreSQL, LDAP, S3-compatible storage, SMTP and push services cross the trust boundary, and may pass through an optional outbound HTTP proxy. Check each arrow against your firewall rules, and confirm which ports your chosen deployment actually uses.
Inbound user traffic, internal node traffic and outbound dependencies, with the trust boundary around your network.
How to route outbound HTTP through a proxy
This sequence moves Mattermost's outbound HTTP calls through your proxy in a controlled order, so each destination is inventoried, approved, configured and tested before go-live. The result is a server that reaches the services it needs through the proxy and nothing else.
Inventory every outbound HTTP destination
The Mattermost administrator lists every service the server calls over HTTP or HTTPS, including push notification relays, S3 or other object storage endpoints, SMTP relays, OAuth and SAML identity providers, outbound webhooks, plugin marketplace and update checks, and any AI or LLM providers if those features are enabled. Record the host name, port and the feature that causes each call. Confirm with the Mattermost documentation for your release which features make outbound calls. The step is done when the list is complete and each entry names an owner and a purpose.
Confirm allowed destinations with the proxy team
The platform owner sends the inventory to the team that manages the proxy and asks which destinations the proxy permits, which it blocks, and which require a rule change. Ask whether the proxy inspects TLS, whether it needs authentication, and whether internal host names bypass it. Note any destination that will be refused, because that feature will fail until a decision is made. The step is done when every entry has a written allow, deny or exception answer from the proxy owner.
Confirm the proxy configuration keys for your release
Before editing anything, the administrator checks the official Mattermost server configuration documentation for the exact proxy-related settings in the release being deployed, including how the server reads proxy addresses, which traffic it applies them to, and how a no-proxy list is expressed. Do not rely on settings copied from older guides or forums. The step is done when the team has a short note of the confirmed keys and the release they apply to.
Configure the server proxy settings
The Mattermost administrator applies the confirmed proxy settings to a staging server first, using the configuration method the deployment already uses, such as the configuration file, environment variables or the System Console. Add the internal destinations that must bypass the proxy to the no-proxy list. Keep a copy of the previous configuration so the change can be reverted. The step is done when the server starts cleanly with the new settings and the configuration change is recorded in change control.
Check that the server uses the proxy
Before testing features, the administrator reviews the proxy access logs for a short window while the server runs its normal background activity, and confirms that requests to approved external hosts arrive at the proxy and that internal addresses do not. If requests appear that should have been routed through the proxy but were not, the configuration is wrong and must be corrected before continuing. The step is done when the proxy log matches the approved destination list.
Test each integration path
For each entry on the inventory, the owner runs a test that exercises the feature end to end: sending a test email through the SMTP relay, uploading and downloading a file to object storage, signing in through the identity provider, delivering an outbound webhook, and sending a mobile push notification if push is in use. Record the result, the time and the proxy log entry for each test. Test denied destinations as well, so the team sees exactly how the feature fails. The step is done when every integration has a passing result or a documented, accepted failure.
Document the final route and review changes
The administrator updates the destination inventory with the confirmed proxy rules, test results and owners, and sets a review trigger for changes to the proxy policy and for each Mattermost upgrade, since new releases can add or change outbound calls. Store the document with the runbook. The step is done when the inventory reflects the live configuration and the proxy team and Mattermost owners have both signed off.
Where firewall plans for Mattermost usually fail
Most Mattermost firewall problems come from treating the platform as a single web port. The server also talks to a database, object storage, directory services, mail relays and push gateways, and its cluster and metrics ports must stay private. Each card below names a failure, the symptom it produces and the check that catches it before users do.
Metrics and gossip ports exposed
Port 8067 serves metrics and port 8074 carries cluster gossip between high availability nodes. A rule that opens the whole server to the user network, or a proxy that forwards every path, can expose both. The symptom is often silent: metrics are readable from a browser, or nodes appear to join a cluster from outside your data plane. Check from a user subnet and from the internet that these ports do not answer, and confirm that the proxy forwards only the application paths you intend.
HA cluster docsDatabase and object storage egress blocked
Application servers must reach PostgreSQL and, for file storage, Amazon S3 or an S3-compatible endpoint. Teams often open ports for the web tier and forget that application nodes initiate these connections, so outbound rules from the app subnet are the gap. The symptom is a server that starts and loads a login page but fails on message history, uploads or downloads. Check each node from its own network position with a connection test to the database host and the object storage endpoint, using the ports your providers document.
Push, SMTP and directory paths forgotten
Notifications, password resets, invitations and directory sync each use a separate outbound path: an SMTP relay for email, LDAP or AD for user sync, and push notification services for mobile and desktop alerts. These are usually configured in the console long after the firewall ticket closed. The symptom is that chat works while email never arrives or new users cannot sign in. Check each path by triggering a test email, a directory sync and a mobile notification, then confirm the rule that allows it is documented against the specific destination.
WebSocket traffic broken at the proxy
Real-time messaging depends on WebSocket connections that stay open for long periods. A proxy or load balancer with short idle timeouts, missing upgrade headers or buffering enabled on those paths will drop connections and fall back to unreliable polling. The symptom is messages that arrive late, typing indicators that stop, or users who must refresh to see new posts. Check by holding a client open for a long idle period and sending messages from a second client, then review the proxy timeout and upgrade configuration against the Mattermost proxy guidance.
Local file storage assumed in HA
A high availability cluster needs shared file storage on Amazon S3, an S3-compatible service or a NAS mounted on each node. Local disks on separate application servers look equivalent on a diagram but will not work correctly and risk corrupting files. The symptom is an upload that succeeds on one node and returns a missing file when another node serves the request. Check by uploading on one node and downloading through each other node, and confirm the storage backend before the cluster goes live.
HA cluster docsHow to restrict ports and separate trust zones
Keep only the public entry point reachable from outside, and keep the metrics port and cluster gossip port on internal networks. A Mattermost deployment on a single server exposes the application on 8065, and the proxy in front of it should be the only listener on 80 and 443 that users reach. The metrics endpoint on 8067 exposes operational detail that monitoring systems need but users and the internet do not, so the firewall should allow it only from the monitoring host. In a high availability cluster, gossip traffic on 8074 moves cluster state between application nodes, so it belongs on a private segment shared only by those nodes. Confirm the current port roles in the server deployment planning docs before writing rules, since a port change in a later release would otherwise leave a gap.
Limit database and directory access by source address rather than by open network range. PostgreSQL should accept connections only from the Mattermost application nodes, which means the pg_hba.conf entries and the cloud security group both name those addresses. The same approach applies to LDAP or AD, where the Mattermost nodes should be the only hosts permitted to bind to the directory, and to S3 or NAS endpoints used for shared file storage. Write these as explicit rules with a named owner, because a broad database rule added during troubleshooting often stays in place for years. Treat the proxy as the single public entry point, and log every request it forwards so that a support question can be traced to a timestamp, a source and a path.
Outbound traffic needs the same discipline. Route outbound HTTP through a forward proxy where your design calls for one, and block direct egress from application nodes to everything else. Keep a register of each approved outbound destination, including SMTP relays, push notification services, S3 endpoints, identity providers and any integration hosts, with a named owner and a review date. Ask the owner to confirm each entry at every review and remove entries that no longer have a purpose. Retain proxy and firewall logs for a period your security and compliance teams set, and test that alerts fire when a node attempts an unlisted destination. The register and the logs together are what an assessor or incident responder will ask to see first.
Security and operational considerations for network rules
Port rules for Mattermost are only as good as the process that maintains them. The cards below cover how to scope egress, separate admin paths from user paths, protect each hop, watch for blocked traffic, control changes and keep documentation matched to each upgrade.
Least-privilege egress
Start from the destinations Mattermost must reach, not from an open outbound rule. These usually include the PostgreSQL host, the object store endpoint, the LDAP or AD controller, the SMTP relay, and any push or plugin endpoints you enable. Each rule should name a host, a port and a reason. Ask your team to confirm which outbound features are switched on in your environment, because an unused integration still needs no open path.
Deployment planning docsSeparating admin and user access
Users reach Mattermost on 443 through the proxy, while administrative actions, the System Console and command line tools should come from a narrower set of management networks. Keep the metrics port on 8067 and the cluster gossip port on 8074 off user-facing networks entirely. Confirm with your security team which source ranges may reach each port, and review that list whenever staff or network segments change.
TLS on every hop
Terminate TLS at a proxy or on the server, then decide whether traffic between the proxy and the application, the application and the database, and the application and the LDAP server is also encrypted. Where a service supports TLS, enable it and record the setting. Where it does not, document the compensating control, such as a private segment, so auditors and reviewers can see the decision.
Monitoring denied connections
Blocked connections are often the first sign of a misconfigured rule, a failed failover or a compromised host trying to reach unexpected destinations. Send firewall and proxy deny logs to your central logging platform and alert on new denied flows from Mattermost hosts. Test the alerts by making a harmless blocked connection from a test host so you know the pipeline works before an incident.
Change control for firewall rules
Treat every rule change as a managed change with an owner, a reason, a rollback step and a test. Record the source, destination, port and protocol, and require review from the team that runs Mattermost. Test changes in a staging environment that mirrors production routing, including the proxy path, before applying them to production. Ask your change board how emergency changes are logged and reviewed afterward.
Rule documentation across upgrades
Mattermost releases a new server version each month, and feature changes can add or move the ports and outbound destinations a deployment needs. Check the release notes for each planned upgrade, compare them with your rule inventory, and update the documentation before the change window. Schedule this review alongside your Extended Support Release planning so the documented rules always match the running version.
Server releases pageQuestions teams ask about Mattermost ports and proxies
How much effort does a Mattermost firewall plan take?
The effort depends mainly on how many network zones sit between users, the Mattermost servers and the services they call, and on how many of those flows are already documented. A single server with a local database and no directory sync has a short list of flows. A deployment with separate database, file storage, LDAP or Active Directory, SMTP, push notification and proxy paths has a longer list, and each flow needs a source, a destination, a port and a protocol. Much of the work is discovery: confirming which hosts Mattermost actually calls in your environment, then checking each one against your firewall standards. Plan for the review to take longer when the network team has to reconcile flows that no one has written down before.
What must our team provide before a Mattermost port review?
Before any rule is written, the team needs three inputs. The first is the intended architecture: whether Mattermost runs on one server or in a cluster, where TLS terminates, where PostgreSQL and file storage live, and which network segments hold each component. The second is a destination list covering every service Mattermost reaches, including the database host, S3 or NAS endpoints, LDAP or Active Directory domain controllers, the SMTP relay, any push notification path you intend to use, and the outbound proxy if you use one. The third is named owners for each segment and service, such as the network team, the directory team, the mail team and the application owner, so each rule has someone who can approve it and maintain it. Ask the vendor documentation for the current list of inbound and outbound ports before you start, and confirm each one against your own version.
Can our internal network team plan Mattermost ports on its own?
Often yes, if the team has firewall administration experience and access to the full architecture and service inventory. The work is mostly structured: list the flows, map them to rules, and record the justification for each one. Internal teams usually struggle in three places: knowing which outbound calls a feature makes only when it is enabled, testing rules in a staging environment that matches production, and keeping the record current after upgrades add or change endpoints. External help is most useful when the team needs an independent review of the rule set, a documented verification run, or a plan that auditors and security reviewers can follow. Decide early which parts your team will own and which parts you want reviewed.
How long does approval of Mattermost firewall rules usually take?
The review time is driven far more by approvals than by the technical work. Each change request may pass through application, network, security and sometimes change advisory boards, and each group may need a different level of evidence. Timelines lengthen when a flow crosses a boundary that requires a new exception, when the destination is a third-party service with no fixed address list, or when the team must justify an outbound internet path. Shorten the process by submitting one consolidated request with the architecture diagram, the flow table and the owner for each row. Ask your change board for its lead times and required forms before you set a date, because those rules differ between organizations.
Does routing outbound HTTP through a proxy change the firewall rule set?
Yes, it usually simplifies the rules for outbound web traffic but adds a dependency you must manage. When Mattermost sends outbound HTTP requests through a proxy, the firewall can allow the application servers to reach the proxy on its listening port instead of allowing many destinations directly. The proxy then carries the policy for allowed domains and sites. Several things still need separate rules: the database, LDAP or Active Directory, the file store and the SMTP relay, which may not use the proxy at all. Check the Mattermost configuration for proxy settings and confirm which connections honor them, since a flow that bypasses the proxy will still need a direct rule. Test each path after the change, because a proxy misconfiguration often looks like a Mattermost fault.
What changes in the firewall plan when Mattermost runs as a cluster?
A cluster adds more internal flows, and those flows need explicit rules. Application nodes must reach each other on the cluster gossip port, and every node must reach the shared database, the shared file storage and the load balancer that fronts it. Metrics collection, if you enable it, adds a path from your monitoring system to each node. Read replicas and search replicas add more database destinations. The inbound design also changes, because the load balancer becomes the public entry point and the individual nodes should accept traffic only from it and from approved management hosts. Clustering is available only on the Enterprise and Enterprise Advanced plans, so confirm your licensing before you design those rules. Document every node-to-node and node-to-service flow, since cluster growth tends to add rules over time.
Official Mattermost deployment references to check
Before you finalize any firewall change, read the official Mattermost server deployment planning guide. It is the document to check against your own design, because it describes the server components, the platforms Mattermost can run on and the starting points for air-gapped, coalition network and compliance-framework deployments. Use it to confirm which services need to reach each other on your chosen topology, and to decide whether your environment matches the single-server model or needs the clustered design. Confirm each port and direction it lists against the version you plan to deploy, since port requirements can change between releases and between deployment styles.
The high availability cluster-based deployment guide is the second read, and it matters most if you plan more than one application node. It covers the redundant application servers, database servers and load balancers that a cluster needs, and it sets out the shared file storage requirement that every node must reach. For network planning, that means you must allow node-to-node cluster communication, confirm that every node can reach the shared storage and database endpoints, and place the load balancer so that it can reach each node on the ports the guide specifies. Check the guide's cluster settings against the gossip and metrics ports in this topic before you request firewall rules, because the cluster design determines which internal flows must be opened.

