junjiem/dify-plugin-repackaging
Scripting tool for downloading Dify plugin package from Dify Marketplace and Github and repackaging [true] offline package.
Dify Plugin Repackaging
What it is – A small utility that downloads Dify AI platform plugins (from the official Marketplace, from GitHub, or from a local .difypkg file) and repackages them so they can be installed on a Dify instance that runs on a different OS/architecture.
Why it exists – Dify only accepts plugins built for the exact platform of the server (e.g., many‑linux 2014 x86_64). The script automates the steps of fetching the original package, extracting it, and rebuilding it with the appropriate manylinux tag, letting developers ship the same plugin to both amd64 and arm64 hosts.
How to use
- GitHub Action – Fork the repo, enable the provided workflow, run it, and download the generated artifact. The screenshots in the README show the UI steps.
- Docker – Build the image (
docker build -t dify-plugin-repackaging .) and run it, mounting a local directory so the repackaged .difypkg appears on the host. The defaultCMDrunsplugin_repackaging.shwith example arguments; you can override it with your own parameters. - Direct script – Clone the repo and call
./plugin_repackaging.sh:- Marketplace:
./plugin_repackaging.sh market <plugin-name> <plugin-version> - GitHub:
./plugin_repackaging.sh github <repo> <tag> <output-name> - Local:
./plugin_repackaging.sh local ./my_plugin.difypkg - Add
-p manylinux_2_17_x86_64(ormanylinux_2_17_aarch64) to target a different platform.
- Marketplace:
Prerequisites
- Linux (RPM‑based) or macOS; the script installs
unzipviayum/dnfon RPM systems. - Python 3.12.x (same version used by
dify-plugin-daemon). - Docker (optional) if you prefer containerised execution.
Key configuration tweaks – To install repackaged plugins on a Dify server, the README suggests three .env changes:
FORCE_VERIFYING_SIGNATURE=false # allow unsigned plugins
PLUGIN_MAX_PACKAGE_SIZE=524288000 # raise size limit to 500 MiB
NGINX_CLIENT_MAX_BODY_SIZE=500M # let Nginx accept larger uploads
These settings relax Dify’s default security and size checks.
Typical workflow
- Identify the plugin you need (e.g.,
langgenius agent 0.0.9). - Run the script (or the Docker container) with the appropriate source (
market,github, orlocal). - The script produces a
.difypkgfile in the mounted directory. - In the Dify UI, go to Plugin Management → Local Package File and upload the generated file.
Who might need this – Developers extending a self‑hosted Dify deployment, especially when they want to run community plugins on ARM servers or on environments where the official Marketplace binaries are unavailable.
License / community – The repository is open‑source (license not specified in the README) and shows a star‑history badge, indicating some community interest.
Related
- Project
- Project
- Project
- Project