How to Increase the Maximum Dify Plugin Package Size: 3 Configuration Changes

To increase the maximum Dify plugin package size, you must set PLUGIN_MAX_PACKAGE_SIZE to your desired byte limit (e.g., 524288000 for 500 MiB), disable strict signature verification with FORCE_VERIFYING_SIGNATURE=false, and update NGINX_CLIENT_MAX_BODY_SIZE to match, then restart your Dify services.

When working with large Dify plugins that contain machine learning models or extensive dependencies, the default upload restrictions often block installation. This guide explains how to increase the maximum Dify plugin package size by modifying three critical environment variables in the Dify platform configuration. According to the junjiem/dify-plugin-repackaging repository, these limits are enforced by the Dify runtime itself—not the repackaging script—and are documented in the project's README.md at lines 18-22.

Understanding the Dify Plugin Size Limit Architecture

The size restrictions are implemented in the Dify platform's runtime configuration, not in the plugin_repackaging.sh script. When you execute the repackaging script, it downloads and prepares the plugin package, but the Dify platform validates the package size during the installation phase. If the package exceeds the default PLUGIN_MAX_PACKAGE_SIZE, the platform rejects the upload regardless of the repackaging script's output.

Required Environment Variables for Larger Plugin Packages

To enable installation of plugin packages up to 500 MiB or more, configure these three variables in the Dify platform's .env file:

  • FORCE_VERIFYING_SIGNATURE: Set to false to disable the marketplace-only signature check. This allows installation of repackaged plugins that may not originate from the official marketplace.

  • PLUGIN_MAX_PACKAGE_SIZE: Defines the maximum allowed size in bytes. Set this to 524288000 to allow packages up to 500 MiB.

  • NGINX_CLIENT_MAX_BODY_SIZE: Configures the Nginx reverse proxy to accept larger HTTP request bodies. Set this to 500M to match the PLUGIN_MAX_PACKAGE_SIZE value.

Step-by-Step Configuration to Increase Maximum Dify Plugin Package Size

Edit the Dify Platform .env File

Locate the .env file in your Dify platform installation directory (not the junjiem/dify-plugin-repackaging repository). Add or modify these entries:


# Open the Dify platform .env file

vim /path/to/dify/.env

# Add or modify the following entries

FORCE_VERIFYING_SIGNATURE=false
PLUGIN_MAX_PACKAGE_SIZE=524288000   # 500 MiB

NGINX_CLIENT_MAX_BODY_SIZE=500M

Configure Docker Compose Environment

Ensure your docker-compose.yml properly references the .env file:

services:
  dify:
    image: dify/dify:latest
    env_file:
      - ./.env               # Contains the three variables above

    ports:
      - "80:80"
    restart: unless-stopped

Restart Dify Services

Apply the changes by restarting the containers:

docker-compose down && docker-compose up -d

Repackaging Large Plugins After Limit Increase

Once the platform configuration is updated, use the plugin_repackaging.sh script to download large plugins. The script operates independently of size constraints:


# Repackage a large plugin (e.g., 400 MiB) once the platform limit is increased

./plugin_repackaging.sh market langgenius agent 0.1.0

The script downloads the specified plugin version and dependencies, creating a package that the now-configured Dify platform can accept.

Summary

  • Size limits are enforced by the Dify platform runtime, not the junjiem/dify-plugin-repackaging script.
  • Set PLUGIN_MAX_PACKAGE_SIZE to the desired byte value (e.g., 524288000 for 500 MiB).
  • Disable FORCE_VERIFYING_SIGNATURE to allow non-marketplace plugin installation.
  • Update NGINX_CLIENT_MAX_BODY_SIZE to prevent Nginx upload errors.
  • Restart Dify services after modifying the .env file.

Frequently Asked Questions

What is the default Dify plugin package size limit?

The default limit varies by Dify version but is significantly smaller than 500 MiB. The platform rejects any upload exceeding the PLUGIN_MAX_PACKAGE_SIZE value configured in the .env file, which defaults to a conservative threshold suitable for standard marketplace plugins.

Do I need to modify plugin_repackaging.sh to handle larger packages?

No. The plugin_repackaging.sh script in the junjiem/dify-plugin-repackaging repository does not enforce size limits. It downloads and repackages plugins regardless of their size; the Dify platform's runtime configuration determines whether the resulting package can be successfully installed.

Where is the .env file located in a Docker deployment?

In standard Dify Docker deployments, the .env file resides in the root directory of the Dify platform installation, alongside docker-compose.yml. This is separate from the junjiem/dify-plugin-repackaging repository, which contains the repackaging script but not the platform configuration files.

Why must I disable FORCE_VERIFYING_SIGNATURE for large plugins?

Setting FORCE_VERIFYING_SIGNATURE=false removes the restriction limiting plugin installation to official marketplace sources only. Large repackaged plugins often trigger this check because they are processed through the repackaging script rather than downloaded directly from the Dify marketplace, even when properly signed.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →