Official docs: https://docs.dify.ai/getting-started/install-self-hosted/local-source-code
.\scripts\setup-dify.ps1Or manually:
git clone https://github.com/langgenius/dify.git C:\Users\ytwei\Projects\dify
cd C:\Users\ytwei\Projects\dify\docker
copy .env.example .env
docker compose up -d- Open http://localhost/install and create admin account
- Create a Chat App with a simple prompt
- Publish and copy API Key from API Access
- Add to this project's
.env:DIFY_API_BASE=http://localhost/v1 DIFY_API_KEY=app-... - Call
POST /dify/askfrom Swagger or/learnStep 4
Full guide: deploy/dify-setup.md
Note: Dify is kept separate from the main compose file because it pulls multiple services and needs its own .env bootstrap.