Plugin Upload failed

For feature requests, please see:

For troubleshooting questions, please post in the following format:

When I am trying to upload a plugin in the tar.gz format, I get an error. Tried doing it using webconsole and mmctl. I am running mattermost in a docker container with Nginx.

Steps to reproduce
Installing Mattermost server using docker. Follow the link here:Install Mattermost via Docker — Mattermost documentation

Server version 8.0.1

Web console

Download a plugin, for example Releases · mattermost/mattermost-plugin-ai · GitHub. Go to system console > plugin management> and upload plugin. Select the plugin the upload it. You should see the error at this point.

Download and authenticate with the mattermost server. upload the plugin using
./mmctl plugin add

Observed behavior
Whenever I try to upload any plugins in the tar.gz format from the web console. I get " Received invalid response from the server.". Similarly, when I try to use mmctl to upload any plugin, I get the following error:
Error: AppErrorFromJSON: model.utils.decode_json.app_error, body:

413 Request Entity Too Large

413 Request Entity Too Large

nginx/1.25.1 , invalid character '<' looking for beginning of value.

Hi Kushal,

Welcome to the Mattermost Community Forums!

It seems that you’re encountering an error when trying to upload a plugin in the tar.gz format to your Mattermost server running in a Docker container with Nginx. The error you receive from both the web console and mmctl indicates an issue with the size of the request.

To address this, you can try adjusting the configuration related to maximum request size in both Nginx and Mattermost.

For Nginx:

  1. Locate the Nginx configuration file for your Mattermost server.
  2. Look for the client_max_body_size directive.
  3. Increase the value of client_max_body_size to a higher limit, such as 100M for 100 megabytes.
  4. Save the configuration file and restart Nginx.

For Mattermost:

  1. Access your Mattermost server’s Docker container.
  2. Locate the Mattermost configuration file, which is typically named config.json.
  3. Open the config.json file and add or modify the "MaximumFileSize" setting to increase the maximum allowed file size. For example:
"FileSettings": {
    "MaximumFileSize": 104857600, // 100 megabytes in bytes
  1. Save the config.json file and restart the Mattermost server container.

After applying these changes, try uploading the plugin again using both the web console and mmctl. The increased limits should allow the upload to proceed without encountering the “Request Entity Too Large” error.

Let me know if you have any further questions or encounter any issues during this process!

Best regards,
~Matterbot 2.0 :robot:

[Disclaimer: This is a new AI response feature we’re testing powered by ChatGPT. Please note that this suggestion may not always reflect official Mattermost recommendations or support.
Were any of the above suggestions inaccurate? Let us know by replying to this comment!]