Mobile VPN options for Mattermost

Phones can reach a Mattermost server inside a private network through a per-app VPN, a device VPN or an external proxy, with MFA added on top. This page explains how to choose and what to confirm first.

On this page

How mobile VPN access to a private Mattermost server works

Staff phones need to reach a Mattermost server that sits on a private network, and there are three ways to get them there: a per-app VPN that routes only the Mattermost app through a tunnel, a device-wide VPN that routes all phone traffic through the corporate network, or an external HTTPS and WSS proxy that publishes the server's web and WebSocket endpoints to the phone without a tunnel. Multi-factor authentication is then layered on top of whichever path you choose. The right choice depends on three things: who owns the device, whether your EMM can push and configure per-app VPN profiles for the Mattermost app, and how the network path from the internet to the server is built.

It helps to be clear about what sits where. Mattermost runs as a single Linux binary with PostgreSQL as its database, so the server itself has no built-in VPN or remote access layer. Everything that makes the server reachable from a phone (the tunnel, the reverse proxy, the load balancer, the certificate and the MFA prompt) is infrastructure you build around the server, and it has to be designed, tested and operated as its own component. Mattermost's own deployment planning documentation is the starting point for the server side of that design.

Before choosing, confirm four facts with your own teams. First, whether the phones are corporate-owned, BYOD or a mix, since this decides whether a device-wide tunnel is acceptable to users and to legal. Second, whether the EMM you already use supports per-app VPN for the Mattermost app and how it is configured, which you should check with the EMM vendor and not assume. Third, which VPN products your firewall and identity stack support on iOS and Android. Fourth, whether the network team will accept inbound WSS traffic through a proxy, since WebSocket connections are long-lived and sensitive to idle timeouts. Each answer narrows the options before any architecture work begins.

Per-app VPN, device VPN or external proxy: which option fits

This table compares three ways a phone can reach a Mattermost server inside a private network, by routing, control, typical fit and trade-offs. Read each row against your device ownership model, then confirm the specifics with your EMM provider and VPN vendor before choosing.

PatternHow traffic is routedTypical fit and trade-offs
Per-app VPN through the EMMOnly the Mattermost app's traffic enters the tunnel, while other apps and personal browsing go directBest suited to managed corporate phones. Limits what leaves the device, but depends on the EMM and VPN vendor supporting the app identifier and the tunnel type you need.
Device VPNAll traffic from the phone enters the tunnel to the corporate networkCommon for fully managed devices. Broad reach into the network, so it adds exposure on personal activity and needs clear user and support expectations.
External proxy (HTTPS and WSS)The app connects to a reverse proxy published on a reachable address, which forwards to the Mattermost server internallyOften used for BYOD and contractor phones because no device tunnel is required. Mattermost access depends on the proxy, WebSocket support and the authentication you place in front of it.
Who controls the routingEMM policy and VPN vendor configuration for the first two; your network and proxy team for the thirdConfirm with the EMM provider which settings apply to unmanaged and BYOD enrollment, and whether they can be changed without reinstalling the app.
Certificate and TLS handlingTunnel encryption for the first two; TLS terminated at the external proxy for the thirdConfirm how each path validates your internal certificate authority on iOS and Android, since a missing trust chain is a common failure point.
Contractor fitUsually limited to what the EMM can assign to a contractor deviceConfirm whether contractors get a managed profile, a separate account, or only a proxy path, and how access ends when the engagement closes.
Main trade-offs to confirmTunnel reach, split tunneling support, always-on behavior and battery impactAsk the VPN vendor about split tunneling on each OS, reconnect behavior after network changes, and how logs record per-app sessions.

How the choice changes for managed, BYOD and contractor phones

Company-owned phones enrolled in an EMM give the organization the widest set of options. The usual pattern is a per-app VPN that routes only the Mattermost app's traffic to the private network, so the rest of the phone keeps normal internet access. A full device VPN is also possible but sends more traffic through the tunnel than Mattermost needs. The organization controls app installation, the default server URL, VPN profiles, passcode rules, OS version floors and, where the plan supports it, device attributes that feed access decisions. The user controls personal apps, personal data and day-to-day usage within those policies. Risks fall because the organization can wipe a lost device and remove the VPN profile remotely, but risks remain if the device is rooted or jailbroken and the EMM cannot detect it. Confirm with your EMM vendor and each OS how per-app VPN is configured for the Mattermost app.

  • Per-app VPN scope: Route only the Mattermost app and its required domains through the tunnel.
  • Pre-configured server: Push the server address so users cannot point the app elsewhere.
  • Remote wipe: Remove app data and profiles when a device is lost or leaves the organization.
  • Device posture: Enforce OS versions and passcodes before the VPN profile is installed.
  • Jailbreak and root limits: Detection depends on plan and tooling, so do not treat it as complete.

Before rollout, check which profile keys your EMM supports for each platform and test on a pilot group.

How phone traffic reaches Mattermost through VPN and proxy

The diagram starts at the phone, where the Mattermost app sends requests either through a per-app VPN tunnel managed by the EMM or through a device-wide VPN. Both paths meet an external HTTPS and WSS proxy or load balancer at the edge of the private network, which forwards traffic to the Mattermost application servers. Those servers depend on PostgreSQL and shared file storage, and the identity provider and MFA step sits in the sign-in path. Check where each trust boundary falls and which component terminates TLS.

Phone traffic crosses the VPN edge and the external proxy before reaching private Mattermost servers.

How to set up mobile VPN access to Mattermost

This sequence moves phone access to a self-hosted Mattermost server from ad hoc exceptions to a documented pattern: a known device model, a stable HTTPS and WSS endpoint, a VPN or per-app policy that reaches it, and MFA on top, with a test at each stage.

  1. Confirm the device ownership model and EMM capability

    Your mobility or IT team lists which phones will connect: corporate-owned, BYOD, or a mix, and whether each fleet is enrolled in an EMM (enterprise mobility management) product. Ask the EMM vendor which VPN types it supports for managed devices, including per-app VPN and always-on device VPN, and whether it can push the VPN profile without user action. The step is done when every device group has a written owner, an enrollment status, and a confirmed VPN method, because the rest of the sequence depends on what the EMM can enforce on each group.

  2. Choose the access pattern for each device group

    Decide between a per-app VPN that routes only the Mattermost app's traffic through the corporate network, and a device-wide VPN that routes all phone traffic. Per-app VPN suits BYOD phones where personal traffic should stay off the corporate tunnel, while device VPN suits fully managed phones. Record the choice per group with the reason, and note whether the desktop and browser clients will use the same path. The step is done when a reviewer can point to one pattern per device group and explain why it was chosen.

  3. Publish a stable HTTPS endpoint for the Mattermost server

    Your network or platform team places a reverse proxy in front of the Mattermost server with a stable DNS name and a TLS certificate that the phones trust. The Mattermost site URL must match this name exactly, because the apps store it and fail when it changes. Confirm the server answers over HTTPS from inside the private network and that the certificate chain validates on a managed test phone. The step is done when the mobile app can reach the server URL from the test device on the VPN and the site URL in the Mattermost console matches the public name.

  4. Configure the proxy to pass WebSocket traffic

    The proxy must forward WebSocket (WSS) connections to the Mattermost server, because real-time messages, typing indicators and status changes depend on that connection, and HTTPS alone will not deliver them. Set the proxy's upgrade headers and timeouts according to the Mattermost deployment documentation for your proxy product, and confirm that long-lived connections are not dropped by idle timeouts on the proxy or the VPN gateway. The step is done when a test user sees a message from another account appear on the phone without pulling to refresh.

  5. Set the VPN profile or per-app policy

    Your EMM administrator creates the VPN profile or per-app VPN policy for each device group, pointing at the gateway and associating the Mattermost app bundle or package identifier for per-app policies. Keep the internal server name in the policy so that only the Mattermost endpoint is routed through the tunnel. Confirm the profile is installed on test devices and that the policy is applied before the app is opened. The step is done when the profile shows as installed on each test device and the EMM console reports the policy as applied.

  6. Test sign-in and messaging on cellular and Wi-Fi

    Run the test from a phone outside the office network, on cellular data with the VPN connected, and then on a guest Wi-Fi network. Sign in, open a channel, and have a second account post a message to confirm that the new message arrives in real time. Then disconnect the VPN and confirm the app cannot reach the server, and reconnect a blocked device after you remove its policy to confirm access is revoked. The step is done when messages arrive in real time on both networks and a device without the VPN or policy cannot load the server, which is the check that proves the tunnel is the only path.

  7. Add MFA on top of the VPN path

    The VPN controls which networks reach the server, but it does not confirm the identity of the person signing in, so add MFA at the identity provider used for Mattermost sign-in. Confirm which MFA methods your identity provider supports for mobile sign-in and whether the Mattermost app uses the browser-based login flow that the provider handles. Test a sign-in with a second factor and a sign-in that fails after the factor is removed. The step is done when a user without a valid second factor is refused even with the VPN connected, and the sign-in event appears in your identity provider's logs.

Where MFA sits on top of mobile VPN access

The VPN or proxy and the Mattermost sign-in are two separate controls, and it helps to keep them separate in your design. The VPN, per-app tunnel or reverse proxy decides whether a particular phone can reach the Mattermost server at all. The identity provider decides who is signing in once the connection exists. A device that passes the network check still has to prove who the user is, and a valid user on an unmanaged network path should still be blocked. Assigning each question to a named control makes it easier to audit and to troubleshoot when a user cannot connect.

For most organizations, MFA is enforced at the identity provider through SSO. Mattermost lists SSO over SAML, OIDC and OAuth as included from the Professional plan, and the SAML single sign-on guide in the Mattermost documentation describes how the server hands sign-in to your identity provider. Mattermost does not define the MFA methods itself, so the policy lives in your IdP. Confirm with your IdP vendor which factors work in the iOS and Android sign-in flows you intend to use, including push approval, one-time codes, passkeys and any app that must be installed on the phone. Also confirm how each method behaves inside the in-app browser used during SSO.

Session lifetime is the setting most likely to surprise you on phones. A user who signed in once may stay signed in for a long time, so an MFA prompt at the start may not be repeated for days or weeks, and a stolen unlocked phone may keep working. Check three values with your IdP and Mattermost administrators: the IdP session lifetime, the idle timeout, and how often the mobile app must re-authenticate after a VPN reconnect. Decide whether the VPN session and the Mattermost session should expire together, and test that a revoked user loses access on their phone within the window your policy allows.

Security risks in mobile VPN access to Mattermost

Reaching a self-hosted Mattermost server from phones adds network paths, devices and intermediaries that your security team does not fully control. The cards below cover the risks that tend to appear in that path, the control to apply to each one and the team that should own it.

Split tunneling exposes internal names

When only some app traffic goes through the VPN, the device can still resolve and reach other internal hostnames over the open network, and those names reveal how your environment is laid out. Confirm which traffic classes the VPN profile covers, and whether DNS for internal zones is also routed through the tunnel. Ask the network team to test from a managed phone with the tunnel up and down. The owner is the network or infrastructure team, with the EMM administrator carrying the profile settings.

Lost devices keep live sessions

A phone that is lost, retired or handed to someone else may still hold a valid VPN profile, a cached Mattermost session or a push token. Each of these can extend access after the owner has left. Define how quickly a device is removed from the EMM, how the VPN certificate or account is revoked, and how Mattermost sessions are ended for that user. Test the full offboarding path once before go-live. The owner is the identity or endpoint team, working with the Mattermost administrator.

Proxy sees decrypted traffic

A proxy that terminates TLS for HTTPS and WSS connections can read session tokens, message content and file transfers unless you control where decryption happens and who can view its logs. Document which hosts the proxy decrypts, whether it inspects message bodies at all, and who holds its keys. Confirm that the proxy's own administrative access is covered by the same review as the Mattermost server. The owner is the security architecture team, with the proxy operator responsible for configuration.

Certificate trust differs by device

Managed phones can be given the internal certificate authority through the EMM, while personal devices in a BYOD program usually cannot, which pushes users toward workarounds or unsafe certificate prompts. Decide which device classes may reach the server, and whether the internal CA is installed only on managed devices. Test that certificate validation fails closed on an unmanaged phone. The owner is the endpoint team, with the PKI team approving the trust chain.

Logs capture client IP and device data

VPN gateways and proxies typically record source addresses, device identifiers, user agents and connection times. These logs can become personal data in regulated programs and may be kept longer than the Mattermost retention settings. Agree on which fields are logged, where they are stored, how long they are kept and who may query them, and align those settings with your records and privacy rules. The owner is the compliance or privacy lead, with the infrastructure team running the log pipeline.

Weak MFA fallback paths

MFA can be enforced on the main sign-in path and still be bypassed through a legacy password flow, a long-lived API token, a guest account or an emergency access route that was never retired. Map every route that reaches the Mattermost server from a phone, and confirm that each one requires the same strength of factor. Review fallback codes and recovery methods on the identity provider. The owner is the identity team, with the Mattermost administrator confirming the server-side settings.

How the proxy layer interacts with high availability

If you run Mattermost high availability, the external proxy stops being a single front door and becomes part of the cluster design. High availability is available only on the Enterprise and Enterprise Advanced plans and consists of redundant application servers, redundant database servers and redundant load balancers. Your proxy tier must either be that load balancer or sit in front of it, so it needs the same redundancy as the rest of the cluster. A single proxy node in front of a highly available application tier reintroduces the single point of failure the cluster was built to remove.

Three behaviors must be planned with the load balancer, not left to defaults. First, session stickiness: confirm with the Mattermost high availability documentation for your version how client sessions and WebSocket connections are expected to be routed across application nodes, and configure the proxy to match. Second, WebSocket handling: the proxy must pass upgraded connections through to the application servers and keep them open for real-time messaging, and the timeout values on the proxy and any intermediate device must suit long-lived connections. Third, health checks: the load balancer should only send traffic to nodes that pass the health check endpoint documented for your release, and you should test what happens when one application node is removed from the pool during active sessions.

A cluster also requires shared file storage on Amazon S3, an S3-compatible service or NAS mounted on each node, because local file system storage will not work correctly and risks corrupting files. Proxy changes do not fix a storage problem, so verify storage access from every node before you test failover through the proxy. Before the build, ask the Mattermost team or your DeployOpen engineer to confirm the stickiness, WebSocket and health check requirements for the exact server version you will run, because these details change between releases and the proxy configuration must follow the documented version.

What to confirm before you commit to a mobile VPN design

A mobile VPN design depends on facts that sit in your EMM, your network and your plan level, not in Mattermost alone. The six checks below connect those layers, and each one should be verified in your own environment before you pick a design.

EMM per-app VPN support by OS

Confirm whether your EMM provider can attach a per-app VPN profile to the Mattermost app on each mobile OS you run, and whether that support differs between managed and personally owned devices. Ask for the configuration keys and the OS versions they cover, in writing. Per-app VPN is often the difference between routing only Mattermost traffic and tunneling the whole phone, so this answer shapes the rest of the design.

Mattermost SAML docs

WSS and long-lived connection support

Test whether your VPN or external proxy passes WebSocket (WSS) traffic and keeps idle connections open long enough for real-time messaging. Many proxies and VPN gateways apply idle timeouts or buffering that break live updates while plain HTTPS still works. Run a test session on a phone for an extended period, then check that messages arrive without a manual refresh.

Plan level for identity and HA

Identify which Mattermost plan your identity and availability requirements need before you design the access path. Per the pricing page, SSO and AD/LDAP sync start at the Professional plan, while high availability clustering starts at Enterprise. A multi-node design behind a load balancer changes how the proxy and VPN must reach the cluster, so confirm the plan with Mattermost sales rather than assuming it.

Mattermost pricing

Behavior when the VPN drops

Decide what the app should do when the tunnel disconnects in the middle of a session. Test whether the app reconnects automatically when the VPN returns, whether it shows a clear offline state, and whether queued messages are sent or lost. Also check how users are expected to recover, since a silent failure can look like a server outage and generate support tickets across the user base.

Server URL delivery to devices

Confirm how each phone learns the internal Mattermost server address and whether users can change it. Options include pre-configuring the URL through the EMM, relying on users to enter it, or resolving a name that only exists on the VPN. Ask your EMM provider whether the URL can be locked, and test that a device outside the network cannot reach the server by any other path.

Certificate authority trust on devices

Verify that your internal certificate authority is trusted on every device that will connect, including the chain for the proxy and the Mattermost server. A private CA that is missing from some devices produces certificate errors that users may bypass. Check how your EMM installs CA certificates on iOS and Android, how renewals reach devices, and what happens to the app when a certificate expires.

Common questions about mobile VPN access to Mattermost

What does mobile VPN work for Mattermost cost, and what drives it up?

The cost depends on the written scope, not on a list price. Most of the effort sits in four places: the number of device groups and VPN or EMM configurations, the complexity of the private network (single site, several data centers, or segmented zones), how many access paths you need (native apps, browsers, desktop clients), and whether MFA and conditional access must be designed alongside the tunnel. Device count matters mainly for the test pool and rollout waves. Ask any provider for a written scope and a quote that separates one-time design and build work from any recurring support or retainer. DeployOpen does not publish prices, so request a quote against your own diagrams and device inventory.

How long does a mobile VPN rollout for Mattermost usually take?

Duration is set by the network and the approvals around it, not by the Mattermost configuration itself. The longest steps are usually confirming the private routes and DNS names, getting firewall and proxy changes approved, and testing on real devices across iOS and Android versions. A single-site setup with one EMM and an existing VPN gateway is simpler than a multi-region design with per-app tunnels and MFA. Ask the provider to break the schedule into design, build, test and rollout phases, and to state which dependencies on your side could move the dates.

What must our team provide before a mobile VPN engagement starts?

Plan to supply four things early. First, network diagrams showing where the Mattermost server, database, proxy and load balancers sit, and which address ranges phones may reach. Second, EMM console access, or a named admin who can create app configurations and VPN profiles. Third, identity provider admin access so the team can add MFA and test sign-in with the same policies users will see. Fourth, a test device pool that covers the OS versions and device ownership models (corporate and BYOD) you support. Also agree on who approves firewall and DNS changes, since those often set the pace.

Can our own team set up mobile VPN access to Mattermost without a partner?

Yes, if your team already runs an EMM, a VPN gateway and an identity provider, and has someone who can test on real devices. The work is mostly configuration and verification: a per-app or device VPN profile, the Mattermost server URL and proxy path, and MFA policy. Teams without recent experience with per-app VPN, certificate trust on phones or conditional access often find the testing and troubleshooting take the longest. A partner is most useful when the design must be documented for an assessor, or when several networks and device types have to work together on the first attempt.

Is per-app VPN required for Mattermost on phones?

Not always. A per-app VPN routes only the Mattermost app's traffic through the tunnel, which limits exposure of other apps and keeps personal traffic off your network. A device-wide VPN is simpler to deploy and may suit fully managed corporate phones where all traffic should follow policy. The right choice depends on your EMM's support for per-app profiles on each platform, your data classification, and whether BYOD users must keep personal apps off the corporate path. Confirm the EMM capability for each OS version before deciding, because support differs between iOS and Android.

How does adding MFA change the effort for mobile VPN access?

MFA adds design and test work on top of the tunnel. The team must decide where the second factor is enforced (identity provider, VPN gateway, or the proxy in front of Mattermost), how sessions are re-authenticated on phones, and how lost or replaced devices are handled. Testing grows because each sign-in path, including the native app, the browser and any desktop client, needs to be checked with MFA turned on. Ask for the MFA design as a separate deliverable in the written scope so the security and identity teams can review it before rollout.

What should we ask a provider for before signing a mobile VPN scope?

Ask for a written scope that lists the systems in scope, the device types and OS versions, the VPN and EMM products involved, and the MFA approach. Request the list of deliverables, such as an architecture diagram, configuration records, a test plan and results, and operator runbooks. Confirm who does firewall and DNS changes, what testing is included, how many rollout rounds are covered, and what happens to recurring support after go-live. Compare quotes against the same scope rather than against each other's assumptions.

How DeployOpen scopes and delivers mobile access for Mattermost

DeployOpen approaches mobile VPN options for Mattermost as a scoped implementation inside your own infrastructure. We map which network paths your phones need, build the access layer you choose, and document it so your security and EMM teams can review it.

How we scope

  • Inventory which Mattermost endpoints phones must reach, including the server, WebSocket path and any file or push traffic.
  • Compare per-app VPN through your EMM with device-level VPN and record the trade-offs for your managed device fleet.
  • Agree the written scope, deliverables and timeline before work starts, with an option for ongoing support as a retainer.

How we build

  • Configure the external reverse proxy for HTTPS and WSS, with TLS settings, timeouts and access restrictions agreed up front.
  • Connect the chosen VPN or per-app tunnel configuration to the EMM profile, with test devices enrolled in each device group.
  • Enable MFA at the access layer or identity provider where your design requires it, and test sign-in from managed and unmanaged phones.

How we hand over

  • Deliver architecture diagrams, network flow documentation and the configuration files and settings used in the build.
  • Provide a test record covering connection, reconnection after network change, WSS stability and MFA prompts on each platform.
  • Walk your operations and security teams through the runbook for certificate renewal, EMM policy changes and troubleshooting.

How we support

  • Review the mobile access design again when Mattermost ships a new server version, since proxy and WebSocket behavior can change.
  • Retest after changes to the EMM, VPN gateway, identity provider or reverse proxy, and update the documentation to match.
  • Confirm support scope, response expectations and retest cadence with you in writing before any retainer begins.

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.