Dify
Dify is an open-source platform for building LLM applications and AI agents. It combines a visual workflow builder, retrieval-augmented generation (RAG) pipelines, prompt management, and an agent framework so teams can design, test, and deploy generative-AI apps from one interface.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| Dify | 1.15.0 |
| Docker | Latest stable |
| Docker Compose | Latest stable |
| Ubuntu | 24.04 LTS |
Dify runs as a multi-container Docker Compose stack (API, worker, web, PostgreSQL, Redis, Weaviate vector store, and nginx).
Requirements
Section titled “Requirements”| Resource | Minimum | Recommended |
|---|---|---|
| vCPU | 2 | 4 |
| RAM | 4 GB | 8 GB |
| Storage | 40 GB | 80 GB |
RAM and storage requirements grow with usage.
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Wait for first-boot configuration
Section titled “2. Wait for first-boot configuration”On the first boot, a setup script generates the internal database and Redis secrets, writes the environment file, and starts the stack with Docker Compose. This takes a few minutes while the containers become healthy. Track progress:
journalctl -u dify-first-boot.service -fThe login message (MOTD) confirms when Dify is ready and prints the internal credentials.
3. Complete the admin setup
Section titled “3. Complete the admin setup”Open a browser and complete the one-time admin setup:
http://<your-vm-ip>/installCreate the admin account (email and password of your choice), then sign in at
http://<your-vm-ip>/.
4. Add a model provider
Section titled “4. Add a model provider”From Settings → Model Provider, add an LLM provider (such as OpenAI, Anthropic, or a self-hosted Ollama endpoint) before building apps.
5. Review the generated credentials
Section titled “5. Review the generated credentials”The internal database and Redis passwords are written to a root-only file:
sudo cat /etc/dify/credentials.txtManaging Dify
Section titled “Managing Dify”Dify runs as a Docker Compose stack in /opt/dify/docker.
# Check statuscd /opt/dify/docker && docker compose ps
# Restartcd /opt/dify/docker && docker compose restart
# View logscd /opt/dify/docker && docker compose logs -fEnvironment configuration: /opt/dify/docker/.env. Persistent data is stored under
/opt/dify/docker/volumes.
Security
Section titled “Security”Ports 80 and 443 are open on the VM’s network interface. UFW is enabled and allows SSH (port 22), HTTP (80), and HTTPS (443).
Dify serves plain HTTP by default. For production use, put it behind your own reverse proxy with
TLS, or configure HTTPS and the public URL in /opt/dify/docker/.env. Apply .env changes with:
cd /opt/dify/docker && docker compose down && docker compose up -d