Containerized AI Application Platform Major Version Upgrade: A Practical Guide
This guide walks through a major version upgrade of a containerized, open-source AI application platform in four verifiable stages: backup, replacement, startup, and data migration. It explains why upgrades commonly fail, how to validate your deployment baseline, how to prepare images before startup, how to run layered health checks, and how to restore persistent data and re-register plugins under the new plugin-based architecture. A checklist and rollback strategy are included for production use.
1. Why Major Version Upgrades Go Wrong
When an open-source AI application platform ships an important release, it often introduces architecture-level changes: capability loading shifts from built-in modules to a plugin model, the visual orchestration engine is rewritten, and external ecosystem interfaces are redefined. The official upgrade notes usually describe only three steps — replace the configuration, pull the images, restart the services — and assume the reader already understands the underlying data layout and dependencies.
In production, failures concentrate in three places:
- The persistent directory is not fully carried over, so the new version starts without the existing applications and orchestration data.
- Newly introduced components have no matching image, so services restart repeatedly during startup.
- Capabilities that depended on external models and tools in the old version are never re-registered under the new plugin system, which shows up as “I can log in, but everything is empty.”
The core idea, then, is not to copy commands. Break the upgrade into four verifiable stages — backup, replacement, startup, migration — with a clear success criterion for each and a way to roll back when one fails.
2. Preparation and Pre-Upgrade Checks
2.1 Confirm the Deployment Shape and Version Baseline
This procedure applies to community-edition deployments of the older version, running on container orchestration with declarative configuration files. Confirm three things before you start: the exact running version, the directory where persistent data actually lives, and which services the orchestration file defines.
# List running services and image versionsdocker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}"# List the services declared in the orchestration configdocker compose config --services
If the persistent directory comes from an external mount, record the mount source. If it is a relative directory next to the orchestration file, backing up the configuration files alone is not enough.
2.2 Make the Backup Usable, Not Just Present
The safest approach is to copy the entire deployment directory as-is: the orchestration file, the environment variable file, and the persistent subdirectories. Copying only the orchestration file is the most common mistake, because user-uploaded attachments, vector index files, caches, and database files all live in the persistent directory. If the platform relies on an external database or object storage, add a logical export as well:
# Directory-level cold backup (stop services first to avoid an inconsistent copy)docker compose downcp -a /opt/app-platform /opt/app-platform.bak-$(date +%Y%m%d)# If an external database is used, add a logical export# After exporting, run docker compose up -d to bring the old version back up
Once the backup is done, confirm on the old version that services are healthy before moving to the replacement stage. Decide the rollback path here: if the new version misbehaves, restore the original directory and start the old images.
3. Replacement and Image Preparation
3.1 What to Replace and What to Keep
The orchestration file, environment variable templates, and initialization scripts from the new release should overwrite the deployment directory, but custom secrets, external service addresses, and persistent path settings from the old environment must be preserved. The practical approach: copy the new files in first, then compare the environment variable file item by item and merge the custom entries back from the old one. Items to check closely include the database connection string, cache address, object storage endpoint and bucket name, external model service address and credentials, and port mappings.
3.2 Pull Images in Layers to Avoid Startup Timeouts
A new release typically contains several components with different responsibilities: frontend, backend API, plugin daemon, database and cache, vector retrieval, and reverse proxy. After stopping the services and before starting them, pull explicitly so the orchestrator does not pull everything concurrently during startup and time out:
docker compose down# Explicitly pull the core component images (tags per the official release list)docker compose pull# On a constrained network, pull in batches to reduce timeout riskdocker pull <registry>/app-frontend:<new-version>docker pull <registry>/app-backend:<new-version>docker pull <registry>/plugin-daemon:<plugin-version>
The new plugin daemon is central to the plugin-based architecture. Without its image, the API service may still start, but plugin installation and tool invocation will fail across the board. After pulling, verify with docker images that all required tags are present.
4. Startup and Health Checks
docker compose up -ddocker compose psdocker compose logs -f --tail=200 backend
Validate in three layers, narrowing the problem space at each step:
- Container layer: every service is running with no continuous restarts; watch the startup order of the plugin daemon and the database.
- API layer: open the login page and the workspace page and confirm authentication works; if a reverse proxy is in front, confirm its forwarding rules cover the new services.
- Data layer: confirm the existing applications, knowledge bases, and orchestration canvases are visible.
The most common symptom at this point is “I can log in, but the application list is empty.” That is not an upgrade failure; it means the persistent directory was not carried over.
5. Restoring Historical Data
In the old version, the persistent directory usually sits next to the orchestration configuration inside the deployment directory, and the new version may have changed the subdirectory structure. The fix is to copy the persistent directory from the backup over the corresponding location in the new version, then restart:
docker compose downcp -a /opt/app-platform.bak-YYYYMMDD/docker/volumes/. /opt/app-platform/docker/volumes/docker compose up -d
Before overwriting, rename the newly generated empty directory so you keep the state for comparison. If the database runs as a separate container and the volume naming convention changed, migrate with the database’s own export and import tooling instead of copying files.
6. Migrating Plugin-Based Capabilities
Under the plugin architecture, model providers and tools that were built in to the old version do not appear automatically. Extract them explicitly and reinstall.
Step 1: locate the backend API container.
docker ps | grep backend
Step 2: enter the container and run the extraction to produce a plugin manifest file.
docker exec -it <backend-container-id> bash# Extract the models and tools in use on this instance; adjust concurrency to the machine's resourcespoetry run flask extract-plugins --workers=20
The command writes a JSONL manifest with one plugin entry per line, each including its workspace and plugin identifier. Exit the container afterward and confirm the file is inside the persistent directory, otherwise rebuilding the container will lose it.
Step 3: make sure the runtime can reach the public plugin marketplace domain, then install:
poetry run flask install-plugins --workers=2
Keep install concurrency low; too high triggers rate limiting and timeout retries on the marketplace side. When installation finishes, return to the UI and check one by one that model provider credentials are retained and tools are callable. Credentials usually need to be re-entered, which is expected.
7. Upgrade Checklist and Rollback Strategy
- Does the backup include the persistent directory, and has a rollback drill been performed?
- Are all custom environment variables merged back into the orchestration file?
- Are the images for the new plugin component pre-pulled?
- Did all three health check layers pass?
- Is the plugin manifest file inside the persistent path?
- After installation, were credentials and tool availability spot-checked?
If an unrecoverable error appears at any stage, the standard rollback is to stop the new version, restore the backup directory, and start the old images. Because database writes stopped under the old version, data consistency after rollback is manageable. In production, run the whole procedure once in a staging environment first, and turn each verification command into part of the operations manual so that later minor-version upgrades become a repeatable standard procedure.
