Mattermost Logo
Edit on GitHub

  1. Install and configure Docker CE:

    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    sudo usermod -aG docker $(whoami)
    docker login

    If you prefer to perform these steps manually:

  2. Add dockerhost as an alias for 127.0.0.1 for use by various Mattermost build scripts:

    • Edit /etc/hosts file as an administrator (e.g. sudo) and add the following line:

      127.0.0.1    dockerhost
  3. Install Go:

    sudo yum group install "Development Tools"
    sudo yum install -y wget libpng12
    wget https://storage.googleapis.com/golang/go1.12.linux-amd64.tar.gz
    sudo tar -C /usr/local -xzf go1.12.linux-amd64.tar.gz
  4. Update your shell’s initialization script (e.g. .bashrc or .zshrc) and add the following:

    export GOPATH=$HOME/go
    export PATH=$PATH:$GOPATH/bin
    export PATH=$PATH:/usr/local/go/bin
  5. Edit /etc/security/limits.conf as an administrator (e.g. sudo) and add the following lines, replacing {username} with your username:

    {username}  soft  nofile  8096
    {username}  hard  nofile  8096
  6. Logout and login to effect the changes above.

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

  8. Clone the Mattermost source code from your fork:

    export GITHUB_USERNAME=my_username
    mkdir -p $(go env GOPATH)/src/github.com/mattermost
    git clone https://github.com/$GITHUB_USERNAME/mattermost-server.git $(go env GOPATH)/src/github.com/mattermost/mattermost-server
  9. Start the server and test your environment:

    cd $(go env GOPATH)/src/github.com/mattermost/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:

    {"AndroidLatestVersion":"","AndroidMinVersion":"","DesktopLatestVersion":"","DesktopMinVersion":"","IosLatestVersion":"","IosMinVersion":"","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.