Migrate Dify to the new architecture
Dify is a shared application on Olares for building AI apps, knowledge bases, and agents. Olares 1.12.6 updates the shared app architecture, so you cannot update Dify in place. This guide shows you how to migrate your data to the new Dify app.
Before you migrate
Knowledge bases rely on vector indexes generated by a specific Dify version. These indexes cannot be reused across versions, and the new Dify uses a more efficient retrieval engine. Because of this, you cannot restore the old app data directly, or reuse the old knowledge base indexes.
Instead, you must manually migrate your data:
- Export your app configurations as DSL files. Note that runtime data such as logs and conversations are not preserved.
- Export the original documents from your knowledge bases. Note that processed knowledge base chunks are not preserved.
After installing the new Dify app, you must also:
- Re-create user accounts and permissions.
- Re-set your model API keys and system preferences.
- Re-upload your documents to rebuild each knowledge base.
Export your Dify data
If multiple users share the Dify instance, make sure every user exports their own data before you uninstall the v2 app.
Export app configurations.
a. Open Dify, and then go to the Studio page.
b. Hover over the target app card, click more_horiz, and then select Export DSL. The
.ymlfile is downloaded automatically.c. Repeat this for each app you want to migrate.
Download documents from your knowledge bases.
Skip this step if your knowledge base uses an external data source, Notion, or a web site, or if you already have the original documents backed up.
a. Open Files, and then go to Cache > difyv2 > volumes > app > storage > upload_files.
b. Download the files.
Identify files by upload time
The file names in this folder are Dify internal names. Identify the files you need by upload time, file format, and size.
Manually record your model configurations and system settings.
Uninstall Dify
Open Market, go to My Olares, and uninstall the Dify app. Do not select Also remove all local data.
Install the new Dify app
- Open Market and search for "Dify".
- Click the app card to open the app details page.
- Check the Information panel. The Compatibility field shows
Olares >=1.12.6-0for the new version. - Click Get, then Install, and wait for the installation to finish.
Import your apps
Open Dify and create the admin account.
Go to the Studio page.
For each app you exported earlier:
a. Click Import DSL file on the CREATE APP card.
b. Select the app's
.ymlfile and upload it.If Dify detects missing plugins, install them.
If a plugin is skipped or fails to install, the app configuration is still imported, but you must reconfigure the related plugin nodes.
If an app uses a knowledge base, rebuild the knowledge base first, and then reconfigure the app to use it.
Go to the Studio page and confirm your imported apps appear.
Rebuild your knowledge bases
- Create new knowledge bases in the new Dify, and re-upload your documents or reconnect your data sources.
- Open an app that uses a knowledge base and test a query to confirm retrieval works.
Learn more
- Shared applications: Understand the new shared app architecture.