Mattermost Logo
Edit on GitHub

  1. Install and setup Docker.

    Note: MM-9791 introduced using docker-compose to manage containers. To preserve your data on upgrade, execute the following steps.

    First, backup from any existing containers:

    mysqldump -h --column-statistics=0 -u mmuser -p mattermost_test > mm_mysql_backup.sql
    pg_dump -U mmuser -W -d mattermost_test -h > mm_postgres_backup.bak

    Then after upgrading and starting the new docker-compose managed containers, restore the data:

    mysql -u mmuser -p -h mattermost_test < mm_mysql_backup.sql
    psql -U mmuser -W -h -f mm_postgres_backup.bak mattermost_test

    If you don’t migrate your data, the new, docker-compose-managed containers will start out empty. To remove the old containers – destroying any existing data – use make clean-old-docker.

  2. Download and install Go from

  3. Install and setup babun from

  4. Setup the following environment variables (change the paths accordingly):

    export PATH="/c/Program Files/go/bin":$PATH
    export PATH="/c/Program Files/nodejs":$PATH
    export PATH="/c/Program Files/Git/bin":$PATH
    export GOROOT="c:\\Program Files\\go"
    export GOPATH="c:\\User\\{user-name}\\go"
    export PATH="/c/Program Files/Docker Toolbox":$PATH # change the path accordingly if you are using Docker for Windows
    eval $(docker-machine env default) # skip this line if you are using Docker for Windows
  5. Fork

  6. Clone the Mattermost source code from your fork:

    git clone
  7. Start the server and test your environment:

    cd mattermost-server
    make run-server
    curl http://localhost:8065/api/v4/system/ping
    make stop-server

    If successful, the curl step will return a JSON object containing "status":"OK".

    Note: Browsing directly to http://localhost:8065/ will display a 404 Not Found until the web app is configured. See Web App Developer Setup and Mobile App Developer Setup for additional setup.

    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