Dify Cheatsheet
Dify is an open-source LLM application development platform featuring visual workflow orchestration, RAG pipelines, agent building, model management, and monitoring. One-click deployment via Docker Compose with a built-in management UI.
Quick Start
``bash
# Clone and setup
git clone https://github.com/langgenius/dify.git
cd dify
# Start services dify setup dify start
# Check status dify status
# View logs dify logs
# Access the UI
open http://localhost:80
`
Service Management
dify start / dify stop / dify restart / dify status manage the lifecycle. dify logs shows service logs. The platform runs as multiple Docker containers including API server, worker, frontend, database, and vector store.
Backup & Restore
dify backup creates a full backup. dify restore ./backup.tar.gz restores from backup. Always backup before upgrading.
Production Deployment
dify deploy --env prod handles production configuration. For manual deployment, customize docker-compose.yaml and .env` with your domain, SSL certificates, and external database/vector store connections.
Startup & Modes(8)
| Command | Level | ||
|---|---|---|---|
dify --helpShow Dify CLI help | Basic | dify --help | |
dify setupInitialize Dify environment (generate config) | Basic | dify setup | |
dify upgradeUpgrade Dify to latest version | Intermediate | dify upgrade | |
dify migrateRun database migrations | Intermediate | dify migrate | |
dify versionCheck Dify version | Basic | dify version | |
git clone https://github.com/langgenius/difyClone Dify source repository | Basic | git clone https://github.com/langgenius/dify.git | |
dify backupBackup Dify data | Intermediate | dify backup | |
dify restoreRestore Dify data from backup | Expert | dify restore ./backup.tar.gz |
ai-server(9)
| Command | Level | ||
|---|---|---|---|
dify startStart Dify services (Docker Compose) | Basic | dify start | |
dify stopStop Dify services | Basic | dify stop | |
dify restartRestart Dify services | Basic | dify restart | |
dify statusCheck Dify service status | Basic | dify status | |
dify logsView Dify service logs | Basic | dify logs | |
dify deployDeploy Dify to production | Expert | dify deploy --env prod | |
dify deploy --envSpecify deployment environment | Expert | dify deploy --env staging | |
docker compose -f docker-compose.yaml up -dManually start Dify Docker services | Intermediate | docker compose -f docker-compose.yaml up -d | |
docker compose -f docker-compose.yaml downStop Dify Docker services | Intermediate | docker compose -f docker-compose.yaml down |