"No plugin found" on Model Provider page when running from local source code #15012

Closed
opened 2026-02-21 19:19:47 -05:00 by yindo · 4 comments
Owner

Originally created by @baonudesifeizhai on GitHub (Jun 30, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.5

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

When following the official "Local Source Code Start" documentation to run Dify locally, the system appears to run correctly, but the built-in model provider plugins are not loaded. The "Model Provider" page consistently shows "No plugin found".
This seems to be caused by issues with the plugin_daemon service, which is not correctly configured or provisioned by the default local startup process.

Clone the repository: git clone https://github.com/langgenius/dify.git
Follow the "Local Source Code Start" guide exactly: https://docs.dify.ai/en/getting-started/install-self-hosted/local-source-code
Start middlewares: cd docker, cp middleware.env.example middleware.env, docker-compose -f docker-compose.middleware.yaml up -d
Set up and run the API and Worker services.
Set up and run the Web service.
Observe that the page shows "No plugin found".

Debugging and Findings
We performed a detailed step-by-step debugging process and found several issues not covered by the documentation:

  1. Missing dify_plugin Database:
    The plugin_daemon container fails to initialize properly. Checking its logs (docker logs docker_plugin_daemon_1) reveals a fatal error:
    [error] failed to initialize database, got error failed to connect to 'host=db user=postgres database=dify_plugin': server error (FATAL: database "dify_plugin" does not exist)
    Fix: We had to manually create this database by running docker exec docker_db_1 psql -U postgres -c "CREATE DATABASE dify_plugin;" and then restarting the plugin_daemon service. The documentation should be updated to include this step.

  2. Invalid Plugin Files (pycache):
    After fixing the database, the UI still showed "No plugin found". We realized the plugin_daemon's volume (docker/volumes/plugin_daemon/plugin) was empty. We copied the built-in plugins from api/core/tools/builtin_tool/providers/ into this volume. This led to a new error in the logs:
    [ERROR] list installed plugins failed: plugin_unique_identifier is not valid: audio/pycache/audio.cpython-312.pyc
    Fix: The cp -r command brought along pycache directories, which the service cannot parse. We had to manually find and delete these directories from the volume (sudo find ./volumes/plugin_daemon/plugin -type d -name "pycache" -exec rm -r {} +) and restart the service again.

  3. The core issue persists:
    Even after a complete cleanup (ensuring the DB exists and the plugin directories are present in the volume without any pycache files), the problem is not resolved.
    Final Hypothesis:
    By listing the final contents of the volume (sudo ls -R ./volumes/plugin_daemon/plugin/), we observed the following structure:
    Apply to plugin_daemo...
    The error message plugin_unique_identifier is not valid likely means the service is trying to interpret every file and folder inside audio (like _assets and audio.py) as a plugin, instead of treating the audio directory itself as the plugin. This suggests a structural incompatibility between the files in the repository and the expectations of the plugin_daemon service, or a missing build/preparation step for plugins that is not mentioned in the local startup guide.
    Suggested Action
    Could the development team please review the startup process for the plugin_daemon in a local source code environment? It seems the official documentation is missing critical steps, and even after manual intervention, the service does not load the plugins as expected.

✔️ Expected Behavior

Actual Behavior

Image

Originally created by @baonudesifeizhai on GitHub (Jun 30, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.5 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce When following the official "Local Source Code Start" documentation to run Dify locally, the system appears to run correctly, but the built-in model provider plugins are not loaded. The "Model Provider" page consistently shows "No plugin found". This seems to be caused by issues with the plugin_daemon service, which is not correctly configured or provisioned by the default local startup process. Clone the repository: git clone https://github.com/langgenius/dify.git Follow the "Local Source Code Start" guide exactly: https://docs.dify.ai/en/getting-started/install-self-hosted/local-source-code Start middlewares: cd docker, cp middleware.env.example middleware.env, docker-compose -f docker-compose.middleware.yaml up -d Set up and run the API and Worker services. Set up and run the Web service. Observe that the page shows "No plugin found". Debugging and Findings We performed a detailed step-by-step debugging process and found several issues not covered by the documentation: 1. Missing dify_plugin Database: The plugin_daemon container fails to initialize properly. Checking its logs (docker logs docker_plugin_daemon_1) reveals a fatal error: [error] failed to initialize database, got error failed to connect to 'host=db user=postgres database=dify_plugin': server error (FATAL: database "dify_plugin" does not exist) Fix: We had to manually create this database by running docker exec docker_db_1 psql -U postgres -c "CREATE DATABASE dify_plugin;" and then restarting the plugin_daemon service. The documentation should be updated to include this step. 2. Invalid Plugin Files (__pycache__): After fixing the database, the UI still showed "No plugin found". We realized the plugin_daemon's volume (docker/volumes/plugin_daemon/plugin) was empty. We copied the built-in plugins from api/core/tools/builtin_tool/providers/ into this volume. This led to a new error in the logs: [ERROR] list installed plugins failed: plugin_unique_identifier is not valid: audio/__pycache__/audio.cpython-312.pyc Fix: The cp -r command brought along __pycache__ directories, which the service cannot parse. We had to manually find and delete these directories from the volume (sudo find ./volumes/plugin_daemon/plugin -type d -name "__pycache__" -exec rm -r {} +) and restart the service again. 3. The core issue persists: Even after a complete cleanup (ensuring the DB exists and the plugin directories are present in the volume without any __pycache__ files), the problem is not resolved. Final Hypothesis: By listing the final contents of the volume (sudo ls -R ./volumes/plugin_daemon/plugin/), we observed the following structure: Apply to plugin_daemo... The error message plugin_unique_identifier is not valid likely means the service is trying to interpret every file and folder inside audio (like _assets and audio.py) as a plugin, instead of treating the audio directory itself as the plugin. This suggests a structural incompatibility between the files in the repository and the expectations of the plugin_daemon service, or a missing build/preparation step for plugins that is not mentioned in the local startup guide. Suggested Action Could the development team please review the startup process for the plugin_daemon in a local source code environment? It seems the official documentation is missing critical steps, and even after manual intervention, the service does not load the plugins as expected. ### ✔️ Expected Behavior ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/99bf05c7-b76b-456f-8f95-abad6f08060f)
yindo added the 🐞 bug label 2026-02-21 19:19:47 -05:00
yindo closed this issue 2026-02-21 19:19:47 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 30, 2025):

The "No plugin found" issue is likely due to a combination of missing database setup, plugin_daemon misconfiguration, and the way plugins are expected to be packaged and loaded.

First, the plugin_daemon requires the dify_plugin database to exist before startup. If it doesn't, you'll see fatal errors and no plugins will load. Manually creating the database, as you did, is necessary but not documented in the official guide.

Second, the plugin_daemon expects plugins to be uploaded as packages, not just copied as raw directories. Simply copying plugin folders (even after cleaning out pycache) doesn't work because the daemon scans for packaged plugins with specific metadata and structure, not loose files or folders. The actual logic for plugin discovery and validation is inside the plugin_daemon Docker image, not in the main Dify repo, so the exact requirements aren't visible or documented in the open source codebase reference.

To ensure the plugin_daemon works locally, make sure you:

  • Set PLUGIN_WORKING_PATH to /app/storage/cwd
  • Map the volume as ./volumes/plugin_daemon:/app/storage
  • Create the directory structure with mkdir -p ./volumes/plugin_daemon/cwd and set permissions with chmod -R 777 ./volumes/plugin_daemon
  • Add privileged: true to the plugin_daemon service in your compose file
  • Ensure a .env file is present with all relevant variables
  • Keep PLUGIN_STORAGE_LOCAL_PATH as /app/plugins if you need plugin storage reference

If you still see "No plugin found" after these steps, it's likely because the built-in plugins need to be packaged and uploaded via the API or admin UI, not just copied into the volume. Unfortunately, there is no public documentation or tooling for packaging and uploading built-in plugins for local development, and the plugin-daemon's internal logic is not open source.

If you need to proceed, monitor for updates to the documentation or plugin-daemon repo, as this is a known gap in the local development workflow.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 30, 2025): <!-- Answer --> The "No plugin found" issue is likely due to a combination of missing database setup, plugin_daemon misconfiguration, and the way plugins are expected to be packaged and loaded. First, the plugin_daemon requires the dify_plugin database to exist before startup. If it doesn't, you'll see fatal errors and no plugins will load. Manually creating the database, as you did, is necessary but not documented in the official guide. Second, the plugin_daemon expects plugins to be uploaded as packages, not just copied as raw directories. Simply copying plugin folders (even after cleaning out __pycache__) doesn't work because the daemon scans for packaged plugins with specific metadata and structure, not loose files or folders. The actual logic for plugin discovery and validation is inside the plugin_daemon Docker image, not in the main Dify repo, so the exact requirements aren't visible or documented in the open source codebase [reference](https://github.com/langgenius/dify/blob/eb9edf4908d59b410357212e00f93bb2ee6a349e/api/core/plugin/impl/plugin.py). To ensure the plugin_daemon works locally, make sure you: - Set `PLUGIN_WORKING_PATH` to `/app/storage/cwd` - Map the volume as `./volumes/plugin_daemon:/app/storage` - Create the directory structure with `mkdir -p ./volumes/plugin_daemon/cwd` and set permissions with `chmod -R 777 ./volumes/plugin_daemon` - Add `privileged: true` to the plugin_daemon service in your compose file - Ensure a `.env` file is present with all relevant variables - Keep `PLUGIN_STORAGE_LOCAL_PATH` as `/app/plugins` if you need plugin storage [reference](https://github.com/langgenius/dify/issues/20554) If you still see "No plugin found" after these steps, it's likely because the built-in plugins need to be packaged and uploaded via the API or admin UI, not just copied into the volume. Unfortunately, there is no public documentation or tooling for packaging and uploading built-in plugins for local development, and the plugin-daemon's internal logic is not open source. If you need to proceed, monitor for updates to the documentation or plugin-daemon repo, as this is a known gap in the local development workflow. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/62cd14c7-eb34-46db-99f6-c934c26c2e71?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21724)
Author
Owner

@baonudesifeizhai commented on GitHub (Jun 30, 2025):

@dosu Thank you so much for your expert-level analysis! This is incredibly helpful and clarifies why all of our previous attempts failed.
Your explanation perfectly captures the root cause of the problem: the plugin_daemon expects properly packaged and uploaded plugins, not just raw source files copied into a volume. The lack of public documentation on this packaging process is the key missing piece.
Just to confirm, we have followed all of your recommended configuration steps:
We manually created the dify_plugin database.
We modified the docker-compose.middleware.yaml to add privileged: true, set the correct volume mappings (./volumes/plugin_daemon:/app/storage), and configured the environment variables (PLUGIN_WORKING_PATH, etc.).
We created the necessary directory structure (./volumes/plugin_daemon/cwd) and set the permissions (chmod -R 777).
We added a depends_on condition to ensure the database starts before the plugin_daemon.
Unfortunately, even after applying all these fixes and restarting the services, the "No plugin found" issue persists.
This confirms your final conclusion: the problem isn't something we can solve by just manipulating files and directories. It's a fundamental gap in the local development workflow, where there's no documented tool or process to package and register the built-in plugins for the plugin_daemon.
Your insight has saved us a lot more time trying to debug a problem that can't be solved from the outside. We will monitor the official documentation for updates on this. Thanks again

@baonudesifeizhai commented on GitHub (Jun 30, 2025): @dosu Thank you so much for your expert-level analysis! This is incredibly helpful and clarifies why all of our previous attempts failed. Your explanation perfectly captures the root cause of the problem: the plugin_daemon expects properly packaged and uploaded plugins, not just raw source files copied into a volume. The lack of public documentation on this packaging process is the key missing piece. Just to confirm, we have followed all of your recommended configuration steps: We manually created the dify_plugin database. We modified the docker-compose.middleware.yaml to add privileged: true, set the correct volume mappings (./volumes/plugin_daemon:/app/storage), and configured the environment variables (PLUGIN_WORKING_PATH, etc.). We created the necessary directory structure (./volumes/plugin_daemon/cwd) and set the permissions (chmod -R 777). We added a depends_on condition to ensure the database starts before the plugin_daemon. Unfortunately, even after applying all these fixes and restarting the services, the "No plugin found" issue persists. This confirms your final conclusion: the problem isn't something we can solve by just manipulating files and directories. It's a fundamental gap in the local development workflow, where there's no documented tool or process to package and register the built-in plugins for the plugin_daemon. Your insight has saved us a lot more time trying to debug a problem that can't be solved from the outside. We will monitor the official documentation for updates on this. Thanks again
Author
Owner

@dosubot[bot] commented on GitHub (Jun 30, 2025):

You're absolutely correct—based on everything currently available, there is no public or documented way to package and register built-in plugins for the plugin_daemon in local development. All your troubleshooting steps align with best practices, and recent updates in the main repo and docs do not address this gap. There is ongoing development in plugin management (including related work in the dify-plugin-daemon repo), but nothing released yet that solves this for local setups. Keeping an eye on the main repo, dify-plugin-daemon, and the docs is the best approach for now. If a solution or official guidance becomes available, I'll share an update right away.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 30, 2025): <!-- Answer --> You're absolutely correct—based on everything currently available, there is no public or documented way to package and register built-in plugins for the plugin_daemon in local development. All your troubleshooting steps align with best practices, and recent updates in the main repo and docs do not address this gap. There is ongoing development in plugin management (including related work in the dify-plugin-daemon repo), but nothing released yet that solves this for local setups. Keeping an eye on the main repo, dify-plugin-daemon, and the docs is the best approach for now. If a solution or official guidance becomes available, I'll share an update right away. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6cf503c6-625b-47ce-95e4-9c939092e917?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21724)
Author
Owner

@baonudesifeizhai commented on GitHub (Jun 30, 2025):

Image
sorry my bad missing create a file named .env.local

@baonudesifeizhai commented on GitHub (Jun 30, 2025): ![Image](https://github.com/user-attachments/assets/21415360-7b52-42ec-aa9a-5b2425dcd93b) sorry my bad missing create a file named .env.local
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15012