Edit on GitHub

Set up your development environment

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

Setup the Mattermost Server 

  1. Install Docker.

  2. Install Go.

  3. Increase the number of available file descriptors. Update your shell’s initialization script (e.g. .bashrc or .zshrc), and add the following:

    ulimit -n 8096
  4. Install NVM and use it to install the required version of Node.js:

    • First, install NVM by following these instructions.

    • Then, use NVM to install the correct version of Node.js for the Mattermost web app:

      nvm install
  5. If you don’t have it already, install libpng with your preferred package manager.

  6. Fork https://github.com/mattermost/mattermost-server.

  7. Clone the Mattermost source code from your fork:

    git clone https://github.com/YOUR_GITHUB_USERNAME/mattermost-server.git
  8. Start the server:

    cd server
    make run-server
  9. Test your environment:

    curl http://localhost:8065/api/v4/system/ping

    If successful, the curl step will return a JSON object:

  10. Run the webapp and watch:

    make run
  11. Stop the server:

    make stop-server

    The stop-server make target does not stop all the docker containers started by run-server. To stop the running docker containers:

    make stop-docker
  12. Set your options:

    Some behaviors can be customized such as running the server in the foreground as described in the config.mk file in the server directory. See that file for details.

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.