Dify Docker Compose Upgrade Guide: Moving Safely from 0.15.3 to 1.0.0

    Learn how to upgrade a self-hosted Dify Community Edition deployment from 0.15.3 to 1.0.0 using Docker Compose. This guide covers full backups, source and configuration updates, image pulls, service checks, persistent data recovery, and the migration of tools and model providers to the new plugin system.

    1. Upgrade Background and Approach

    Dify 1.0.0 introduces a redesigned plugin system, improvements to visual workflows, and broader ecosystem extensibility. For self-hosted Community Edition users, these changes make the release appealing. However, the underlying architectural changes can make upgrading difficult, particularly when migrating persistent data and existing tool and model-provider configurations.

    This guide uses a Docker Compose deployment of Dify 0.15.3 as the starting point. The upgrade follows five main stages:

    1. Back up the existing installation.
    2. Replace the source files and update configuration.
    3. Pull the new container images.
    4. Start and check the services.
    5. Verify persistent data and migrate plugins.

    The first four stages get the new services running. The final stage determines whether existing applications, workflows, and integrations remain usable.

    Before proceeding, confirm that:

    • You are running the self-hosted Community Edition through Docker Compose from the source distribution, rather than a one-click image deployment or a managed service.
    • The host has working internet access, because plugin installation requires downloading resources online.

    2. Create a Complete Backup

    An upgrade can make changes that are difficult to reverse. A complete backup is therefore the highest-priority step.

    In the deployment described here, persistent data—including database files, uploaded files, and vector indexes—is stored under docker/volumes in the installation directory. The installation directory also contains the source files and configuration.

    The simplest backup method is to copy the entire directory:

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

    Stop the running Compose services before copying the directory. Copying database files while they are being written can produce an inconsistent backup.

    If the deployment contains many uploaded files, the copy may take some time. Wait for it to finish and check that the backup includes the expected configuration files and persistent data directories.

    3. Download the New Source and Replace the Existing Files

    Download the 1.0.0 source archive from the official repository and extract it. Copy its files into the existing 0.15.3 installation directory, replacing the corresponding source and deployment files.

    This updates the Docker Compose configuration, environment-variable templates, and startup scripts to match the new container architecture.

    Use the New Compose File

    Version 1.0.0 adds services related to the plugin daemon. These service definitions are not present in the older docker-compose.yaml.

    Use the Compose file shipped with 1.0.0 rather than making partial edits to the old file. Otherwise, required services may be missing.

    Review Environment Variables

    Compare the old and new .env templates. Transfer your customized settings—such as ports, secrets, and database passwords—to the new configuration.

    Do not simply reuse the old .env file without reviewing the new template, because the upgraded deployment may require additional settings.

    4. Pull the New Container Images

    After replacing the source files, pull the required images before starting the deployment. Keep the existing Compose services stopped during this stage to reduce resource usage and avoid interference from running containers.

    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

    Alongside the web frontend and API images, version 1.0.0 introduces a plugin daemon image. This component is central to the new plugin system and handles isolated plugin execution and lifecycle management.

    Confirm that all three pulls complete successfully before proceeding. Missing images can leave parts of the deployment unable to start.

    5. Start the Services

    Enter the installation’s docker directory and start the services using the new Compose file:

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

    Use docker ps to check that the containers are running. Pay particular attention to the API, worker, web, and new plugin-daemon containers.

    If a container fails to start, inspect its logs:

    1. docker logs <container-name>

    Common causes include missing environment variables and port conflicts.

    6. Verify the Upgrade

    Open http://localhost/apps in a browser when accessing the deployment locally. If you can sign in and load the application interface, the service-level upgrade is working.

    However, successful login does not prove that data and plugin migration are complete. Check whether your existing applications, workflows, and knowledge bases are present, then verify the tools and model providers they depend on.

    If you started 1.0.0 in a separate installation directory with an empty docker/volumes directory, your previous data will not appear until the old persistent data is connected. An empty application list in that situation does not necessarily mean the data has been lost.

    7. Restore Missing Applications and Workflows

    When the new deployment uses an empty volumes directory, it has no access to the old database and file data.

    To restore the data from the backup:

    1. Locate the backed-up 0.15.3 installation directory.
    2. Stop the new deployment before replacing its persistent files.
    3. Copy the entire docker/volumes directory from the backup into the 1.0.0 installation’s docker directory, replacing the newly generated volumes directory.
    4. Start the services again.

    The stop and startup commands are:

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

    Run the stop command before copying the data and the startup command afterward.

    Once the services restart, sign in again and check your historical applications, workflows, and knowledge bases. If data is still missing, verify the permissions on the database subdirectory under volumes.

    If you upgraded in place and retained the existing persistent data, do not assume that replacing the volumes directory is necessary. This recovery step addresses deployments that started without the old data.

    8. Migrate Tools and Model Providers to Plugins

    Plugin migration is the most involved part of this upgrade. In version 1.0.0, previously built-in tools and model providers become plugins. Existing configurations require migration before those capabilities are available in the new environment.

    Find and Enter the API Container

    Run:

    1. docker ps

    Find the container ID for docker-api-1, then open a shell inside it:

    1. docker exec -it <container-ID> bash

    Extract the Required Plugins

    Inside the API container, run:

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

    This command scans the model providers and tools used across the instance’s workspaces and extracts the plugin requirements in parallel.

    The workers parameter controls the number of parallel workers. Adjust it to the host’s capacity; the source procedure suggests a range of 8–20.

    When extraction finishes, it creates a plugins.jsonl file in the current directory. Review a sample of its contents to confirm that the plugin list matches the integrations you expect to migrate.

    Install the Plugins

    Confirm that the deployment can reach the public plugin marketplace, then run the following command in the same container:

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

    Installation involves online downloads and extraction. Keep concurrency modest to reduce the risk of network timeouts and resource contention.

    If some plugins fail to install, inspect the command output, identify the affected plugins, and retry the failed installations.

    9. Common Issues and Troubleshooting

    Plugin Installation Fails

    Network connectivity is a common cause. Confirm access to the plugin marketplace and retry. Lower concurrency or install in smaller batches if downloads remain unreliable.

    The Interface Looks Incorrect After Upgrading

    Clear the browser cache. Also check that the deployment is using the 1.0.0 Compose file rather than the older configuration.

    Database Migration Is Interrupted

    The new version runs database migration scripts during startup. If migration is interrupted and recovery requires restoring the previous data, stop the deployment, restore the backed-up volumes directory, and restart the upgraded services.

    10. Summary

    The main challenge in upgrading Dify from 0.15.3 to 1.0.0 is not starting the containers. It is preserving access to persistent data and migrating tools and model providers to the new plugin architecture.

    Follow the sequence of backing up, updating the source and configuration, pulling images, starting services, and validating the result. If the new deployment starts with empty storage, restore the old volumes before continuing. Then extract and install the required plugins.

    Before upgrading production, run through the complete process in a test environment and confirm that applications, workflows, knowledge bases, and plugin-dependent integrations work as expected.