Skip to content
agents.store
opsoperations

dify-ops

Dify self-hosted update operations plugin. Pre-flight the target release and the bundled Weaviate migration path, back up volumes with the stack down, merge a release tag into the local dev branch, sync .env variables, and pull and restart containers for Dify Docker deployments.

v1.3.0Updated

  • dify
  • docker
  • self-hosted
  • update
  • ops
  • docker-compose
  • env-sync
  • llm-platform

Install

Pick your agent for the steps.

Install on Claude Code

  1. 1.Add the marketplace

    /plugin marketplace add Agents-Store/claude-plugins
  2. 2.Install the plugin

    /plugin install dify-ops@agents-store-claude-plugins

    Type it inside Claude Code.

Claude Code install docs

What is inside

Skills (4)

  • dify-docker-architecture

    Dify Docker Compose deployment architecture — services, container naming, directory layout, .env.example and envs/ structure, and Docker project name conventions. Use when working with Dify Docker setup, understanding container services, debugging container issues, or needing to know the Dify directory structure. Triggers on "dify docker", "dify containers", "dify services", "dify architecture", "dify compose".

  • env-sync

    Synchronize .env with .env.example for Dify Docker deployments and review the envs/ defaults and override files — new, removed and changed variables, existing values kept, secrets never printed. Use when syncing env variables, checking for new configuration variables, comparing .env.example vs .env, "env sync", "new env variables", "missing environment variables", or after pulling Dify updates. Not for the git merge and backup (update-workflow) or the service layout (dify-docker-architecture).

  • examples

    End-to-end scenario walkthroughs for updating self-hosted Dify. Use when the user asks for "dify update example", "how to update dify", "show me an update walkthrough", "dify upgrade guide", "step-by-step dify update", or needs a complete example of the update process.

  • update-workflow

    Git and backup workflow for updating self-hosted Dify — pick the target tag, pre-flight the bundled Weaviate migration path, back up volumes with the stack down, merge into dev, handle conflicts, pull images, verify, roll back. Use when updating Dify, merging upstream changes, handling merge conflicts in Dify, backing up before an update, or switching to a specific Dify version/tag. Triggers on "update dify", "pull dify changes", "merge main into dev", "upgrade dify", "dify version", "dify backup", "weaviate upgrade".

Commands (2)

  • status

    Show current Dify instance status — git branch, running version vs latest stable tag, container health, .env sync state

  • update

    Update self-hosted Dify — pre-flight (Weaviate migration gate), back up volumes with the stack down, merge a release tag into dev, sync env, pull images, verify

Agents (1)

  • dify-updater

    Dify self-hosted update operations agent. Handles updating Dify Docker deployments — checking the target release (including the bundled Weaviate migration path), backing up volumes with the stack down, merging a release tag into the local dev branch, syncing environment variables, detecting Docker project names, and pulling and restarting containers. <example> Context: User wants to update to latest version user: "Update my Dify to the latest version" assistant: "I'll check your current Dify state, resolve the latest stable tag and run the pre-flight before changing anything." <commentary> Standard update request — agent runs the full update workflow: pre-flight (Weaviate gate), backup with the stack down, merge, env sync, pull and start. </commentary> </example> <example> Context: User wants a specific version user: "Update Dify to version 1.17.1" assistant: "I'll fetch tags, run the pre-flight for 1.17.1 and, once the backup exists, merge it into your dev branch." <commentary> Tagged release update — agent verifies the tag exists (tags have no v prefix), stops at the Weaviate gate when it applies, backs up, merges into dev, handles conflicts. </commentary> </example> <example> Context: User wants to check status user: "Check if my Dify needs updating" assistant: "I'll compare the version you run with the latest stable release and report the status." <commentary> Read-only check — agent compares the running image tag with the latest stable tag and reports, including whether the bundled Weaviate needs a staged upgrade. </commentary> </example> <example> Context: User has merge conflicts user: "I have merge conflicts after updating Dify" assistant: "I'll look at the conflicted files and help you resolve them." <commentary> Conflict resolution — agent lists conflicted files, shows diffs, recommends resolution strategy. </commentary> </example> <example> Context: User wants env sync only user: "Sync my Dify .env with the latest .env.example" assistant: "I'll compare your .env against .env.example and the envs/ templates and add any missing variables." <commentary> Standalone env sync — agent runs the official sync script through a masking filter, checks the keys a name comparison misses, and appends missing variables after confirmation. </commentary> </example>

README

Dify self-hosted update operations plugin for the Agents Store marketplace. Helps update Dify Docker deployments safely: pre-flight against the target release (including the bundled Weaviate migration path), back up the volumes with the stack down, merge a release tag into a local dev branch, sync environment variables, pull images and verify.

Written against the Dify 1.20.x layout (generated docker-compose.yaml, tracked envs/**/*.defaults with local *.env overrides, a short root .env.example). Dify releases every one to five weeks; the plugin reads the target release's own notes before it changes anything.

Type

Technology (Level 1) -- knowledge-only, no MCP server.

Skills

SkillDescription
dify-docker-architectureDify Docker Compose setup -- services, containers, directory layout, .env and envs/
update-workflowUpdate workflow -- target tag, Weaviate migration gate, backup, merge, conflict handling, rollback
env-sync.env vs .env.example and envs/ synchronization -- detect new and changed variables, mask secrets
examplesEnd-to-end update scenario walkthroughs

Commands

CommandDescription
/dify-ops:update [tag|main] [--yes] [--weaviate-staged]Full update workflow -- pre-flight, plan, backup, merge, env sync, pull and start, verify. Default target: the latest stable tag
/dify-ops:statusCheck current Dify state -- running version vs latest stable tag, containers, env sync status

Agent

dify-updater -- Handles Dify update operations conversationally, including merge conflict resolution and troubleshooting.

Prerequisites

  • Dify installed from the official GitHub repo (https://github.com/langgenius/dify)
  • Local dev branch with customizations (forked from main); an official git clone --branch <tag> has no dev branch, the update creates it
  • Docker with Docker Compose >= 2.35.0 (docker compose version)
  • Git configured with origin pointing to upstream Dify repo
  • gh (optional) to read the release notes of the versions between yours and the target

Workflow

  1. User runs /dify-ops:update (or /dify-ops:update 1.17.1 for a specific version, main only on request)
  2. Plugin detects working directory (dify root or docker subdirectory)
  3. Pre-flight, read-only: git state, Docker Compose version, Docker project name, target tag, release notes, Weaviate migration gate
  4. Prints the eight-block plan (TARGET, PRECHECK, CHANGE, BACKUP, IMPACT, VALIDATE, ROLLBACK, APPLY) and waits for confirmation
  5. Backs up: copies docker-compose.yaml and .env, stops the stack, docker compose down, archives volumes/ outside the repo
  6. Merges the tag into dev and resolves any merge conflicts interactively
  7. Syncs .env with .env.example and checks the envs/ override files against their defaults (adds new variables, masks secret values, lists dropped keys by name and restores them on request, checks the agent sandbox token and the retired shared.env)
  8. Runs docker compose pull and docker compose up -d
  9. Verifies containers are healthy and asks for a test retrieval against a knowledge base

Weaviate gate

From Dify 1.17.1 the bundled Weaviate server moves from 1.27.0 to 1.39.2 (1.39.13 from 1.18.0), and an existing data volume cannot cross 12 minor versions in one step -- a plain pull and restart can silently and permanently break vector search. When the update crosses 1.17.1 on a bundled Weaviate that holds data, /dify-ops:update stops before any change and points to the official runbook (https://docs.dify.ai/en/self-host/deploy/troubleshooting/weaviate-server-migration-path). After following it, landing on the version the target release pins, re-run with --weaviate-staged. Fresh installs, external Weaviate and other vector stores are not affected.

Customizing

docker/docker-compose.yaml is generated and replaced by every release, and so are the envs/**/*.defaults files. Keep customizations in .env (host ports are EXPOSE_NGINX_PORT and EXPOSE_NGINX_SSL_PORT), in envs/**/*.env overrides copied from the matching *.defaults file (or from an optional *.env.example template), and in docker/docker-compose.override.yaml, which Compose reads automatically and upstream git ignores.