Upgrading a Containerized AI Application Platform Across Major Versions: A Practical Guide
This guide walks through upgrading a containerized AI application platform across a major version boundary. It explains why architectural changes break upgrades, then covers the full workflow: backing up the deployment directory, replacing program files and pulling new images, restoring persistent data through mounted volumes, migrating legacy model and tool configurations into the new plugin runtime, and running acceptance checks with a rollback plan.
1. Why Cross-Version Upgrades Go Wrong
An open-source AI application platform released its 1.0.0 GA build in late February. The biggest change was refactoring the previously built-in tooling and model integration capabilities into a standalone plugin system, alongside stronger visual workflow orchestration and a more open ecosystem.
Architectural changes like this have a direct consequence: an upgrade is no longer a matter of swapping an image tag. It becomes a compound operation involving data directories, configuration structure, dependent components, and metadata migration.
A typical failure pattern teams run into: services start normally and accounts can log in, but historical applications and workflows have “disappeared.” Or the UI loads fine, yet every previously configured model provider and tool is unavailable. The cause is not mysterious. The new version changes the mount expectations for persistent data, and it moves tool and model configuration out of the main database into the plugin runtime. Once you understand these two points, the upgrade turns from puzzle-solving into an engineering task you execute step by step.
A note on scope: this guide starts from a community-edition 0.15.3 deployment based on container orchestration. If your deployment differs (running directly from source, or a managed service), paths and commands will vary, but the sequence of back up first, replace second, migrate last still applies.
2. Before You Start: The Backup Is Your Only Safety Net
The first step is never typing a command. It is copying a directory. Locate the local directory where you originally installed the platform, copy the whole thing, and include the version and a timestamp in the name:
cp -r dify_deploy dify_deploy.bak_0.15.3_$(date +%Y%m%d)
Crude, but highly effective. Most of the state in a containerized deployment lives in mounted volumes and configuration files, so a full directory copy is nearly equivalent to a rollback-ready snapshot. If conditions allow, add two more backups: a logical export of the database, and the file data in object storage (if you enabled external storage). Once backups are done, stop the container services first, so no half-written state occurs while files are being copied and replaced.
3. Replacing Program Files and Pulling New Images
The second step is obtaining the new version’s program files and overlaying all of their contents onto the original installation directory, including the orchestration files and the environment variable template. Before overwriting, compare the old and new environment variable files, and record your custom entries separately (ports, secrets, external storage addresses, email services, and so on) so defaults do not clobber them.
The third step is pulling the images the new version requires. Beyond the main service images, this release introduces a component dedicated to managing the plugin lifecycle, so there are three images rather than two:
docker pull <registry>/web:1.0.0docker pull <registry>/api:1.0.0docker pull <registry>/plugin-daemon:0.0.3-local
During the pull stage, a registry mirror configuration or a nearby image repository helps. If the network is unstable, save a local archive first and then import it on the target machine.
The fourth step is starting the services:
cd dockerdocker compose -f docker-compose.yaml up -d
After startup, run docker compose ps to check container status, focusing on whether the database, cache, vector search, and plugin components are all healthy. Then visit http://localhost/apps to confirm the console is reachable. Being able to log in but not see historical applications is expected at this point; move on to the next step.
4. Restoring Historical Data: Mounted Volumes Are the Key
Copy everything under docker/volumes from the backup directory back into the new version’s docker/ directory, keeping the relative paths identical, then restart the containers:
cp -r dify_deploy.bak_0.15.3_xxx/docker/volumes/* ./volumes/docker compose restart
The essence of this step: the new version does not automatically take over the old version’s persistent directories, so you must explicitly hand the data back to it. If things are still broken after the restart, check three places first: whether the mount path was rewritten by the orchestration files, whether the database container’s initialization logs show errors, and whether the object storage connection parameters are correct. Logging and monitoring with alerting are valuable here, since they can significantly shorten the time to locate the problem.
5. Plugin Migration: Moving Old Configuration into the New Runtime
The new version turns model providers and tools into installed plugins, so the related configuration in the old data must be extracted and reinstalled. This is the part of the upgrade that demands the most patience.
First, locate the main service container and open a shell inside it:
docker psdocker exec -it <api_container_id> bash
Inside the container, run the extraction command to export the model and tool information used by the current workspace into a file:
poetry run flask extract-plugins --workers=20
workers controls the degree of parallelism and can be tuned to the machine’s resources. The output file holds the plugin inventory for each workspace. Then run the installation in the same container:
poetry run flask install-plugins --workers=2
The installation stage requires the container’s environment to reach the public internet and the plugin marketplace address; otherwise it aborts on a download failure. For corporate intranets, allowlist the required domains at the egress point, or set up an internal artifact cache in advance.
6. Acceptance Checklist and Rollback Strategy
Four criteria determine whether the upgrade is complete: the console is reachable; historical applications and workflows are visible and can be opened and edited; the original model providers and tools show as installed and usable in the plugin list; and one end-to-end conversation or workflow test run passes. Only when all four are green has the upgrade truly landed.
If something fails midway, rollback is cheap: stop the services, swap the backup directory back in, and start with the old orchestration files. That is exactly why I always recommend taking the backup before the upgrade, not patching things together after a failure. For production, the safer approach is to run the whole flow once in a test environment, identify custom configuration differences and network restrictions, and then schedule a maintenance window. Paired with the container platform, logging, and monitoring with alerting for a canary observation period, an upgrade turns from a gamble into a predictable routine operation.
