Self-hosting Dify means its release cycle becomes your release cycle. Dify ships often, and most upgrades are uneventful — but the difference between a routine upgrade and an incident is rarely the upgrade itself. It is whether you took a backup you can actually restore, rehearsed the version jump somewhere that is not production, and decided in advance what would make you roll back.
This article is the checklist I work through when upgrading a production Dify, whether it runs as Docker Compose on one host or as the ECS Fargate architecture from this series. It is written to be printed and ticked off. The ECS and Terraform differences are collected in one section near the end, so the main flow stays the same for everyone.
Before anything: read the release notes and the upgrade guide

Dify’s own documentation is explicit on this point: choose the target release and read its upgrade guide before you run anything. Some releases are drop-in replacements; others include manual steps — a data migration to run in a particular order, a component that must be upgraded in stages first. The release notes are where that is written down, and they are the only place it is written down.
- [ ] Target version chosen, and its image tags pinned in your configuration (never
latest) - [ ] Release notes for the target version read, plus the notes for every version you are skipping over
- [ ] The release’s upgrade guide read; every manual step copied into your run plan
- [ ] Plugin compatibility checked — model and tool plugins may need their own updates alongside the core
Skipping versions deserves one extra sentence: the further you jump, the more the intermediate steps matter. Reading three sets of release notes is tedious, and it is still cheaper than discovering a staged migration halfway through applying it.
Phase 1: Prepare the ground

- [ ] Current version and image tags recorded — your rollback needs to name them exactly
- [ ] Maintenance window scheduled and announced to users; indexing and scheduled workflows will pause
- [ ] Configuration backed up: the
.envfile and the split env files underdocker/envs/copied somewhere safe, outside the host - [ ] Secrets inventory confirmed — you know where every value lives (Secrets Manager, in the Terraform setup) and none exists only in a running container
The configuration backup is the item people skip because it feels like paperwork. It is not: those env files hold your storage settings, your vector store choice and the references to every secret. Lose them in a botched upgrade and you are reconstructing your deployment from memory, under time pressure.
Phase 2: Back up everything that holds state

- [ ] Database backed up: a snapshot (Aurora, in the managed setup) or a full dump (Compose’s bundled PostgreSQL), taken after the last writes before the window
- [ ] File storage covered: the S3 bucket has versioning on, or the uploads volume is copied
- [ ] Named volumes identified — you know exactly which volumes hold state, and you will keep them attached (next phase explains why)
- [ ] Restore procedure written down, command by command, before the window opens
An untested backup is not a backup; it is a hope. You do not need to rehearse the full restore before every upgrade — but you do need to have restored successfully at least once, and to know the exact commands. If you have never restored this system, Phase 3 is where that changes.
Phase 3: Rehearse on staging

- [ ] The backup restored onto a staging copy (or a throwaway instance)
- [ ] The upgrade performed there, start to finish, including every manual step from the release notes
- [ ] The rehearsal timed — this is how long your production window needs to be
- [ ] Anything surprising written into the production run plan
If you have no staging environment, build the rehearsal out of the backup itself: restore it somewhere temporary and upgrade that. A version jump that includes a database migration can fail in ways that only your data triggers — your document sizes, your vector store contents. Rehearsing on empty data proves almost nothing.
Phase 4: Check the vector store separately

- [ ] Vector store’s own upgrade path checked — does this release change, require or stage a vector database upgrade?
- [ ] If the vector store migrates, its backup taken separately from the main database backup
- [ ] A post-upgrade indexing test planned (Phase 6) — vector problems hide until something indexes
The vector store is the component most likely to have an independent migration hiding inside a Dify upgrade. Treat it as a second upgrade nested in the first: its own release notes, its own backup, its own verification.
Phase 5: Run the upgrade

- [ ] Users notified; window open
- [ ] New images pulled with pinned tags
- [ ] Compose run with the same project name and the same options as always — the Dify documentation stresses this, because named volumes attach by project name; a renamed project means fresh, empty volumes and a deployment that looks wiped
- [ ] API logs watched until database migrations complete
- [ ] Any staged component steps executed in the order the upgrade guide specifies
That project-name point is worth the emphasis. The most frightening upgrade failure — Dify comes up empty, no apps, no data — is usually not data loss at all: it is the stack starting against new volumes because the project name or options changed. Keep them identical and the volumes, with all your state, stay attached.
Phase 6: Re-check plugins and providers

- [ ] Plugin list reviewed: every plugin present, enabled and on a compatible version
- [ ] Each model provider tested with one call — a provider that validated before the upgrade can need re-authorisation after it
- [ ] Tool integrations spot-checked in one real workflow
Core upgrades and plugins evolve on separate clocks, and the seam between them is where quiet breakage lives. A companion guide to connecting Dify to Amazon Bedrock — the provider most AWS self-hosters will be re-checking here — is in preparation.
Phase 7: Smoke tests

- [ ] Administrator login works and the console loads
- [ ] One known workflow runs end to end and returns the expected shape of result
- [ ] A workflow with a Code node executes (this exercises the sandbox path)
- [ ] A small document uploads to a knowledge base and finishes indexing (worker, vector store and embedding model in one action)
- [ ] One published application answers through the service API, not just the console
Run these in this order: they move from the surface inward, so the first failure tells you roughly which layer to look at. Only when all five pass is the window closed and the upgrade announced as done.
Rollback: decide the triggers before you start

- [ ] Rollback defined concretely: previous image tags redeployed, database restored from the Phase 2 backup
- [ ] Trigger conditions written down: which failures, observed for how long, mean roll back rather than fix forward
- [ ] One person named as the decision-maker during the window
Understand what rollback means for a database-backed platform: migrations may be one-way, so rolling back the code usually means restoring the database too — which is why the backup, not the old image tag, is the real rollback. Data written after the upgrade is the price of restoring, and that price is exactly why the trigger conditions belong on paper before the window opens, not in an argument during it.
The ECS and Terraform variant

The checklist is identical; only the mechanics change. On the Fargate architecture, an upgrade is an image-tag change in the task definitions: edit the tags, run terraform plan, and read the diff as your change record before you apply — the plan is where a stray change to an unrelated service shows up while it is still free to fix. The API service runs migrations on boot, so the log-watching step applies unchanged.
Rollback is correspondingly cleaner: revert to the previous task definition revision, plus the database restore if migrations ran. Aurora’s automated backups and point-in-time recovery make the restore target precise — pick the moment just before the window. Everything above about rehearsal, vector stores and smoke tests applies word for word; managed services remove chores, not decisions.
Summary

Read the target release’s notes and upgrade guide. Back up the database, the files and the configuration — and know the restore commands. Rehearse the jump on a copy of your own data, check the vector store as a separate upgrade, run the upgrade with identical project settings, then verify plugins, providers and five smoke tests before you call it done. Decide the rollback triggers before the window opens. Do those things, and a Dify upgrade goes back to being what it should be: a calendar entry, not an incident.
