Building a custom Mattermost plugin

A custom Mattermost plugin packages server and web code behind a manifest, and it must be retested against each monthly server release. This page covers what the build includes, what drives effort, and what to hand over.

On this page

When a custom Mattermost plugin is the right build

A custom plugin is the right build when your team needs Mattermost to do something the product does not offer out of the box, and the need can be met by extending the server and web client rather than changing the product's core code. Build in-house if you already have engineers who can write Go for the server component and React for the web app, and who will own the code for its whole life. Bring in a partner if those skills are thin, the feature touches identity, records or sensitive data, or the work must be finished against a fixed scope. In both cases, the plugin is the supported extension route. Forking the Mattermost server source means you carry every merge conflict yourself, while a plugin is loaded alongside the server and can be enabled, disabled or removed without rebuilding the product.

Choosing a plugin does not end the decision. Mattermost releases a new server version in binary form on the 16th of each month, so a plugin must be tested against each release before it reaches production, and the test run is recurring work, not a one-time task. Before you commit, confirm with your Mattermost plan and deployment owner which server version you run, which Extended Support Release or monthly release you will track, and whether the capabilities your plugin needs are exposed by the plugin API in that version. Mattermost's server releases page lists support windows, which set how often you must move.

Ask a partner for four things in writing: the list of plugin hooks and APIs the design depends on, a test plan covering each monthly release you intend to support, who owns the code and the build pipeline after handover, and the cost of retesting and maintenance over the year. If a feature can be met by an existing integration, such as a webhook or slash command, that is usually cheaper to run, so ask for that comparison before the build starts.

What a Mattermost plugin contains

A Mattermost plugin is packaged as one bundle with a manifest, a server component and a web app component. Each part has a different owner and a different failure mode, so a build plan should name who maintains each one before development starts.

The plugin manifest

The manifest is the file that identifies the plugin to the server: its unique ID, version, minimum server version and the components it ships. The server reads it when the bundle is uploaded, so a wrong ID or missing field blocks installation rather than failing later. Your team owns it, and it is the first thing to review when a new server release changes plugin requirements. Confirm the exact manifest fields against the Mattermost plugin developer docs for your server version.

Server release notes

The Go server component

The server component is Go code that Mattermost runs as a separate subprocess, not inside the main server process. Your developers own its logic, including API handlers, hooks into server events and any calls to external services. Because it runs as its own process, it must handle its own errors, timeouts and restarts, and it must be tested against each server version you run. Ask who on your side will maintain this code after the build is delivered.

The web app component

The web app component is the React code that adds buttons, panels, settings screens or custom views to the Mattermost client. It runs in users' browsers, so it inherits the browser's access to what each signed-in user can see. Front-end code should only display data that the server component has already checked for permission. Your frontend developers own it, and it should be tested in the desktop and mobile clients you support, since UI changes can break on client upgrades.

Starter and demo templates

Mattermost publishes starter and demo plugin templates that show the expected layout and wiring between the manifest, server and web app parts. They are a reference for structure, not production code, so teams usually copy the pattern and remove the demo logic. Check the template's version against the server you run, because an outdated template can carry old build settings or APIs. Confirm the current template location in the plugin developer docs before you fork anything.

Build and bundle output

The build produces a single plugin bundle that contains the compiled server binary for each target operating system, the web app assets and the manifest. Build tooling, compiler versions and dependency pins are owned by your engineering team and must be reproducible, so the same source produces the same bundle in your build pipeline. Keep the bundle in version control or an artifact store so you can reinstall the exact version after an incident or a server rollback.

Testing against monthly releases

Mattermost ships a new server version in binary form on the 16th of each month, so a plugin can break between your own release cycles. Set up a test server on each new release, run your plugin's test suite and smoke tests, and record the results before you upgrade production. Ask your partner or your own team who owns this retest, how long it takes and how it is paid for in a retainer.

Mattermost release schedule

How the plugin parts connect to the Mattermost server

The diagram starts in the browser, where the web app component is loaded by the Mattermost client, and in the Mattermost server, which launches the plugin's server component as a subprocess. Calls between the two pass through the plugin API, so the server stays the gatekeeper for what the plugin can read and write. Both sides reach PostgreSQL and the shared file store, which are the trust boundaries to review: check what each side can access, and confirm with your own environment how plugin files and data are stored on every node.

Browser, server and plugin subprocess connect through the plugin API, with data stores as trust boundaries.

Starting from a template or from scratch

A starter template gives you a working plugin skeleton with the manifest, a Go server component, a web app component and the build tooling already wired together. It is the fastest route to a plugin that installs and loads, because the packaging and build steps are already correct. The cost is that you inherit decisions made by the template authors, including naming, directory layout and the hooks and API calls the example code uses, and those decisions reach into every later change.

  • Build chain already connected: the manifest, server binary and web bundle are packaged together, so your first task is confirming the bundle installs on a test server.
  • Placeholder names everywhere: plugin ID, display name, routes and settings keys appear in several files, and renaming them partially is a common source of install failures.
  • Example logic to delete: sample commands, hooks or settings pages must be removed deliberately, not left behind as dead code that still registers with the server.
  • Pinned tooling versions: the template fixes Go and Node versions, so check them against the Mattermost version you run before building.
  • Upgrade ownership: you own the template fork from then on, and changes upstream will not merge themselves.

Before changing anything, confirm which parts of the template are required by the plugin framework and which are illustration only.

How a plugin build is sequenced

The sequence turns a vague idea for a Mattermost extension into a plugin with a written scope, a tested bundle and a routine for checking it against each new release. Each step produces a record that the next step depends on, so gaps surface early rather than in production.

  1. Scope the plugin's job and permissions

    Start by writing down what the plugin must do, which users and channels it touches, which external systems it calls, and what data it stores. List the Mattermost API calls it needs and the permissions they require, and decide who on your side owns the code after delivery. Done means a scope document signed off by the business owner and the security reviewer, with the permission list agreed in writing. Anything not on the list is out of scope for the first build.

  2. Choose the template and plugin layout

    Select a starter or demo template as the base so the server and web components, build scripts and manifest follow the layout Mattermost expects, rather than inventing one. Confirm the template's language versions and build tooling against the Mattermost server version you run, and record the choice with the reason. The output is a repository skeleton that compiles without any custom logic yet, which proves the toolchain works on your build machines.

  3. Build the Go server component

    Implement the server component in Go. It runs as a separate subprocess that the Mattermost server starts and supervises, so keep its hooks, API calls and outbound connections limited to the scope from the first step. Handle errors and restarts explicitly, avoid writing to local disk unless the design needs it, and log through the server's logging facilities. Done means unit tests pass and the component starts and stops cleanly against a local test server.

  4. Build the web app component

    Implement the web app component that adds any settings pages, menus or post extensions the scope requires. Keep it to the UI the users asked for, validate all input on the server side as well, and avoid loading third-party scripts that the scope did not list. The output is a built web bundle that renders in the test server's client, with a short test script covering each user action in the scope.

  5. Write and validate the manifest

    Write the plugin manifest with its identifier, version, minimum server version, server and web entry points, and any settings the administrator must fill in. Check each declared setting against the scope so that no unused setting or unnecessary capability remains. Validate the manifest with the build tooling and review it with the security reviewer. The output is a manifest that matches the scope document line by line.

  6. Test on a non-production server

    Install the bundle on a non-production Mattermost server built from the same version you run, with the same database engine, proxy and identity settings. Test each permission in the scope, negative cases such as users without rights, failed external calls and restart behavior. If you run a high availability cluster, test on a cluster of the same shape before production. Done means a written test report with pass and fail results and any defects fixed and retested.

  7. Package, install and record the release

    Package the signed bundle, install it on production through the administrator path your environment allows, and confirm the plugin reports the expected version and settings. Store the bundle, its checksums, the manifest and the test report together in your change record. The output is an installed plugin with a recorded version, a rollback bundle of the previous version and a named owner for the code.

  8. Set up the retest routine for each release

    Mattermost publishes a new server version in binary form on the 16th of each month, so schedule a retest against each release before you upgrade production. Keep a checklist derived from the scope and the test report, run it on the non-production server, and record the result per release. Confirm the support window of each version from the release page, since the plugin must match a version you will actually run. The output is a dated retest record per release that decides whether the upgrade proceeds.

Decisions that shape the plugin

This table compares the five decisions that set a plugin's architecture: where logic runs, which API calls it depends on, where state lives, whether it runs background work, and who can install it. Read each row as a question to settle before the build starts, with the risk of skipping it. Confirm API availability and plugin framework behavior against the Mattermost version you plan to run, because monthly releases can change them.

DecisionOptions and when each fitsRisk if wrong
Server-side or web-only logicWeb app only fits UI changes such as menus, panels and message rendering. A Go server component running as a subprocess fits logic that must run regardless of which client a user opens, handle server events or call external services.Putting server logic in the browser exposes secrets and breaks when users are on mobile or the API. Moving logic to the server later means rewriting the plugin boundary.
Which Mattermost API calls the plugin needsList every read and write the plugin makes, such as posts, channels, users and teams, and confirm each call exists in your target server version. Prefer the narrowest permissions the plugin needs.Relying on an API that a later monthly release changes or removes can break the plugin on upgrade. Over-broad access makes the plugin a larger security concern.
How the plugin stores stateUse the Mattermost plugin key-value store for small settings and data that belongs to the plugin. Use an external database only when the data is large, shared with other systems or needs its own retention rules, and plan its backups.Storing data in local files on a cluster node loses it or diverges between nodes. Storing secrets in plain plugin settings exposes them to administrators and logs.
Background jobsChoose no background work if the plugin reacts only to user or API events. Choose scheduled work when the plugin must poll or clean up data, and design it to run once across all nodes if the deployment is a high availability cluster.Jobs that run on every node duplicate posts, notifications or external calls. Long-running jobs with no timeout can hold resources and stall the server.
Marketplace or private distributionPublish to the Marketplace if the plugin is useful to others and you can support public releases. Keep it private when it holds internal logic, credentials or workflows, and distribute the bundle through your own change process.Publishing internal code can expose business logic or integration details. Keeping a private plugin with no upgrade owner means it breaks silently at the next monthly release.

How plugins survive monthly Mattermost releases

Mattermost publishes a new server version in binary form on the 16th of each month, so a custom plugin is never tested against a fixed platform for long. The current Extended Support Release is v11.7, released on 2026-05-15 with support ending 2027-05-15, and the previous ESR, v10.11, reached end of life on 2026-08-15. An organization that runs the ESR track therefore has a stable server for longer, but it still needs a plan for moving the plugin when that track is replaced. Confirm which track your organization runs before you commit to a test cadence, because the answer decides how often the plugin must be retested.

A plugin depends on server behavior that Mattermost can change between releases: the plugin API hooks it registers, the REST endpoints it calls, the way the web app loads its component, and the Go packages its server component compiles against. Any of these can break a plugin without a single line of your code changing. The regression test is the control that catches this. Keep a staging server running the same server version as production, install the exact plugin bundle you intend to ship, and run a scripted set of checks covering the manifest, plugin startup, slash commands, webhook handlers and the web app settings page before each upgrade.

Build the test plan around the release you will run next, not only the one you run now. When a new monthly release or ESR appears, rebuild the plugin against it, rerun the suite, and record the result alongside the plugin version and server version. Ask your partner or internal team to state in writing which server versions the plugin has been tested on, who signs off on a release, and how long a rollback to the previous plugin bundle would take. Those answers determine whether an upgrade is a routine change or an outage.

What drives the effort and cost of a plugin build

This table lists the main factors that change how much work a custom Mattermost plugin takes, and what to do to keep each one manageable. Read each row as a lever: the driver on the left grows the build, and the right-hand column names the scoping or design choice that holds it down. Most of the cost comes from the number of integrations, high availability behavior and the number of Mattermost versions you must test against.

DriverWhy it changes effortHow to reduce it
Integrations and API callsEach external system adds authentication, error handling, rate limits and its own test data, and each Mattermost API call the plugin makes must be checked on upgrade.Limit the first release to one or two systems, and list every API call the plugin needs before design starts.
Custom UI complexityCustom web app components, settings panels and interactive dialogs each need React code, styling that fits the Mattermost interface, and browser testing.Use standard settings and existing Mattermost surfaces where they meet the need, and build custom panels only for workflows users cannot complete otherwise.
Background jobsScheduled or long-running work needs a defined owner, retry behavior and a way to stop cleanly on plugin restart, which adds design and test cases.Keep background work to a small set of clearly named jobs, and confirm early whether each job is needed at all.
High availability behaviorOn clustered deployments, shared state, cluster events and jobs that must run once on a single node need explicit handling and multi-node testing.Decide at scoping whether the plugin must run in a cluster, and keep state in the database or shared file store instead of server memory.
Security review of the codeReviewing the server component, web app bundle, dependencies and stored secrets takes reviewer time, and findings require fixes and retesting.Keep dependencies few and current, store credentials through the plugin settings mechanism, and run the review on a feature-complete build rather than repeatedly.
Testing matrix across releasesEach monthly server release and each Extended Support Release in use is a separate compatibility target, so the same test suite may run several times per cycle.Agree the list of supported server versions in writing, automate the test suite, and check new monthly releases against a staging copy.
Number of Mattermost versions in useRunning more than one server version in different environments multiplies the upgrade checks and the test runs needed for each plugin release.Standardize on one release channel for production, and confirm support end dates for each version before choosing a target.

How the plugin connects to the rest of the platform

A custom plugin rarely works alone. It sits beside sign-in, clustering, and the server's own APIs, and it may call systems outside Mattermost. Each connection below is a decision to make early, and each depends on your plan and Mattermost version, so confirm them before design starts.

Authentication and SSO

Decide how users reach the plugin's screens and API calls. Users signed in through SSO reach plugin features the same way as everyone else, but the plugin must not assume a particular identity provider or login method. The pricing page places SSO (SAML, OIDC, OAuth) and AD/LDAP sync from the Professional plan, so confirm your plan includes SSO before you rely on it. Test a deactivated account to confirm the plugin stops working for it.

SAML SSO docs

High availability clusters

On a multi-node cluster, each application server runs its own copy of the plugin. State kept in local memory or on one node's disk will drift between nodes. Shared file storage on Amazon S3, an S3-compatible service or NAS must be mounted on every node, because local file storage risks corrupting files. High availability is available only on the Enterprise and Enterprise Advanced plans, so check your plan before designing for clustering.

HA cluster docs

Webhooks and slash commands

Some integrations do not need a plugin. Incoming webhooks post messages from external systems, and slash commands call your own service from the message box. They are simpler to build, review and remove, and they suit one-way or single-request tasks. A plugin is the better fit when the feature needs its own UI, background jobs or server-side logic. Pick the lightest mechanism that meets the requirement.

The server REST API

A plugin can call the Mattermost server API from its server component, and external clients can call the same API with a bot account or personal access token. Plan which actions run as the signed-in user and which run as a bot with fixed permissions. Confirm that the API version and endpoints you use exist in the release you run, because the server ships a new version each month.

Server release list

External systems the plugin calls

Plugins that call identity directories, ticketing systems, or data stores create outbound network paths from the Mattermost server. Document each destination, the credential it uses, and who owns it. Store secrets in the plugin's configuration with restricted access, and test failures such as timeouts and expired credentials so a broken upstream system does not stall chat for everyone.

Database and file store access

A plugin that stores data should use the plugin key-value store or agreed database tables, not direct writes to the primary database outside Mattermost's schema. Writes go to the primary database, and read replicas used for scaling do not accept them. Confirm with your Mattermost version how plugin data is stored and backed up, and test restore with the plugin installed.

Questions teams ask before building a Mattermost plugin

Can our own developers build a Mattermost plugin without outside help?

Yes, a team with Go and React experience can build a plugin in-house, but the question is whether it will keep doing so after the first release. A plugin has a server component written in Go that runs as a separate process and a web app component written in React, and each needs its own build, test and deployment steps. Before deciding, check that someone on the team can own the code after launch, can read the server API changes in each release, and can test against the monthly server builds. Most teams that build in-house underestimate the ongoing testing, not the first version.

What skills and admin access does a plugin project need from our team?

The build needs developers who can write Go for the server side and React for the web app, plus someone who understands your identity, data and network rules. On the admin side, a System Admin must install and enable the plugin, and the team needs access to a test server that matches production. Plan for a named owner who approves plugin code, a process for uploading bundles in restricted networks, and a way to read server logs when the plugin fails. Ask any partner to list these roles in the written scope so you can see which ones your team fills.

What makes the cost of a custom Mattermost plugin go up or down?

Cost follows the scope: the number of features, how many external systems the plugin calls, the depth of the web app interface, the security review you require, and the number of test environments. One-time costs cover design, build, testing and handover. Recurring costs cover upgrades for each new server release, dependency updates and support. Mattermost does not publish plugin development prices, and Mattermost's pricing page lists no public prices for its plans either, so ask for a written scope that separates build work from retained upgrade and testing work and shows what each one covers.

How long does it take to build a custom Mattermost plugin?

Duration depends on how many features the plugin has, how many systems it connects to, and whether the team needs approvals and a security review before release. A narrow plugin with one server feature and a small web panel takes far less time than one that handles identity, stores data and runs background jobs. Mattermost ships a server release on the 16th of each month, so any schedule should include time to test the plugin against the release your team will run. Ask for milestones with named deliverables in the written scope, not a single date.

When is a plugin a better choice than a webhook or slash command?

Choose a plugin when the feature must hook into Mattermost itself, such as reacting to posts, adding a custom panel in the web app, or storing its own data inside the server. Webhooks and slash commands are simpler and work well when an external service only needs to post a message or receive a command. A plugin is more work to build, upgrade and test, so it pays off only when the simpler options cannot meet the requirement. Write down the exact user action and the data involved before choosing, and ask for the trade-off in the scope document.

How do Mattermost upgrades affect a custom plugin?

Each new server release can change the plugin API, the web app libraries or the behavior your plugin depends on, so a plugin must be retested on every release you plan to adopt. Mattermost releases a new server version in binary form on the 16th of each month, and Extended Support Releases are the longer-lived option for teams that need fewer changes. Before upgrading, run the plugin against a staging copy of production, check the release notes, and confirm that the plugin's version metadata matches the server. Ask who performs this testing and how fast a fix can be shipped.

Which Mattermost plan level does a custom plugin require?

A custom plugin does not need a particular plan to run on a self-hosted server, but the features around it may. Mattermost's pricing page places SSO (SAML, OIDC, OAuth) and AD/LDAP user sync from the Professional plan, high availability clustering and FIPS 140-3 compliance from Enterprise, and air-gapped deployment in Enterprise Advanced. If your plugin depends on any of these, such as clustered operation or a specific identity setup, the plan must include them. Confirm the plan with Mattermost sales and list the required features in the written scope.

What the client should receive and keep

The handover should give your team everything needed to rebuild, install, test and remove the plugin without the partner in the room. That means the full source repository, the plugin manifest (plugin.json) with its plugin ID and version, the build and packaging instructions that produce the signed bundle for upload, and a test plan showing which Mattermost server versions were tested and what passed. Ask for the test results to name each server version explicitly, including the binary release and any Extended Support Release you run. The package also needs admin install and removal steps written for your environment, covering Marketplace or manual upload, the plugin's file store requirements at startup, and how to disable and delete it with mmctl. Finally, you should receive an upgrade runbook that lists the checks to run before and after each Mattermost server upgrade, and the rollback steps if the plugin fails.

Your team keeps the plugin after handover, so decide now who owns it. Mattermost releases a new server version in binary form on the 16th of each month, and each release can change APIs the plugin depends on. Mattermost v11.7 is an Extended Support Release with support ending 2027-05-15, so an ESR-based estimate of retest frequency differs from a monthly-track deployment. Name an internal owner who schedules retests against each release you intend to run, reviews the results, and approves any change to the plugin before it reaches production. Confirm whether that person has Go and React skills or whether a retainer covers the code.

Two decisions are easy to skip and expensive to miss later. First, agree in writing who holds the signing key for plugin bundles and who can publish updates, since an unmanaged key lets anyone with access ship code to every server. Second, confirm the retesting scope and whether it includes multi-node clusters if you run high availability, because cluster behavior often differs from a single server. Ask the implementation partner to state in the quote which of these items are delivered, which are training, and which are ongoing retainer work, so the cost of keeping the plugin current is visible before the build starts.

How DeployOpen scopes and delivers Mattermost plugin work

DeployOpen plans, implements, tests, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and plugin work follows the same pattern. Each engagement starts from a written scope that sets out the plugin's behavior, the Mattermost environment it must run in, and the handover your team needs to keep it working across monthly releases.

How we scope

  • Engagements are fixed-scope, with scope and deliverables agreed in writing before work starts.
  • The written scope names the plugin's features, server and web app components, and the Mattermost server versions it must support.
  • We confirm the target deployment, including whether it runs as a single server or in a high availability cluster with shared file storage.
  • Scope also records any external services the plugin calls and the data it reads, stores or sends outside Mattermost.

How we build

  • We start from a plugin manifest and the official starter template, then add the Go server component and web app component.
  • Server code runs as a subprocess, so we design its API handling, error paths and resource use around that isolation.
  • Testing covers the plugin against the Mattermost release channels you run, including the monthly server releases.
  • Security review checks permissions, secrets handling and input validation before the plugin reaches your environment.

How we hand over

  • You receive the plugin source, build instructions and a bundle ready for your upload process.
  • Documentation covers installation, configuration keys, required permissions and the upgrade test steps for each new server release.
  • We walk your engineers through the code and the test suite so your team can maintain the plugin without us.
  • Handover includes a written list of known limits, such as any behavior that needs review in a high availability cluster.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers once the plugin is live.
  • A retainer can cover retesting the plugin against each new Mattermost release before you move your production server to it.
  • Support requests are handled against the written scope, so changes to features or supported versions are quoted separately.
  • Ask for the support hours, response expectations and release-testing cadence to be written into the retainer before work starts.

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.