Upgrading a Self-Hosted LLM Application Platform from 0.15.x to 1.0.0 on macOS: A Smooth, Step-by-Step Walkthrough
This guide walks through upgrading a self-hosted large language model application platform from the 0.15.x series to 1.0.0 on macOS. It explains why the jump is an architectural change rather than a routine patch, then covers the full workflow: backing up data and configuration, exporting application assets, replacing the source code, pulling the matching Docker images, and verifying the upgrade. It also lists common failure points and a rollback strategy, so you can complete the cross-version upgrade safely and recover quickly if something goes wrong.
1. Why This Upgrade Needs Extra Care
Moving a large language model application platform from the 0.x series to 1.0.0 is not a routine patch update. It is an architectural leap. Taking a common community open-source platform as an example, the 1.0 release typically introduces a brand-new plugin system: tools and model-provider capabilities that used to be built into the core services are now split out into separate plugin daemon processes that run as independent containers. This means:
- The container topology changes: a new plugin daemon service is added, and the service definitions, network structure, and environment variables in the orchestration file may all be adjusted.
- Data structures may evolve: database table structures and index definitions can change, so an in-place overwrite upgrade without a proper backup will cut off your rollback path.
- Dependency image versions are strictly coupled: there is a version-matching relationship among the API service, the front-end web service, and the plugin daemon. Mixing images of different versions can easily cause interface incompatibilities.
For these reasons, before you start, you must establish an upgrade discipline of “back up first, isolate next, verify last.”
2. Three Preparation Steps Before Upgrading
2.1 Take a Complete Backup
Enter the old version’s deployment directory and back up at least the following:
# Back up the database files and uploaded resources in the data volumecp -r docker/volumes ~/backup/dify-volumes-$(date +%Y%m%d)# Back up the environment variables and orchestration filecp .env ~/backup/env-$(date +%Y%m%d)cp docker-compose.yaml ~/backup/compose-$(date +%Y%m%d)
If the database runs in a separate instance, it is recommended to perform a logical backup with the database’s own export tool rather than only copying the data directory.
2.2 Export Application Assets
Use the platform’s built-in management interface to export your existing application orchestration configurations (usually in DSL or YAML file form). This step costs very little, yet it is a key means of quickly restoring your business if the upgrade fails.
2.3 Stop the Running Services
docker compose down
Note that you should use down rather than stop, to ensure containers and networks are fully cleaned up and to avoid name or port conflicts between old containers and the new configuration.
3. Fetch and Replace the New Version Source Code
3.1 Download the Target Version Source
Get the 1.0.0 source archive from the code hosting platform, or clone it using the version tag:
git clone <repository-url> --branch 1.0.0 --depth 1
3.2 Overwrite the Old Directory Completely
Copy all files from the new source into the old 0.15.x deployment directory and perform a full replacement. The reason for a full overwrite instead of replacing only some directories is:
- The new version’s orchestration file may add service definitions (such as the plugin daemon).
- The middleware image versions (database, cache, search service) may have updated tags specified in the configuration file.
.env.examplemay contain newly added environment variables that must be filled in.
After the overwrite, compare your old .env file item by item against the new .env.example, and fill in the new variables with their default values or your actual environment settings. Pay special attention to the secrets and port configuration related to the plugin daemon; missing any of these will cause service startup to fail.
4. Pull the Matching Version Images
It is recommended to stop the Docker service before pulling images, to avoid disk I/O during the pull interfering with running containers. Then run the following in order:
docker pull langgenius/dify-web:1.0.0docker pull langgenius/dify-api:1.0.0docker pull langgenius/dify-plugin-daemon:0.0.3-local
Each of the three images serves a different role:
- Web image: provides the front-end page service.
- API image: carries the core business logic and application interfaces.
- Plugin daemon image: a component newly introduced in 1.0.0, responsible for plugin installation, isolated execution, and lifecycle management. It is the core change point of this upgrade.
In addition, if the middleware images referenced in the orchestration file (such as the database, message queue, and vector retrieval component) have updated tags, you should either let Docker pull them automatically at startup or pull them manually in advance to speed up startup.
5. Startup and Post-Upgrade Verification
docker compose up -ddocker compose ps # Confirm all services are running / healthydocker compose logs -f api # Watch the API startup logs and check how the database migration statements execute
A recommended verification checklist includes:
- Whether the database migration completed fully, with no errors in the logs.
- Whether the management interface logs in normally and the historical application list is complete.
- Pick any existing application for a test run, and confirm the model-call and tool-call chains work normally.
- Whether the plugin marketplace or plugin management page is accessible, and whether the original built-in capabilities are available again as plugins.
- Check each container’s resource usage and restart count to rule out hidden crashes.
6. Common Issues and Rollback Strategy
- Plugin daemon fails to start: first check whether the relevant secrets and ports in
.envmatch the orchestration file. - Interface reports a version mismatch: confirm the three core images correspond strictly to each other, with no old-tag images mixed in.
- You need to roll back: stop all services, restore the backed-up old source directory, environment variables, and data volume, then start with the old orchestration file to return to the 0.15.x state.
As long as you strictly follow the order of “back up first, full overwrite, match image versions, verify item by item,” this cross-version upgrade can be carried out steadily, with a clear path forward and a safe way back.
