megaphone icon We're improving your developer experience.
Edit on GitHub

Set up your development environment

Set up your development environment for building, running, and testing the Mattermost Desktop App.

Dependencies 

  1. Install Homebrew: http://brew.sh

  2. Open Terminal

  3. Install dependencies

    brew install node@16 git python3
    
  4. Add NodeJS to PATH:

    echo 'export PATH="/usr/local/opt/node@16/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
    

For machines using the M1 architecture:

  1. Use the latest NodeJS@16 (>=v16.16)

  2. Update {{< newtabref href=“https://developer.apple.com/xcode/" title=“Xcode” >}} to latest version (>=v13.4.1)

  1. Open Terminal

  2. Install NodeJS from NodeSource:

    curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    • You might need to install curl as well:

      sudo apt install curl
      
  3. Install other dependencies:

    Linux requires the X11 developement libraries and libpng to build native Node modules.

    sudo apt install git python3 g++ libx11-dev libxtst-dev libpng-dev
    

Notes 

  • To build RPMs, you need rpmbuild:

    sudo apt install rpm
    
  1. Install Chocolatey: https://chocolatey.org/install

  2. Install Visual Studio Community: https://visualstudio.microsoft.com/vs/community/

    • Include Desktop development with C++ when installing
  3. Open PowerShell

  4. Install dependencies

    choco install nodejs-lts git python3
    
  5. Restart PowerShell (to refresh the environment variables)

NOTE: We don’t officially support Arch Linux for use with the Mattermost Desktop App. The provided guide is unofficial.

  1. Open Terminal

  2. Install dependencies:

    Linux requires the X11 developement libraries and libpng to build native Node modules. Arch requires libffi since it’s not installed by default.

    sudo pacman -S install nodejs npm git python3 gcc make libx11 libxtst libpng libffi
    

Notes 

  • To build RPMs, you need rpmbuild

    sudo pacman -S install rpm
    

NOTE: We don’t officially support Fedora/Red Hat/CentOS Linux for use with the Mattermost Desktop App. The provided guide is unofficial.

  1. Open Terminal

  2. Install dependencies:

    Linux requires the X11 developement libraries and libpng to build native Node modules.

    sudo apt install nodejs git python3 g++ libX11-devel libXtst-devel libpng-devel`
    

Notes 

  • To build RPMs, you need rpmbuild:

    sudo dnf install rpm-build
    

Mattermost Server 

To develop with the Desktop App, we recommend that you setup a Mattermost server and webapp instance specifically for this purpose. This lets you customize it as needed in cases where there are specific integration requirements needed for testing.

You can find information on setting up those instances here:

Server Developer Setup
Webapp Developer Setup

Alternatively, for some changes you may be able to test using an existing Mattermost instance, or one that has been deployed on platforms like Docker, Linux, Kubernetes, Heroku, or others. Please refer to the Mattermost Deployment Guide for more info.

Repo setup 

  1. Fork GitHub Repository: https://github.com/mattermost/desktop

  2. Clone from your repo:

    git clone https://github.com/<YOUR_GITHUB_USERNAME>/desktop.git
    
  3. Open the desktop directory

    cd desktop
    
  4. Install Node Modules

    npm i
    
  5. Run the application

    npm run watch