The knowledge base interface reports an error after migrating Dify from the test environment to the production environment. #21801

Open
opened 2026-02-21 20:14:22 -05:00 by yindo · 7 comments
Owner

Originally created by @Latte-S on GitHub (Jan 20, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.5.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After migrating the entire Dify package from one Linux server to another, the knowledge base interface fails to open and reports the error "Invalid plugin id Xorbits Inference".

✔️ Expected Behavior

I hope someone can tell me the reason and provide a solution. Thank you.

Actual Behavior

Initially during deployment, after downloading the Dify installation package, it was uploaded to the test server in an offline environment and launched using docker-compose. It worked without any issues. However, when the images, data, and other components used by Dify were packaged and uploaded to the production server in an offline environment, and launched using docker-compose as well, Dify started normally and functioned without errors. But after a few days, clicking on the "Knowledge Base" link in the interface failed to load any existing knowledge bases, and the error "Invalid plugin id Xorbits Inference" appeared.

Originally created by @Latte-S on GitHub (Jan 20, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [ ] 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, otherwise it will be closed. - [ ] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.5.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After migrating the entire Dify package from one Linux server to another, the knowledge base interface fails to open and reports the error "Invalid plugin id Xorbits Inference". ### ✔️ Expected Behavior I hope someone can tell me the reason and provide a solution. Thank you. ### ❌ Actual Behavior Initially during deployment, after downloading the Dify installation package, it was uploaded to the test server in an offline environment and launched using docker-compose. It worked without any issues. However, when the images, data, and other components used by Dify were packaged and uploaded to the production server in an offline environment, and launched using docker-compose as well, Dify started normally and functioned without errors. But after a few days, clicking on the "Knowledge Base" link in the interface failed to load any existing knowledge bases, and the error "Invalid plugin id Xorbits Inference" appeared.
yindo added the 🐞 bugstale labels 2026-02-21 20:14:22 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 20, 2026):

Hi @Latte-S! I'm Dosu and I’m helping the dify team.

The "Invalid plugin id Xorbits Inference" error after migration is almost always caused by a mismatch or missing plugin registration, credential, or encryption key in your new environment. Dify expects plugin IDs to follow a strict format and for all plugin/provider records, credentials, and keys to be present and consistent in the database and filesystem. Here’s what to check and how to fix it:

  1. Make sure the privkeys directory (usually in your Docker volume storage) was copied and is correctly mapped in your production Docker setup. This directory contains tenant-specific private RSA keys required to decrypt provider and plugin credentials. If it's missing or mismatched, plugins will fail to load or decrypt, causing errors like this [source].
  2. The SECRET_KEY in your .env file must be identical to your test environment. Do not regenerate it; changing it breaks JWT and signature verification, but provider config decryption relies on the privkeys directory and database keys [source].
  3. If you only copied files/volumes and not the database, your plugin/provider records may be missing. You may need to manually re-register plugin credentials and provider records in the database. For recent Dify versions, credentials are stored in the provider_credentials table and linked to providers via the credential_id field in the providers table. You can use a Flask shell inside your Docker container to insert or fix these records [source].
  4. Run the official migration commands inside your Docker environment to ensure all backend records are present:
    uv run flask extract-plugins --workers=20
    uv run flask install-plugins --workers=2
    uv run flask migrate-data-for-plugin
    
    Skipping these can cause missing plugin/model records and errors like this [source].
  5. After any changes, fully restart all Dify services and clear plugin caches to avoid stale configs. Sometimes, you may need to remove and reinstall the plugin to force re-registration [source].
  6. Double-check your Docker network and environment variables (like PLUGIN_DAEMON_URL) to ensure all containers can communicate and the plugin daemon is reachable [source].
  7. If you’re in an offline environment, make sure you used a repackaged plugin (with all dependencies bundled) and set FORCE_VERIFYING_SIGNATURE=false in your .env file [source].

If you follow these steps and still see the error, check your logs for any decryption or plugin daemon errors—they often point directly to the missing file, key, or config.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 20, 2026): <!-- Greeting --> Hi @Latte-S! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The "Invalid plugin id Xorbits Inference" error after migration is almost always caused by a mismatch or missing plugin registration, credential, or encryption key in your new environment. Dify expects plugin IDs to follow a strict format and for all plugin/provider records, credentials, and keys to be present and consistent in the database and filesystem. Here’s what to check and how to fix it: 1. Make sure the `privkeys` directory (usually in your Docker volume storage) was copied and is correctly mapped in your production Docker setup. This directory contains tenant-specific private RSA keys required to decrypt provider and plugin credentials. If it's missing or mismatched, plugins will fail to load or decrypt, causing errors like this [[source]](https://github.com/langgenius/dify-official-plugins/issues/1109). 2. The `SECRET_KEY` in your `.env` file must be identical to your test environment. Do not regenerate it; changing it breaks JWT and signature verification, but provider config decryption relies on the `privkeys` directory and database keys [[source]](https://github.com/langgenius/dify-official-plugins/issues/1109). 3. If you only copied files/volumes and not the database, your plugin/provider records may be missing. You may need to manually re-register plugin credentials and provider records in the database. For recent Dify versions, credentials are stored in the `provider_credentials` table and linked to providers via the `credential_id` field in the `providers` table. You can use a Flask shell inside your Docker container to insert or fix these records [[source]](https://github.com/langgenius/dify-official-plugins/issues/1629). 4. Run the official migration commands inside your Docker environment to ensure all backend records are present: ``` uv run flask extract-plugins --workers=20 uv run flask install-plugins --workers=2 uv run flask migrate-data-for-plugin ``` Skipping these can cause missing plugin/model records and errors like this [[source]](https://github.com/langgenius/dify-official-plugins/issues/1145). 5. After any changes, fully restart all Dify services and clear plugin caches to avoid stale configs. Sometimes, you may need to remove and reinstall the plugin to force re-registration [[source]](https://github.com/langgenius/dify-official-plugins/issues/1145). 6. Double-check your Docker network and environment variables (like `PLUGIN_DAEMON_URL`) to ensure all containers can communicate and the plugin daemon is reachable [[source]](https://github.com/langgenius/dify-official-plugins/issues/1926). 7. If you’re in an offline environment, make sure you used a repackaged plugin (with all dependencies bundled) and set `FORCE_VERIFYING_SIGNATURE=false` in your `.env` file [[source]](https://github.com/langgenius/dify-official-plugins/issues/1629). If you follow these steps and still see the error, check your logs for any decryption or plugin daemon errors—they often point directly to the missing file, key, or config. <!-- 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/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fc306055-126d-4dad-a69d-cce3507c39fe?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22Invalid%20plugin%20id%20Xorbits%20Inference%22%20error%20after%20migration%20is%20almost%20always%20caused%20by%20a%20mismatch%20or%20missing%20plugin%20registration%2C%20credential%2C%20or%20encryption%20key%20in%20your%20new%20environment.%20Dify%20expects%20plugin%20IDs%20to%20follow%20a%20strict%20format%20and%20for%20all%20plugin/provider%20records%2C%20credentials%2C%20and%20keys%20to%20be%20present%20and%20consistent%20in%20the%20database%20and%20filesystem.%20Here%E2%80%99s%20what%20to%20check%20and%20how%20to%20fix%20it%3A%0A%0A1.%20Make%20sure%20the%20%60privkeys%60%20directory%20%28usually%20in%20your%20Docker%20volume%20storage%29%20was%20copied%20and%20is%20correctly%20mapped%20in%20your%20production%20Docker%20setup.%20This%20directory%20contains%20tenant-specific%20private%20RSA%20keys%20required%20to%20decrypt%20provider%20and%20plugin%20credentials.%20If%20it%27s%20missing%20or%20mismatched%2C%20plugins%20will%20fail%20to%20load%20or%20decrypt%2C%20causing%20errors%20like%20this%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1109%29.%0A2.%20The%20%60SECRET_KEY%60%20in%20your%20%60.env%60%20file%20must%20be%20identical%20to%20your%20test%20environment.%20Do%20not%20regenerate%20it%3B%20changing%20it%20breaks%20JWT%20and%20signature%20verification%2C%20but%20provider%20config%20decryption%20relies%20on%20the%20%60privkeys%60%20directory%20and%20database%20keys%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1109%29.%0A3.%20If%20you%20only%20copied%20files/volumes%20and%20not%20the%20database%2C%20your%20plugin/provider%20records%20may%20be%20missing.%20You%20may%20need%20to%20manually%20re-register%20plugin%20credentials%20and%20provider%20records%20in%20the%20database.%20For%20recent%20Dify%20versions%2C%20credentials%20are%20stored%20in%20the%20%60provider_credentials%60%20table%20and%20linked%20to%20providers%20via%20the%20%60credential_id%60%20field%20in%20the%20%60providers%60%20table.%20You%20can%20use%20a%20Flask%20shell%20inside%20your%20Docker%20container%20to%20insert%20or%20fix%20these%20records%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1629%29.%0A4.%20Run%20the%20official%20migration%20commands%20inside%20your%20Docker%20environment%20to%20ensure%20all%20backend%20records%20are%20present%3A%0A%20%20%20%60%60%60%0A%20%20%20uv%20run%20flask%20extract-plugins%20--workers%3D20%0A%20%20%20uv%20run%20flask%20install-plugins%20--workers%3D2%0A%20%20%20uv%20run%20flask%20migrate-data-for-plugin%0A%20%20%20%60%60%60%0A%20%20%20Skipping%20these%20can%20cause%20missing%20plugin/model%20records%20and%20errors%20like%20this%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1145%29.%0A5.%20After%20any%20changes%2C%20fully%20restart%20all%20Dify%20services%20and%20clear%20plugin%20caches%20to%20avoid%20stale%20configs.%20Sometimes%2C%20you%20may%20need%20to%20remove%20and%20reinstall%20the%20plugin%20to%20force%20re-registration%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1145%29.%0A6.%20Double-check%20your%20Docker%20network%20and%20environment%20variables%20%28like%20%60PLUGIN_DAEMON_URL%60%29%20to%20ensure%20all%20containers%20can%20communicate%20and%20the%20plugin%20daemon%20is%20reachable%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1926%29.%0A7.%20If%20you%E2%80%99re%20in%20an%20offline%20environment%2C%20make%20sure%20you%20used%20a%20repackaged%20plugin%20%28with%20all%20dependencies%20bundled%29%20and%20set%20%60FORCE_VERIFYING_SIGNATURE%3Dfalse%60%20in%20your%20%60.env%60%20file%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1629%29.%0A%0AIf%20you%20follow%20these%20steps%20and%20still%20see%20the%20error%2C%20check%20your%20logs%20for%20any%20decryption%20or%20plugin%20daemon%20errors%E2%80%94they%20often%20point%20directly%20to%20the%20missing%20file%2C%20key%2C%20or%20config.)&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/31311)
Author
Owner

@Latte-S commented on GitHub (Jan 20, 2026):

I have not installed the Xorbits Inference plugin.

@Latte-S commented on GitHub (Jan 20, 2026): I have not installed the Xorbits Inference plugin.
Author
Owner

@fatelei commented on GitHub (Jan 20, 2026):

I have not installed the Xorbits Inference plugin.

you can install it

@fatelei commented on GitHub (Jan 20, 2026): > I have not installed the Xorbits Inference plugin. you can install it
Author
Owner

@Latte-S commented on GitHub (Jan 20, 2026):

我还没安装Xorbits Inference插件。

你可以安装它

I'm curious, I never installed the Xorbits Inference plugin in the first place, so why is this error appearing?

@Latte-S commented on GitHub (Jan 20, 2026): > > 我还没安装Xorbits Inference插件。 > > 你可以安装它 I'm curious, I never installed the Xorbits Inference plugin in the first place, so why is this error appearing?
Author
Owner

@fatelei commented on GitHub (Jan 20, 2026):

我还没安装Xorbits Inference插件。

你可以安装它

I'm curious, I never installed the Xorbits Inference plugin in the first place, so why is this error appearing?

me too

@fatelei commented on GitHub (Jan 20, 2026): > > > 我还没安装Xorbits Inference插件。 > > > > > > 你可以安装它 > > I'm curious, I never installed the Xorbits Inference plugin in the first place, so why is this error appearing? me too
Author
Owner

@Latte-S commented on GitHub (Jan 21, 2026):

我还没安装Xorbits Inference插件。

你可以安装它

我很好奇,我根本没安装过Xorbits Inference插件,为什么会出现这个错误?

我也是
The same error occurs even after installing the Xorbits Inference plugin.

@Latte-S commented on GitHub (Jan 21, 2026): > > > > 我还没安装Xorbits Inference插件。 > > > > > > > > > 你可以安装它 > > > > > > 我很好奇,我根本没安装过Xorbits Inference插件,为什么会出现这个错误? > > 我也是 The same error occurs even after installing the Xorbits Inference plugin.
Author
Owner

@dosubot[bot] commented on GitHub (Feb 21, 2026):

Hi, @Latte-S. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an "Invalid plugin id Xorbits Inference" error after migrating Dify 1.5.0 to an offline Linux production server.
  • The error occurs despite never having installed the Xorbits Inference plugin.
  • Troubleshooting steps were provided around plugin registrations, credentials, encryption keys, and migration commands.
  • You and another user confirmed the error persists, suggesting a deeper configuration or migration problem.
  • The issue remains unresolved with no recent updates.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • Otherwise, I will automatically close this issue in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 21, 2026): Hi, @Latte-S. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported an "Invalid plugin id Xorbits Inference" error after migrating Dify 1.5.0 to an offline Linux production server. - The error occurs despite never having installed the Xorbits Inference plugin. - Troubleshooting steps were provided around plugin registrations, credentials, encryption keys, and migration commands. - You and another user confirmed the error persists, suggesting a deeper configuration or migration problem. - The issue remains unresolved with no recent updates. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - Otherwise, I will automatically close this issue in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21801