{
  "manifest_version": "1",
  "slug": "dify",
  "title": "Dify",
  "headline": "Self-host Dify",
  "description": "Run Dify on an exe.dev VM: build AI chatbots, workflows, and agents with models from exe.dev's LLM gateway, a private console, and nightly backups.",
  "category": "ai-apps",
  "tags": [
    "dify",
    "llm apps",
    "ai workflows",
    "rag",
    "chatbot builder",
    "ai agents",
    "docker compose"
  ],
  "url": "https://exe.dev/deploy/dify",
  "markdown_url": "https://exe.dev/deploy/dify.md",
  "upstream": {
    "website": "https://dify.ai",
    "source": "https://github.com/langgenius/dify",
    "docs": "https://docs.dify.ai/en/self-host/deploy/quick-start/docker-compose",
    "license": "Dify Open Source License (Apache 2.0 with conditions)"
  },
  "example_vm_name": "my-dify",
  "time": "15 minutes",
  "stack": [
    {
      "name": "Dify 1.19",
      "detail": "The official Docker Compose setup, with PostgreSQL, Redis, Weaviate, the plugin daemon, and the code sandbox",
      "data": "~/dify/docker/volumes"
    },
    {
      "name": "Console (Dify's nginx)",
      "detail": "Studio, knowledge bases, settings, and everything else",
      "port": 8080
    },
    {
      "name": "Apps and API (Dify's nginx, a second server)",
      "detail": "Published web apps, the service API, MCP, and webhooks; no console",
      "port": 8000
    },
    {
      "name": "exe.dev LLM gateway",
      "detail": "GPT and Claude models through Dify's OpenAI and Anthropic plugins, with no keys"
    }
  ],
  "access": [
    {
      "url": "https://my-dify.exe.xyz:8080/",
      "who": "private",
      "what": "The Dify console, after exe.dev login and Dify's own sign-in"
    },
    {
      "url": "https://my-dify.exe.xyz/",
      "who": "private",
      "what": "Published web apps and the API (/v1); make it public for customers and outside servers"
    }
  ],
  "delivers": [
    "Dify 1.19 in Docker Compose with its own generated secrets in `~/dify/docker/.env` (mode 600), coming back after a reboot.",
    "The console at `https://\u003cvm\u003e.exe.xyz:8080/`, with you as admin, signed in with your exe.dev email.",
    "OpenAI and Anthropic models from exe.dev's LLM gateway, with no API keys.",
    "A published sample chatbot answering through port 8000, which serves apps and the API but not the console.",
    "Workflows that can call your exe.dev integrations, with no credentials stored in Dify.",
    "Nightly backups of the databases, files, and vectors into `~/dify-backups`, with one checked."
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe.dev/new?prompt=Set%20up%20Dify%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Fdify.md%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-dify.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-dify.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AThis%20recipe%20needs%20a%2040GB%20disk%2C%20and%20a%20new%20VM%27s%20may%20be%20smaller.%20Before%20you%20install%20anything%2C%20run%20%60df%20-h%20%2F%60.%20If%20its%20size%20is%20under%2036G%2C%20stop%20and%20ask%20me%20to%20grow%20the%20disk%2C%20either%20with%20this%20link%3A%20https%3A%2F%2Fexe.dev%2Fsuggest%3Fcommand%3Dresize%2520my-dify%2520--disk%253D40GB%20or%2C%20on%20my%20computer%2C%20with%20%60ssh%20exe.dev%20resize%20my-dify%20--disk%3D40GB%60.%20When%20I%20say%20it%27s%20done%2C%20run%20%60sudo%20resize2fs%20%22%24%28findmnt%20-no%20SOURCE%20%2F%29%22%60%2C%20check%20%60df%20-h%20%2F%60%20again%2C%20and%20carry%20on.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Dify%201.19%20in%20Docker%20Compose%20with%20its%20own%20generated%20secrets%20in%20%60~%2Fdify%2Fdocker%2F.env%60%20%28mode%20600%29%2C%20coming%20back%20after%20a%20reboot.%0A-%20The%20console%20at%20%60https%3A%2F%2F%3Cvm%3E.exe.xyz%3A8080%2F%60%2C%20with%20you%20as%20admin%2C%20signed%20in%20with%20your%20exe.dev%20email.%0A-%20OpenAI%20and%20Anthropic%20models%20from%20exe.dev%27s%20LLM%20gateway%2C%20with%20no%20API%20keys.%0A-%20A%20published%20sample%20chatbot%20answering%20through%20port%208000%2C%20which%20serves%20apps%20and%20the%20API%20but%20not%20the%20console.%0A-%20Workflows%20that%20can%20call%20your%20exe.dev%20integrations%2C%20with%20no%20credentials%20stored%20in%20Dify.%0A-%20Nightly%20backups%20of%20the%20databases%2C%20files%2C%20and%20vectors%20into%20%60~%2Fdify-backups%60%2C%20with%20one%20checked.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details.%20For%20initial%20setup%2C%0Afollow%20%22Install%20by%20hand%22%20first%2C%20skipping%20VM%20creation%20and%20SSH%20but%20not%20the%0Adisk%20check%2C%20through%20%22Test%20a%20backup%22.%20The%20walkthrough%20at%20the%20top%20is%20for%0Athe%20owner%20afterwards.%20Do%20not%20run%20Restore%20unless%20the%20user%20asks.%0ANever%20print%20~%2Fdify%2Fdocker%2F.env%20or%20~%2Fdify-admin-password%20into%20the%20chat%3B%0Atell%20the%20owner%20where%20the%20password%20is.%20Don%27t%20share%20the%20VM%20or%20make%20it%0Apublic%3A%20the%20owner%20decides.%20Leave%20the%20Helpdesk%20bot%20app%20in%20place%20so%20the%0Aowner%20can%20see%20it.%20The%20API%20takes%20a%20few%20minutes%20to%20start%20on%20a%202-CPU%20VM%3B%0A502%20errors%20from%20nginx%20in%20that%20time%20are%20normal.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A",
    "disk": "40GB",
    "terminal": "curl -fsSL https://exe.dev/deploy/dify/prompt.txt | ssh exe.dev new --disk=40GB --prompt=/dev/stdin",
    "prompt": "Set up Dify on this VM by following the exe.dev recipe at https://exe.dev/deploy/dify.md from top to bottom.\n\nThe recipe's example VM name is my-dify. This VM's name is the output of `hostname`: use it wherever the recipe writes my-dify. Skip the step that creates the VM; you are on it.\n\nThis recipe needs a 40GB disk, and a new VM's may be smaller. Before you install anything, run `df -h /`. If its size is under 36G, stop and ask me to grow the disk, either with this link: https://exe.dev/suggest?command=resize%20my-dify%20--disk%3D40GB or, on my computer, with `ssh exe.dev resize my-dify --disk=40GB`. When I say it's done, run `sudo resize2fs \"$(findmnt -no SOURCE /)\"`, check `df -h /` again, and carry on.\n\nYou are done when all of these are true. Check each one yourself:\n- Dify 1.19 in Docker Compose with its own generated secrets in `~/dify/docker/.env` (mode 600), coming back after a reboot.\n- The console at `https://\u003cvm\u003e.exe.xyz:8080/`, with you as admin, signed in with your exe.dev email.\n- OpenAI and Anthropic models from exe.dev's LLM gateway, with no API keys.\n- A published sample chatbot answering through port 8000, which serves apps and the API but not the console.\n- Workflows that can call your exe.dev integrations, with no credentials stored in Dify.\n- Nightly backups of the databases, files, and vectors into `~/dify-backups`, with one checked.\n\nRead the whole recipe, including the closed details. For initial setup,\nfollow \"Install by hand\" first, skipping VM creation and SSH but not the\ndisk check, through \"Test a backup\". The walkthrough at the top is for\nthe owner afterwards. Do not run Restore unless the user asks.\nNever print ~/dify/docker/.env or ~/dify-admin-password into the chat;\ntell the owner where the password is. Don't share the VM or make it\npublic: the owner decides. Leave the Helpdesk bot app in place so the\nowner can see it. The API takes a few minutes to start on a 2-CPU VM;\n502 errors from nginx in that time are normal.\n\nFinish with the URLs I should open.\n",
    "prompt_url": "https://exe.dev/deploy/dify/prompt.txt"
  },
  "updated": "2026-11-16",
  "verified": "2026-11-16",
  "related": [
    "open-webui",
    "n8n-2",
    "docker-compose",
    "agent-secrets",
    "postgres",
    "marimo"
  ],
  "alternatives": [
    "Dify Cloud",
    "Flowise",
    "Langflow"
  ],
  "files": [
    "https://exe.dev/deploy/dify/backup.sh",
    "https://exe.dev/deploy/dify/exe-public.conf",
    "https://exe.dev/deploy/dify/helpdesk-bot.yml",
    "https://exe.dev/deploy/dify/sample-app.sh",
    "https://exe.dev/deploy/dify/setup-models.sh"
  ]
}
