Containerized AI Application Platform Major Version Upgrade: A Practical Guide

    This guide walks through upgrading a containerized open-source AI application platform from 0.15.x to 1.0.x on macOS. It covers pre-upgrade checks, full-directory backups, replacing deployment files, pre-pulling images, minimal verification, restoring data volumes, and migrating built-in tools and models to the new plugin architecture, along with a post-upgrade acceptance checklist.

    1. Why Major Version Upgrades Often Go Wrong

    In open-source AI application platforms, especially community editions deployed through container orchestration, failed major version upgrades are almost the norm. The reason is straightforward: a major release usually comes with architecture-level changes. For example, a shift from built-in tool invocation to a decoupled plugin model can change the configuration file structure, the number of dependent components, and data persistence paths. The issues described in the original account—sparse documentation, skipped steps, and missing migration guidance—are typical of this kind of project.

    The core idea, therefore, is not to “just run the commands,” but to establish an engineering process that is rollback-capable, verifiable, and migration-aware. The example below uses an upgrade from 0.15.x to 1.0.x of an open-source AI application platform’s community edition on macOS.

    2. Three Checks Before You Start

    1. Confirm the deployment type: This method applies only to container orchestration (Compose-based) deployments. Source-based installs and managed services follow completely different paths.
    2. Confirm the version gap: 0.15.x to 1.0.x is a major version jump. Configuration fields, image tags, and dependent containers all change, so replacing images alone is not enough.
    3. Confirm network conditions: The plugin migration stage requires access to the public plugin marketplace repository. If network access is restricted, prepare a proxy or an offline package approach in advance.

    3. Step 1: Back Up the Whole Directory

    For a Compose deployment, there is a local installation directory containing the orchestration files, the environment variable file, and the mounted data directories. The safest approach is to copy the entire directory, not just back up the database.

    1. # Assume the original directory is ~/dify
    2. cp -R ~/dify ~/dify_backup_0150

    It is also worth recording the current container state for later comparison:

    1. docker compose ps > ~/dify_backup_0150/container_status.txt
    2. docker volume ls > ~/dify_backup_0150/volume_list.txt

    The point of the backup is that any anomaly during the upgrade can be rolled back in three steps: stop the services, swap the old directory back in, and start the services again.

    4. Step 2: Get the New Deployment Files and Overwrite

    Download the source or deployment package for the new version and copy all of its files over the original installation directory. The key here is to replace everything, because the new orchestration files reference new image tags and additional dependent containers (for example, a plugin daemon). If you only change the image version numbers manually, you will very likely miss new service definitions and hit “service undefined” or “missing dependency” errors at startup.

    Before overwriting, it helps to run a diff, focusing on the orchestration file and the environment variable template:

    1. diff -u ~/dify/docker/docker-compose.yaml ~/dify_backup_0150/docker/docker-compose.yaml | head -n 100

    5. Step 3: Pre-Pull Images to Reduce Startup Failures

    Stop the services first, then pull the images, so old containers are not competing for network and disk I/O:

    1. cd ~/dify/docker
    2. docker compose down

    Then pull the base images required by the new version (application frontend, backend API, plugin daemon, and so on; use the tags defined in the new orchestration file as the source of truth):

    1. docker pull <registry>/app-web:1.0.0
    2. docker pull <registry>/app-api:1.0.0
    3. docker pull <registry>/plugin-daemon:0.0.3-local

    Pre-pulling separates “network flakiness” from “configuration errors,” which makes startup failures much easier to diagnose.

    6. Step 4: Start Up and Run a Minimal Check

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

    The bar for verification is not “the containers are running,” but that the business entry point works: open the application management page in a browser and log in successfully. That means the upgrade skeleton is in place. Historical data has not been migrated yet, which is expected at this stage.

    7. Step 5: Restore Data Volumes—the Root Cause of Missing Workflows

    If login works but workflows, knowledge bases, and conversation history have all disappeared, this is usually not a database problem but unconnected persistence directories. The data mount path under the new version’s directory is empty, so copy the data volume directories from the backup of the original directory over:

    1. cp -R ~/dify_backup_0150/docker/volumes/. ~/dify/docker/volumes/
    2. cd ~/dify/docker && docker compose restart

    After the restart, check the application list and knowledge base list again to confirm the historical assets are back.

    8. Step 6: Migrating Tools and Models Under the Plugin Architecture

    The new version turns model providers and tools into plugins, so the “built-in” configuration from the old version must be extracted into a plugin manifest and then installed in the new environment. This is the most complex step in the whole upgrade.

    1. Find the container ID of the backend API container:
    1. docker ps
    1. Open a shell inside the container (replace <container_id> with the actual value):
    1. docker exec -it <container_id> bash
    1. Inside the container, extract the plugin manifest and generate a description file:
    1. poetry run flask extract-plugins --workers=20

    --workers controls the number of parallel processes and can be tuned to the machine. On success, a manifest file is generated in the working directory, recording all models and tools used across the workspaces of the current instance.

    1. Install them from within the same container:
    1. poetry run flask install-plugins --workers=2

    The installation stage must be able to reach the public plugin repository, otherwise it will hang on the download step. If the network is unavailable, configure a proxy first or use offline import.

    9. Post-Upgrade Acceptance Checklist

    • The application management page loads and login works, with tenant and workspace information intact;
    • Workflows, knowledge bases, prompts, and other assets are all present;
    • Model providers and tools show as available in the plugin list;
    • One end-to-end conversation or workflow test run passes;
    • Logs show no persistent missing-dependency or database migration errors.

    10. Takeaways

    A major version upgrade comes down to three things: configuration migration, data continuity, and filling in architecture components. Back up the whole directory, overwrite completely, pre-pull images, restore data volumes, and extract then install plugins. Following this order turns the upgrade into a controlled, rollback-capable standard operation even when the official documentation is thin. If your organization needs higher stability, script these steps and build a repeatable upgrade pipeline on top of common cloud capabilities such as container platforms, object storage, and monitoring and alerting.