-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Welcome to the mattermost_ynh
wiki! Here are some tips about advanced Mattermost
usage.
mmctl
is the command-line tool to interact with a Mattermost installation. It can manage channels, teams, users, etc. (➡️ mmctl Documentation).
It can manage either:
- a remote Mattermost server (using an admin token),
- or a local Mattermost server (using the local mode).
Usually the easiest way to use mmctl
is to enable local mode.
-
Edit Mattermost's
config.json
file, and setEnableLocalMode
to"true"
:sudo sed -i 's/"EnableLocalMode": false/"EnableLocalMode": true/g' /var/www/mattermost/config/config.json
In addition as of version
7.2.0~ynh1
to solve the following errorError: socket file "/var/run/mattermost/mattermost_local.socket" doesn't exists, please check the server configuration for local mode
, the parameterLocalModeSocketLocation
has to be modified to"/var/run/mattermost/mattermost_local.socket"
. -
Restart the Mattermost server:
sudo systemctl restart mattermost
-
Tell
mmctl
to run using local mode, by setting two environment variables:export MMCTL_LOCAL=true export MMCTL_LOCAL_SOCKET_PATH=/var/run/mattermost/mattermost_local.socket
-
Now you can run
mmctl
commands (with the full path). For instance, to list all registered users:sudo --preserve-env /var/www/mattermost/bin/mmctl user list