Skip to content

intro to the mattermost CLI

At work we have been building out our demo environments and looking to create a re-usable Github repo for deploying and configuring Mattermost. The aim is to automate as much as possible of the mattermost deployment. Mattermost can be configured using the API or the CLI. These are my adventures with the CLI….

The updates from the CLI are automatically written to the config.json. There are some considerations when changing settings:

  • Dotted Notation: you have to put the section of json file ahead of the config setting. Shown below as TeamSettings.ExperimentalDefaultChannels
  • Arrays: CLI accepts multiple values for array settings. In the example as Public-Channel01 PublicChannel-02
"ExperimentalDefaultChannels": []

sudo ./mattermost config set TeamSettings.ExperimentalDefaultChannels Public-Channel01 PublicChannel-02

"ExperimentalDefaultChannels": [
    "Public-Channel01",
    "PublicChannel-02"
]

I’ll will add to this post over time so it is a resource to keep coming back to.

But for now this is the story so far…

Published inTips

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *