Distribute a custom desktop app#

You can customize and distribute your own Mattermost desktop application by configuring src/common/config/buildConfig.ts.

  1. Configure the desktop app’s buildConfig.ts file. You can configure the following parameters to customize the user experience, including defaultTeams, helpLink, and enableServerManagement.

  2. Follow the Mattermost Desktop Development Guide to build the application.

  3. Distribute the application to your users.

defaultTeams#

List of server URLs and their display names added to the desktop app by default, which the user cannot modify. Users can still add servers through the Server Management page unless enableServerManagement is set to false. Expects an array of key-value pairs.

Example:

defaultTeams: [
  {
    name: 'example',
    url: 'https://example.com'
  },
  {
    name: 'mattermost',
    url: 'https://www.mattermost.com'
  }
]

enableServerManagement#

Controls whether users can add, edit, or remove servers on the app settings page. If set to false, at least one server must be specified for defaultTeams or else users cannot interact with any servers. Expects a boolean, true or false.

Example:

enableServerManagement: true

Managed resources#

Custom builds of the Mattermost desktop app support managed resources which are services available on the same hostname and protocol as the Mattermost server.

To configure managed resources, add their path to the managedResources field in your configuration file. Selecting a managed resource opens it as a pop-up window in the desktop app.

Additionally, you must configure the :ref:Managed Resource Paths <configure/environment-configuration-settings:managed resource paths>` server configuration setting. For example, adding the /video path:

[...]
  managedResources: ['trusted', 'video'],
[...]

Below are examples of server URLs with valid and invalid managed resource URLs:

Server: https://mattermost.my.org

  • Valid: https://mattermost.my.org/video

  • Valid: https://mattermost.my.org/conference

  • Invalid: http://mattermost.my.org/video (different protocol)

  • Invalid: https://conference.my.org (different origin)

Server: https://my.org/mattermost

  • Valid: https://my.org/video

  • Valid: https://my.org/conference

  • Invalid: http://my.org/video (different protocol)

  • Invalid: https://conference.my.org (different origin)