Integration guide
Dify Integration
AI app platform for building assistants, workflows, RAG apps, and model-connected products.
Recommended path
Dify local AI quick start
- 1. Start Ollama and pull both required model typesRun Ollama, pull the chat model and any separate embedding model the application needs, and verify each before opening Dify.
- 2. Install and configure the official Ollama pluginInstall Ollama from the Dify Marketplace and enter the reachable Ollama host root without /api. From Docker, use a LAN or container address rather than localhost.
- 3. Add models and test the actual workflowRegister chat and embedding models under Model Providers, select them in a small workflow, and test retrieval, generation, and tools separately before publishing the app.
Best for
Teams turning model providers, retrieval, prompts, and workflows into usable AI applications.
Model support
The official Ollama plugin from the Dify Marketplace adds Ollama as a model provider with a base URL field, covering chat and completion, text embeddings, vision, tool calling and thinking output. Any OpenAI-compatible endpoint can be added the same way.
Choose models by role
Chat, vision, and tool use
Mistral Small 3.1
Use a model whose Ollama build supports the Dify features the workflow invokes. Tool calling, vision, and thinking output are model capabilities, not plugin guarantees.
Open the model profile →Knowledge retrieval
Qwen3 Embedding
Register a dedicated embedding model for knowledge bases and retrieval. Keep it stable after indexing or rebuild the affected datasets when it changes.
Open the model profile →How to use this integration
- Build a retrieval-augmented chat application over private documents with a self-hosted model
- Give non-engineers a visual builder that targets your own model rather than a vendor API
- Switch between local and hosted providers per application without rebuilding the workflow
- Self-host the whole application layer alongside the model for data-residency requirements
Connecting a local model
Install the Ollama plugin, then add it under Model Providers with the Ollama host root as the base URL. Because Dify itself runs in Docker Compose, localhost inside the container is not your host: use a LAN IP or a container-reachable address instead.
Tradeoffs
The Docker networking default is the usual setup failure, and it looks like a model problem rather than a networking one. On licensing, Dify is not plain Apache 2.0: it ships under a modified Apache 2.0 with additional conditions covering multi-tenant operation and console branding, which is why this site labels it source-available rather than open source.