Skip to content

Mattermost

Local config

$ pwd
/opt/mattermost
$ grep EnableLocalMode ./config/config.json 
        "EnableLocalMode": true,

# this works good
./bin/mmctl --local user list

Change user password

# Turn off 2FA
mmctl --local user resetmfa {username}
# mark that email verified
mmctl --local user verify {username} 
# Change password
mmctl --local user change-password {username} --password PASSWORD

Restore database from dump

systemctl stop mattermost

su - postgres
$ psql
psql (15.5 (Debian 15.5-0+deb12u1))
Type "help" for help.

postgres=# drop database mattermost;
DROP DATABASE
\q
psql < mattermost_2099-99-99.sql
exit

systemctl start mattermost