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 Xcode to latest version (>=v13.4.1)

  1. Open Terminal

  2. Install NodeJS from one of the following sources:

    1. nvm:

      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
          nvm install --lts
          
    2. NodeSource:

      sudo apt-get update
          sudo apt-get install -y ca-certificates curl gnupg
          sudo mkdir -p /etc/apt/keyrings
          curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
          echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
          sudo apt-get update
          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 NodeJS via nvm:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
        nvm install --lts
        
  3. Install other 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 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 NodeJS via nvm:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
        nvm install --lts
        
  3. Install other dependencies:

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

    sudo apt install 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 set up a Mattermost server 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 that up here:

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
    

Did you find what you were looking for?

Thank you! We appreciate your feedback.
ร—

Tell us more

Your feedback helps us improve the Mattermost developer documentation.

Have a feature request? Share it here.

Having issues? Join our Community server.