A Practical Guide to Upgrading an Open-Source LLM Application Platform via Docker Compose

    This article provides a step-by-step guide for upgrading an open-source LLM application development platform from V0.15.3 to V1.0.0 using Docker Compose. It covers essential backups, image updates, and the critical data and plugin migration process required by the new V1.0.0 architecture, helping users avoid common pitfalls during the major version upgrade.

    I. Background and Motivation for the Upgrade

    Recently, an open-source LLM application development platform released its official V1.0.0 version. This major update brings several significant changes: a complete overhaul of the plugin mechanism with independent management of models and tools as plugins, enhanced workflow orchestration capabilities, and a more open ecosystem. For users already running the V0.15.3 community edition in production or local environments, the appeal of upgrading is obvious.

    However, upgrading across major versions is never as simple as “pulling a new image and restarting the service.” This is especially true when the official upgrade documentation is relatively brief, requiring you to figure out many details on your own. Based on the Docker Compose deployment method, this article organizes the complete upgrade process and troubleshooting experience into a reproducible guide to help you complete the upgrade smoothly.

    Scope of Application: This guide targets the community edition V0.15.3 deployed using Docker Compose. For other deployment methods (such as source code or Kubernetes), the logic can be referenced, but the specific commands will need adjustment.

    II. Pre-Upgrade Notice: Why You Cannot Upgrade Directly

    Before starting, it is important to understand the specifics of this upgrade. V1.0.0 introduces a brand-new Plugin Daemon architecture. The original model provider and tool configurations are no longer stored in the old way; instead, they need to be migrated into the plugin system. This means the upgrade involves two layers:

    1. Application Upgrade: Changes to the code, images, and database structure.
    2. Data and Plugin Migration: Existing workflows, knowledge bases, model configurations, and tool configurations must be completely preserved and adapted to the new architecture.

    If you only do the former and not the latter, you will encounter issues like “able to log in, but all workflows are gone” or “model providers need to be reconfigured.” The steps below are designed around these two layers.

    III. Detailed Upgrade Steps

    Step 1: Fully Back Up the Existing Environment

    Backup is your “undo button” for an upgrade, so execute it carefully. For Docker Compose deployments, all persistent data is stored in the docker/volumes folder within the installation directory, including database files, uploaded files, and vector database data.

    The simplest but most effective method is to copy the entire installation directory:

    1. cp -r dify-0.15.3 dify-0.15.3-backup

    If the data volume is large, you can just back up the docker/volumes directory and the .env configuration file. However, for first-time operations, a full backup is recommended. It is better to use some extra disk space than to regret a failed upgrade.

    Step 2: Download the New Source Code and Replace Files

    After obtaining the V1.0.0 source package, copy all its files into the original V0.15.3 directory and overwrite everything. This step updates the docker-compose.yaml, environment variable templates, and other configuration files required by the new version.

    Important notes:

    • Confirm the backup is complete before replacing;
    • If you made custom modifications to the old .env (such as ports or passwords), you will need to compare them against the new environment variable template and re-enter your custom items after replacement;
    • The new version may have added new environment variables, so it is recommended to check them one by one.

    Step 3: Pull the New Images

    It is recommended to stop the currently running container services before executing the image download to avoid resource usage and version confusion:

    1. docker pull langgenius/dify-web:1.0.0
    2. docker pull langgenius/dify-api:1.0.0
    3. docker pull langgenius/dify-plugin-daemon:0.0.3-local

    Note the last command: V1.0.0 adds a plugin daemon image, a component that did not exist in the old version and must be explicitly pulled. If your network environment is slow to access the image repository, consider configuring a mirror accelerator.

    Step 4: Start the New Services

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

    After starting, you can observe the status of each container via docker ps to ensure no containers are repeatedly restarting or exiting. The plugin daemon container may take longer to initialize on its first start, which is normal.

    Step 5: Verify the Upgrade Results

    Access http://localhost/apps in your browser. If you can log in normally and see the page, the application layer upgrade is basically successful. However, the data has not been migrated yet, so you will likely find that your previous workflows are missing—don’t panic, this is exactly what we will solve next.

    IV. Data Migration: The Key to a Successful Upgrade

    1. Restore Historical Data (Workflows, Knowledge Bases, etc.)

    If you log in and find that all your previous workflows and applications have disappeared, the solution is straightforward: copy all the contents under docker/volumes from the backup directory to the docker/ directory of the new version, and then restart the service:

    1. docker compose down
    2. cp -r dify-0.15.3-backup/docker/volumes/* dify-1.0.0/docker/volumes/
    3. docker compose up -d

    After restarting, log in again and check. Your applications, workflows, and knowledge base data should be fully restored.

    2. Plugin Data Migration (Crucial and Complex)

    Because the new version changes model providers and tools to a plugin mechanism, old configurations will not take effect automatically and require manual migration. The steps are as follows:

    (1) Locate the API container ID

    1. docker ps

    Find the container with docker-api in its name from the output and note its container ID.

    (2) Enter the container terminal

    1. docker exec -it <container_id> bash

    (3) Extract plugin information

    1. poetry run flask extract-plugins --workers=20

    This command scans all models and tools used by the workspaces in the current instance and generates a plugins.jsonl file. The --workers parameter controls the number of parallel processes, which can be adjusted based on your machine’s configuration. The default value is fine for small data volumes.

    (4) Install plugins

    Before executing the next step, ensure your network can properly access the public plugin marketplace. Then, still inside the API container, run:

    1. poetry run flask install-plugins --workers=2

    This command reads the manifest file generated in the previous step and automatically downloads and installs the corresponding plugins from the marketplace. Since this involves network downloads, the installation time depends on the number of plugins and network conditions. Just wait patiently for it to complete. Once installed, return to the admin interface to check if the model providers and tools are available again.

    V. Common Issues and Recommendations

    • Upgrade failure rollback: If the new version has severe issues, simply stop the service, restore the old version using the backup directory, and your data will be intact.
    • Plugin installation failure: This is mostly a network issue. Check your proxy configuration or retry the migration command.
    • Abnormal container restarts: Check docker logs <container_name> to troubleshoot. A common cause is that environment variables were not filled in according to the new template.
    • Upgrade timing: Major versions often have early issues when first released. For production environments, it is recommended to wait and observe community feedback before upgrading.

    VI. Summary

    The core of a major version upgrade lies in a three-stage process: “backup first, then upgrade, and finally migrate.” A full backup ensures you can roll back, replacing images and source code completes the application layer upgrade, and data volume restoration alongside plugin migration ensures business continuity. As long as you execute the steps patiently, upgrading from V0.15.3 to V1.0.0 can be completed smoothly. We hope this practical guide helps you avoid pitfalls and smoothly experience the plugin-based architecture and enhanced workflow capabilities of the new version.