Mmctl tool installation


Im trying to install the mmctl tools on my server (unRAID) which is running the mattermost self hosted docker container but I can’t seem to figure this out… could someone that has some experience please shed some light on how i can accomplish this. I’ve searched high and low … i just dont get it.


Please someone??? I could use a little help

Hi @ryanleeis and welcome to the Mattermost forums!

You do not really need to install mmctl, it’s just a binary that is bundled with every Mattermost server installation (default path is /opt/mattermost/bin/mmctl) but if you want to download the latest version or want to run it on a server where the Mattermost application server is not installed (or if your Mattermost setup is inside a container and you do not want to use docker exec to run mmctl, you can download it from the GitHub releases page and extract it to whatever location you like, f.ex. ’ /usr/local/bin/mmctl` using the below command:

wget -O- | tar xf - > /usr/local/bin/mmctl

I guess I don’t really understand how to run commands with mmctl… I want to remove some users and channels teams etc…

I open the console on the Mattermost docker container and this is what I get

$ mmctl
panic: user: unknown userid 99

goroutine 1 [running]: +0x58

This is not really a mmctl issue you’re seeing here, it seems as if you’ve started the docker console with an invalid user account. How did you invoke the command? Can you post a full console session here so we can see probable causes for this?
Also, are you using docker or podman and what instructions did you follow to set up the Mattermost environment?

I setup Mattermost with the community apps located in unraid. and I just opened the console on then Mattermost docker and ran mmctl

im sorry im kinda new to this… sorry if the questions and answers seem a bit stupid.

If this is a prebuilt app on unraid, then you would have to get in touch with their support I guess - not sure how I can help here, I’m not familiar with unraid, nor do I have an account there so I could test that. Let me asure you that this is an issue with the container that has been provided there, so not sure how to work around it because I also do not know what kind of access level you have there.

Do you have SSH access to the server instance there or just a web interface? If you do have SSH access, you can also install mmctl directly on the server and not inside the container using the wget command from above, but not sure if you will have root privileges there. If you don’t, just change the path at the end of the command from /usr/local/bin/mmctl to something you’re allowed to write to, f.ex. $HOME/mmctl. From then one, you can use mmctl directly from the commandline:

cd $HOME