How to Perform a Major Version Upgrade on Mac: A Practical Guide

    This guide walks through a safe, repeatable process for upgrading to a major new release on Mac. It covers why major upgrades often break workflows, step-by-step backups, aligning code and configuration, pulling new images, startup verification, and migrating data volumes and plugins. You will learn the correct upgrade order and how to fix common issues such as missing workflows or unavailable tools and model providers after login.

    1. Why Major Version Upgrades Often Break

    Moving from a 0.x release to 1.x is not a simple patch on top of the existing system. It is a reorganization of capabilities at the architecture level. In this upgrade, the plugin mechanism, visual orchestration, and open ecosystem interfaces were all significantly changed. As a direct result, tools and model providers that used to be built in are now abstracted into plugins that can be installed and version-managed independently.

    Understanding this is critical. Many failed upgrades are not caused by a mistyped command. They happen because the operator still applies a minor-version mindset: replacing images only, skipping data migration, and ignoring plugin registration state. After logging in, the workflows are empty and models are unavailable, which is often mistaken for a corrupted upgrade.

    The correct upgrade order is therefore: back up first → align code and configuration → pull new images → start and verify → migrate data and plugins last. The sections below follow this order.

    2. Before the Upgrade: Backups Are the Cheapest Safety Net

    If the deployment uses container orchestration (a Compose-based setup), there is usually a local installation folder containing the orchestration files and data volume directories. The safest and most straightforward approach is to make a complete copy of the entire installation directory before making any changes.

    1. # Stop services before backup to avoid the data volume being in a mid-write state
    2. docker compose -f docker-compose.yaml down
    3. cp -R /path/to/dify /path/to/dify_backup_0153

    There are three key backup points:

    1. The data volume directory must be included (the volumes directory under the orchestration folder). It typically holds database data, uploaded files, and vector indexes, and is the real carrier of workflows and knowledge bases.
    2. Keep the orchestration files and environment variable files as well. The new version may introduce new required variables, and the old configuration is needed as a fallback for rollback.
    3. If the data set is large, take an additional logical export of the database to create a dual safeguard: file-level backup plus logical backup.

    3. Aligning Code and Configuration: Full Overwrite Rather Than Line-by-Line Merge

    The second step is to copy the files from the new version package over the original installation directory as a full replacement. Manual per-file merging is not recommended, because the directory structure, dependency list, and orchestration templates often change at the same time. Manual merging easily leaves old files behind and creates a mixed-version state.

    After the overwrite, check three things:

    • Whether the image tags in the orchestration file point to the new version;
    • Whether new services (for example, the component responsible for plugin lifecycle management) appear in the orchestration definition;
    • Whether new configuration items introduced by the new version need to be added to the environment variable file.

    4. Pulling Images: Stop Services Before Downloading

    The third step is to download the images. It is recommended to stop the container services before pulling. This reduces network and disk contention and prevents old containers from repeatedly restarting and producing noisy logs during the pull. The images to pull include the frontend UI, the backend service, and the plugin daemon component introduced in the new version. Its version number is not synchronized with the main version, which is normal; fill in the tag according to the official orchestration file.

    1. docker compose -f docker-compose.yaml down
    2. docker pull <frontend image>:<new version tag>
    3. docker pull <backend image>:<new version tag>
    4. docker pull <plugin daemon image>:<corresponding tag>

    If the pull is slow, consider configuring image acceleration first and then pulling images one by one, which makes it easier to identify which image failed.

    5. Startup and Verification

    The fourth step is to start the services:

    1. cd docker
    2. docker compose -f docker-compose.yaml up -d

    The fifth step is verification. Open the application management entry point on the local machine in a browser (the locally mapped port is usually 80 or a custom port). If the application list page opens and you can log in, the main upgrade succeeded.

    Set the right expectation at this point: being able to log in does not mean the data has been fully migrated. Plugin data migration is a separate step and must still be performed.

    6. Common Issue 1: Login Works but Workflows Are Gone

    The cause is that the data volume directory mounted by the new version differs from the old one, so the container reads an empty directory. The fix is to copy the data volume directory from the old orchestration folder in the backup to the corresponding location in the new version, then restart the containers:

    1. cp -R /path/to/dify_backup_0153/docker/volumes/. /path/to/dify/docker/volumes/
    2. docker compose -f docker-compose.yaml restart

    After the restart, refresh the page. Workflows, knowledge bases, and conversation history should be restored. If anything is still missing, first check whether the new version changed the data volume mount path instead of repeatedly restarting.

    7. Common Issue 2: Tools and Model Providers Must Be Migrated to Plugins

    This is the most complex step. The core idea is to export the inventory first, then install in bulk.

    1. Find the backend container ID:
    1. docker ps
    1. Open a terminal inside the container:
    1. docker exec -it <container ID> bash
    1. Inside the container, export the list of models and tools used by the current instance to a JSONL file (the concurrency parameter can be adjusted based on machine resources):
    1. poetry run flask extract-plugins --workers=20

    This file records the plugin information referenced by each workspace in the current instance and serves as the basis for the bulk installation.

    1. Confirm that the container environment can access the public internet and the plugin marketplace domain, then run the bulk installation:
    1. poetry run flask install-plugins --workers=2

    A lower concurrency is recommended during installation to avoid download failures or timeouts caused by excessive instantaneous concurrency. When it finishes, return to the UI and check whether model providers and tools are available again, and verify the connectivity of key workflow nodes one by one.

    8. Post-Upgrade Checklist

    • Confirm all containers are healthy with no continuous restarts;
    • Spot-check the input and output of several workflows;
    • Check whether the knowledge base index is searchable;
    • Watch the logging service and monitoring alerts for accumulating errors;
    • Keep the backup directory for a while and clean it up only after confirming stability.

    9. Conclusion

    The difficulty of a major version upgrade never lies in the commands themselves, but in whether you understand the causal chain: architecture change → data location change → migration step change. Make the backup solid, align the version tags, and treat plugin migration as an independent task, and the upgrade turns from a puzzle game into a repeatable standard procedure. For enterprise deployments with higher availability requirements, general cloud capabilities such as container platforms, object storage, and log monitoring can be used to build a rollback-capable canary upgrade path.