Skip to content
BotServBotServ
DifyAI AgentLow-CodeWorkflowRAGSelf-Hosting

Dify

Install and use Dify. Visual workflow editor for AI agents, RAG, and local AI.

S

schutzgeist

2 min read
Dify

Dify

What This Article Covers

  • What Dify is and what you can do with it
  • How to set up Dify locally using Docker
  • How to build a simple RAG or agent
  • How to integrate local models via Ollama
  • Who benefits most from Dify

Introduction

Dify is an open-source platform for building AI applications, agents, and workflows. Its main strength is a visual interface. If you prefer clicking to coding, you’ll get results faster. Dify runs locally in Docker and supports models from OpenAI, Anthropic, Ollama, and other providers.

Dify at a Glance

Dify is built around apps, workflows, and agents. An app can be a simple chatbot, text generator, or agent. Workflows chain steps together visually. Agents can leverage tools, knowledge bases, and multiple steps. Behind the interface, configurable API endpoints emerge.

Installation

The quickest path is Docker Compose:

git clone https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
docker compose up -d

After that, Dify is accessible at http://localhost/install. On first startup, you’ll create an admin account. For production setups, adjust the .env file accordingly.

Connecting Ollama as Your Model

Dify can communicate directly with Ollama:

  1. Open Settings → Model Providers
  2. Select Ollama
  3. Enter the URL: http://host.docker.internal:11434
  4. Choose your desired model

Make sure the model is already downloaded in Ollama:

ollama pull llama3.1

Getting Started: A Simple Chatbot

  1. Click Create App
  2. Choose Chatbot or Agent
  3. Enter a system prompt
  4. Select your model
  5. Test the chat

For RAG, upload documents and add a knowledge base.

When Should You Use Dify?

Use CaseBenefit
Quick prototypesBuild visually without code
RAG chatbotsUpload and query documents
AgentsConnect tools, knowledge, and workflows
Self-hostingKeep data internal

Common Pitfalls

  • Docker resources - Dify runs multiple containers. You’ll need at least 4 GB of RAM available.
  • Ollama URL in Docker - localhost from the Dify container usually won’t reach your host. Use host.docker.internal instead.
  • SMTP configuration - Dify needs mail settings for password resets and invitations.

Further Reading

FAQ - Common Questions

Is Dify free?

The open-source version is. There’s also a cloud version with paid plans.

Can I run Dify locally?

Yes, with Docker Compose. That’s the recommended approach for self-hosting.

Do I need programming skills?

Not for many use cases. Complex workflows and APIs benefit from them.

Sources

Back to Blog
Share:

Nächster Artikel in AI Agents

Weiterlesen
Langflow

Related Posts