Imagine you run a small tutoring business and want a chatbot that answers parents’ questions using only your own course info and price list, without paying a monthly SaaS fee. Or you want a tool that reads your 50 training documents and answers any question about them. Dify lets you build exactly this by dragging boxes on a canvas, no code. It’s one of the most popular open-source AI platforms on GitHub (roughly 150k stars), and it runs free on your own machine.
A Docker that already runs, 4 GB of RAM, and one model key
A Windows 10/11 PC with at least 2 CPU cores and 4 GB of RAM (8 GB is comfortable), Docker Desktop installed and running, and a model access key or local model. If you already followed our Open WebUI guide, your Docker setup is ready. Dify reuses it.
Step 1: Install Docker Desktop
Download Docker Desktop from docker.com, install with defaults, start it once and wait until the whale icon is steady. This is the same foundation we used for Open WebUI. If it’s already running, skip ahead.
Step 2: Download and start Dify
Open PowerShell and run these three lines in order:
git clone https://github.com/langgenius/dify.git cd dify/docker copy .env.example .env docker compose up -d
The first launch downloads several container images, so give it 5–10 minutes on a normal connection. When the command finishes, Dify is running.

Step 3: Open your Dify and create an account
Open http://localhost in your browser. On first visit Dify asks you to set up an admin account. That account lives on your machine. Then you land on the dashboard, where you can start a blank app or use a template.
Step 4: Connect a model and build your first app
Open Settings → Model Provider and add a model: paste an OpenAI/Anthropic API key, or point to your local Ollama (API URL http://localhost:11434) if you’d rather stay fully offline. Then create a “Chatbot” app, drag in your knowledge documents under “Knowledge”, and connect the boxes: user question → model → answer. Click Publish and you have a private AI assistant you can share with your family or team.
What breaks between install and the first answer
- “git” is not recognized: install Git for Windows from git-scm.com, or download the Dify zip from GitHub and extract it instead.
- docker compose fails with “port already in use”, because port 80 is taken. Edit .env and change the app port (e.g. APP_PORT=8080), then retry; open http://localhost:8080.
- No model available: add a model in Settings → Model Provider first; the app won’t work without one.
- First start is slow, because image downloads are large. Later starts are quick.
- Knowledge answers are wrong: upload clean documents (PDF/TXT), avoid scanned images, and set the retrieval mode in Knowledge settings.
Ship a link, or don’t bother
Dify earns its place at the moment someone other than you has to open the thing: a link a customer can ask, a page a parent can use at 11 pm. If the only user is you, Open WebUI already does that with less Docker to maintain. The course FAQ bot further down is the smallest build that proves the difference.
A real build: course FAQ bot in 20 minutes
Take the tutoring example from the opening. You have five documents: course list, price sheet, class schedule, refund policy and a short FAQ. The goal is a bot that answers parents using only those five.
- Open Knowledge and create a knowledge base. Upload the five files as PDF or TXT, not photos of printouts.
- Leave the chunk settings on automatic for the first run. Only switch to paragraph splitting if answers keep missing the surrounding context.
- Wait for indexing to finish. A half-indexed base answers with confident nonsense.
- Create a Chatbot app and attach the knowledge base. Write the opening line so parents know what it can answer.
- Add one rule to the system prompt: if the documents do not contain the answer, say so and offer to pass the question to a person.
- Publish, copy the share link, and open it on a phone as a parent would.
Test with 10 questions before you share it
- Three questions answered directly in the documents: prices, schedule, refund window.
- Three questions outside the documents: do you teach adults, do you have parking, can I pay in installments.
- Two ambiguous questions: is it cheap, when does the next term start.
- Two in the customer's own language, if your customers do not write in English.
If the bot invents an answer to an out-of-scope question, fix the system prompt before you touch retrieval settings. A rule that says 'say you do not know' solves more problems than a smaller chunk size.
What it costs to run
Self-hosting means you pay in electricity, disk space and your own time. The model is the real meter: 50 questions a day at about 1,000 input tokens each is roughly 1.5 million tokens a month. At $1 per million input tokens that is about $1.50; at $10 per million it is $15.
Dify or Open WebUI?
| Dify | Open WebUI | |
|---|---|---|
| What it is | App builder with knowledge and workflows | Chat interface for local or hosted models |
| Best when | You need an app to hand to someone else | You want a private ChatGPT for yourself |
| Setup weight | Several containers, heavier | One container, lighter |
If you already run Open WebUI and only chat with models yourself, you do not need Dify. Add it when the output has to become a link you can send to a parent, a customer or a colleague.
Official Websites (Avoid Phishing)
Fake and phishing sites often rank high in search results. Only use the official URLs below.
AI Chatbots & Assistants
- ChatGPTchatgpt.com
Open Source & Local AI
- Ollamaollama.com
- Open WebUIopenwebui.com
- Difydify.ai





