Dify 1.17.1 Weaviate staged server upgrade

Dify 1.17.1 moves the bundled Weaviate server from 1.27.0 to 1.39.2, and skipping minor releases can silently break vector search. This page covers the staged path, backups and object-count checks for a safe Dify upgrade.

On this page

Why a Dify 1.17.1 upgrade needs a staged Weaviate path

If your Docker Compose deployment runs the bundled Weaviate at 1.27.0, Dify 1.17.1 will not simply carry it forward. That release moves the bundled server to 1.39.2, and skipping minor versions is unsupported, so the server has to step through every minor release on its latest patch before it reaches the target. Pulling the new images and restarting is not enough. According to the Dify 1.17.1 release notes, doing so can silently and permanently break vector search, which means the failure may not appear as an error at startup. Your application will keep running while retrieval quietly degrades, and the damage may only surface when a knowledge base returns poor or empty results.

The risk applies only to a specific set of deployments. Fresh installs, deployments that point at an external Weaviate server, and deployments that use another vector store such as Qdrant, Milvus or pgvector are unaffected by this server path. Confirm which case you are in before you plan any work. Check whether the VECTOR_STORE setting in your .env file is weaviate, and whether the weaviate service in your docker-compose.yaml is the bundled container you intend to upgrade. If your Weaviate is external, the server upgrade belongs to whoever runs that cluster, and your work is limited to confirming compatibility.

This page follows Dify's Weaviate upgrade path guide, which asks operators to back up the Weaviate volume first, step through each minor release on its latest patch, and prefer Weaviate's backup module writing to S3, GCS or Azure in production. Treat that guide as the authoritative sequence, and confirm the exact rung list and current patch numbers against the Dify Weaviate server upgrade path guide before you start. The steps that follow assume you have a current backup and a maintenance window in which Dify is not writing to the vector store.

What changes in Dify 1.17.1 and what each change requires

This table lists each change in the 1.17.1 move that affects a self-hosted deployment, what it does, and what the operator must do. Read the first two rows first, because they determine whether the Weaviate server must be staged before the Dify images are changed. The later rows cover security changes from 1.16.0 and 1.16.1 and the configuration file check that the Docker Compose docs recommend after every upgrade.

ChangeImpactAction needed
Bundled Weaviate server moves from 1.27.0 to 1.39.2Vector search depends on the server version Dify expects, so the server must be upgraded before or with the Dify imagesConfirm your current Weaviate server version, then plan the staged path in the rungs below
Skipping minor Weaviate versions is unsupportedPulling and restarting can silently and permanently break vector search with no clear error at startupStep through every minor release on its latest patch and do not jump directly to 1.39.2
Fresh deployments, external Weaviate and other vector storesThese are not affected by the bundled server moveConfirm which vector store your deployment uses before scheduling the staged work
Agent sandbox network isolation through a Squid proxy (1.16.1)Sandboxed agent code has its outbound network path changed, which can break tools that previously reached internal or external endpointsTest agent workflows that call external services after the upgrade and update any allow-list rules
Token-based API authentication between services (1.16.1)Internal calls between Dify services use tokens, so custom sidecars or scripts that call internal endpoints may failReview any custom integration that talks to internal Dify services and confirm its credentials
Sandboxed Jinja2 template rendering (1.16.1)Template logic in workflows that relied on unrestricted rendering may behave differently or failReview Jinja2 templates in workflows and test them in a staging copy
New variables in .env.exampleNewer releases may add variables that the existing .env file does not containAfter upgrading, diff your .env against .env.example and add any new keys with values you have chosen

What to prepare before the first Weaviate rung

The staged Weaviate path changes stored data, so the work before the first rung matters as much as the upgrade itself. These six items give you a way back, a measurable baseline and a safe place to rehearse each step.

Full backup of the Weaviate volume

Take a complete copy of the Weaviate data volume before any container changes. The Dify docs say to back up the Weaviate volume first, and this is the copy you restore if a rung fails. Confirm the backup is readable by restoring it to a scratch host, not just by checking that the file exists. Record the Weaviate server version currently running so the restore target is unambiguous.

Backup module target in production

The Dify docs prefer Weaviate's backup module writing to S3, GCS or Azure for production. Configure the target before the upgrade so the backup lives outside the volume being changed. Confirm the bucket or container, credentials, retention and encryption settings with your storage team. A backup on the same disk as the data does not protect against a failed rung.

Object counts per class

Capture the object count for every Weaviate class that Dify uses before the first step. After each rung, compare the counts with this baseline. A matching total with a missing class, or a count that drops between rungs, is a signal to stop. Store the baseline with the backup so both describe the same state of the data.

Env file and compose customizations

Copy the .env file and any changes you made to docker-compose.yaml, including image tags, port mappings and volume definitions. The upgrade changes the Weaviate image tag at each rung, so a local override can silently pin an old version or point at the wrong volume. Diff your copy against the current .env.example so you know which settings are yours.

Test environment from production data

Build a non-production stack from a copy of the production volume and env file, then run the full rung sequence there first. Use it to measure how long each rung takes and to confirm that vector search returns results afterward. Confirm with your team who can access the copied data, since it contains the same knowledge base content as production.

Exact guide and notes per version

Read the upgrade guide and release notes for each target version before you start the rung that uses it, not only the final release. Dify 1.17.1 is the end point, but the path runs through every minor Weaviate release on its latest patch. Keep the release page open during the work and note any step the guide adds for a specific version.

How to run the staged Weaviate upgrade step by step

This sequence moves the bundled Weaviate server from 1.27.0 to 1.39.2 one minor release at a time, then starts Dify 1.17.1 against a verified vector store. Each rung ends with a restore point and an object count check, so a failed step is caught at a known state before the next version is applied.

  1. Confirm the current Weaviate server version

    The operator checks the Weaviate container image tag and the server version reported by the running instance, and confirms it is 1.27.0 before any change. Record the version, the Dify version in use and the object count for each class in a change log. This baseline is the reference for every later comparison. The step is complete when the change log holds the version and the per-class counts and the team has signed off that the starting point matches the environment.

  2. Take and verify the Weaviate volume backup

    Stop nothing yet. Create a backup of the Weaviate data volume, using a volume copy or the Weaviate backup module to S3, GCS or Azure as the Dify docs recommend for production. Then restore the backup into a scratch instance, or confirm that the backup manifest lists every class. Confirm the restored object count matches the baseline. The step is complete when a verified backup exists in a location separate from the running host and the team can name the restore command.

  3. Stop the api and worker services

    Stop the Dify api and worker containers so no writes reach Weaviate during the upgrade. Leave PostgreSQL, Redis and the web service running only if your runbook needs them. Confirm with the container runtime that the api and worker are down and that no indexing jobs remain in the Redis queue. The step is complete when the service list shows both stopped and the queue is empty, which prevents documents from being indexed against a server that is changing version underneath them.

  4. Upgrade Weaviate to the first minor rung

    Before changing the image, record a restore point for this rung: the backup taken in the previous steps, the current image tag and the current compose file. Then set the Weaviate image to the first minor release on its latest patch, as listed in the Dify Weaviate upgrade path guide, and start only the Weaviate service. The step is complete when the container runs the new image and its logs show a clean start with no migration errors.

  5. Compare object counts with the baseline

    Query each class on the running Weaviate server and compare the object counts with the baseline from the first step. Also run a simple vector query against a known document to confirm the index responds. If counts differ or a query fails, stop and restore the rung's backup with the previous image tag before doing anything else. The step is complete when every class matches the baseline and the test query returns the expected object.

  6. Repeat each rung with a restore point

    For each intermediate minor release, repeat the restore point, image change, start and count comparison. Do not skip a minor release, since Dify notes that skipping versions is unsupported. Use the exact rung list from the Dify Weaviate upgrade path guide, and confirm it there before you start. The step is complete when the server reports 1.39.2, the final rung has passed the same count and query checks, and every rung's log entry records its restore point.

  7. Start Dify 1.17.1 and run migrations

    Update the Dify images to 1.17.1, review .env.example for new variables and apply them to your .env file, then start the api and worker services. Run the database migrations as the Dify release instructions describe, and confirm the api starts without errors. The step is complete when the migrations finish, the api health endpoint responds and the worker reports ready.

  8. Verify search and object counts end to end

    Run a knowledge base search in the Dify console and through the API, then compare object counts in Weaviate with the baseline once more. Open one workflow that uses retrieval and confirm it returns results. Keep the rung logs and the final count record with the change ticket. The step is complete when retrieval returns expected results, the counts match the baseline and the team has signed off the upgrade as finished.

How the upgrade differs by deployment type

This is the variant the staged path was written for. The Docker Compose stack starts a Weaviate container from the same file set as the rest of Dify, so the Dify team and the platform team that runs the host share ownership of the vector store. Pulling the 1.17.1 images moves the bundled Weaviate server from 1.27.0 to 1.39.2 in one step, and that jump is unsupported, so the upgrade must be sequenced rather than run as a standard pull and restart.

  • Volume backup first: Snapshot the Weaviate data volume and confirm you can restore it before any image changes.
  • Stop writers: Stop the api and worker services so no new vectors arrive while the server steps through each minor release.
  • Step each minor release: Move through every minor version on its latest patch, checking object counts before the next rung.
  • Dify upgrade last: Pull the 1.17.1 images and run the standard Dify steps only after the server reaches 1.39.2.
  • Env and compose review: Diff .env.example and your customized docker-compose.yaml as part of the normal Dify upgrade.

Before you start, confirm the exact image tags in the Weaviate upgrade path guide, because a stale tag in your compose file can skip a rung.",

How to verify object counts at each rung

Object counts are the practical check between rungs because they tell you whether the data survived a server restart in a form you can measure. Before the first step, capture a per-collection object count from the bundled Weaviate server while Dify is still running on 1.27.0 and the vector store is idle. Record the collection names alongside each count, and save the output next to the volume backup, so the baseline and the backup describe the same state. Confirm with the Weaviate documentation how to list collections and read object totals in your version, since the exact endpoints and tooling are not part of the facts this page relies on.

After each restart at a rung, repeat the same query against the same collections and compare the numbers line by line. The comparison should be exact for each collection. Do not treat a close total as a pass, and do not compare only the sum across collections, because a missing collection can hide inside a matching total. Also check that the Weaviate container reports healthy and that the api and worker logs show no errors about vector store connections. Keep these checks in a short runbook so that every rung produces the same evidence.

If any count differs, stop, keep the backup taken for that rung, and do not advance to the next minor release. Leave the stopped stack in place for diagnosis and record the rung, the collections affected and the counts observed. A search that appears to work is not proof that data is intact, because a partially loaded index can still return plausible results for common queries while rare or recently written objects are absent. Retrieval quality checks against known documents are a useful second signal, but they supplement the count comparison rather than replace it. Agree in advance with the owner of the knowledge bases who signs off a rung and who decides when to restore.

What makes a Weaviate staged upgrade take longer

This table lists the factors that lengthen the staged Weaviate move from 1.27.0 to 1.39.2 and the effect each one has on the window. Read each row as a question to answer about your own deployment before you schedule the work. The main takeaway is that the number of minor releases on the path and the lack of a tested backup target usually matter more than the Dify upgrade itself.

DriverEffect on the upgradeHow to reduce it
Minor releases on the pathEach minor release from 1.27.0 to 1.39.2 is a separate stop with its own start, check and rollback point, and skipping one is unsupported.Confirm the exact rung list in the Weaviate upgrade path guide, pin the latest patch of each minor, and script the sequence so each stop is repeatable.
Size of the Weaviate volumeA larger volume lengthens the backup, the restore rehearsal and any rollback, and it sets how much disk space the backup needs.Measure the volume and free space before the window, and confirm that the backup location has room for at least one full copy per rollback point.
Backup-module target in placeWithout a configured S3, GCS or Azure target, the backup is a local volume copy that is harder to restore cleanly and adds handling time.Set up the Weaviate backup module to write to object storage well before the window, and test one restore in the test environment.
Collections and objects to countMore collections and objects mean longer per-rung verification, since object counts must match at each stop.Record collection names and object counts before the first step, and automate the comparison so each rung produces a simple pass or fail record.
Customized Compose files or env valuesLocal edits to docker-compose.yaml or .env can conflict with the new images and add time to reconcile them.Diff your files against the release versions, list each override, and reapply them in a single reviewed change.
Test environment availabilityIf no matching test environment exists, the rung sequence has to run against production or be skipped, which raises risk and delays sign-off.Confirm that a test copy with a similar volume size is available for the full sequence before you set the production date.
Dify apps and knowledge bases to checkEach app and knowledge base needs a retrieval check after the move, and a large count extends the post-upgrade review.Pick a representative set of apps and knowledge bases with known test queries, and record the expected results before the upgrade starts.

Questions teams ask before a Dify Weaviate upgrade

What drives the cost of having an outside team run this Weaviate upgrade?

The cost follows the written scope, which is agreed before work starts. The main drivers are how many Weaviate versions sit between your current server and 1.39.2, how many environments need the same staged path (test, staging and production each go through every rung), how much of your existing Compose file and environment file you have customized, and whether backup storage and access must be arranged for the first time. A quote should list the rungs, the verification steps at each rung, the backup and restore test, the handover and any post-upgrade support as separate line items, so you can see which parts are one-time and which recur. Ask whether a retainer would cover later Dify releases.

How long does a staged Weaviate upgrade take, and what sets that time?

No duration figure is given here because it depends on your environment. The time is set mainly by the number of minor releases between 1.27.0 and 1.39.2, the size of the Weaviate data volume (backup and restore time grows with it), how many object classes and objects must be counted at each rung, and how many environments must be repeated. Scheduling also matters: each rung needs a stable state before the next one starts, so a single change window may not cover the whole path. Ask the team to confirm the expected time per rung in writing, and to name the checkpoints where work can pause safely.

What does the upgrade need from our team?

Your team needs to provide the following before work starts:

  • Administrative access to the Docker host or Kubernetes namespace, the Compose project and the .env file
  • A non-production copy of the deployment that matches the production Dify and Weaviate versions
  • A change window long enough for the api and worker services to stay stopped while the volume is backed up
  • Backup storage the Weaviate backup module can write to, such as S3, GCS or Azure, with restore permissions tested in advance

Also confirm who approves the rollback decision if a count does not match.

Can our internal team run this upgrade without an implementation partner?

Yes, if your team has the skills and the time. The source states that the Weaviate path must be followed in order, backups come first, and api and worker services are stopped during the process. An internal team needs people who can read Docker Compose files, run Weaviate backups, compare object counts and roll back safely. Teams usually weigh the cost of a missed rung or a failed restore against the cost of a partner's fixed-scope work. Check the Dify upgrade guide for the target version before you start, and keep a written record of each rung so the next team can repeat it.

What happens if object counts do not match at a rung?

Stop at that rung and do not pull the next version. The release notes warn that pulling and restarting can silently and permanently break vector search, so a count mismatch is a signal to halt, not to continue and fix later. Restore the volume from the backup taken before the upgrade, confirm the restored state matches the pre-upgrade counts, and then investigate the cause in a test copy. Only resume once the rung verifies. Agree in advance who makes that call and how long the rollback is allowed to take.

Does a fresh install or an external Weaviate avoid this upgrade path?

A fresh deployment avoids it, because the staged path applies to an existing bundled Weaviate server. External Weaviate and other vector stores are not affected by this specific 1.17.1 change, according to the release notes. External Weaviate still needs its own version planning, because it has its own compatibility requirements with Dify. Confirm your current vector store setting before you plan the work, since a deployment on Qdrant, Milvus, pgvector, OpenSearch or Elasticsearch follows a different path.

Why can't we simply pull the 1.17.1 image and restart?

Because the bundled Weaviate server jumps from 1.27.0 to 1.39.2 in this release, and skipping minor versions is not supported. A direct pull can leave vector search broken without an obvious error, and the damage may not be reversible from the running system. The safe route is to back up the Weaviate volume, step through each minor release on its latest patch, and verify object counts before moving on. Confirm the exact rung list against the Weaviate server migration path page before you schedule the work.

Which backup approach should we plan for a production upgrade?

Dify's guide says to back up the Weaviate volume first and to prefer Weaviate's backup module writing to S3, GCS or Azure in production. A volume copy is a useful fallback, but an object-storage backup is easier to keep outside the host, to restore to a new server and to retain under your retention policy. Plan the storage account, encryption, access and restore test before the change window, because an untested backup gives no assurance during a rollback.

How DeployOpen scopes and delivers a staged Dify upgrade

DeployOpen plans the Dify 1.17.1 Weaviate staged server upgrade as a written, fixed-scope engagement inside your own infrastructure. The work covers the Weaviate step path, volume backups, service stops and object-count checks at each rung, with handover documentation your team can rerun.

How we scope

  • Confirm your deployment uses the bundled Weaviate and record the current server version before any change is planned.
  • Agree the full step path from 1.27.0 through each minor release to 1.39.2 in the written scope.
  • Define the backup target, object-count checkpoints and rollback criteria that the engagement must deliver.

How we build

  • Take and verify a backup of the Weaviate volume in a copy of your environment before touching production.
  • Rehearse each rung of the staged path, stopping the api and worker services around every server change.
  • Compare object counts after each step and record results before moving to the next minor release.

How we hand over

  • Deliver a runbook listing each rung, its commands, its expected counts and the rollback point taken.
  • Document the Dify 1.17.1 configuration changes, including any new variables checked against the env example file.
  • Walk your operators through the procedure and confirm they can repeat it for future Weaviate server moves.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the upgrade is complete.
  • Review Dify minor releases as they arrive so your Weaviate path stays planned rather than reactive.
  • Agree in writing which follow-up checks, monitoring and recovery drills your team or DeployOpen will run.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.