how to install dify
Download Docker Desktop:
Verify Installation:
docker --version
in Command Prompt. If version information is displayed, it's OK.Download Docker Desktop:
Verify Installation:
docker --version
in Terminal. If version information is displayed, it's OK.Install Docker:
sudo apt update sudo apt install docker.io -y sudo systemctl enable --now docker sudo usermod -aG docker $USER
Verify Installation:
docker --version
in Terminal. If version information is displayed, it's OK.Install Git (if not already installed):
sudo apt install git -y
in Terminal.Get the Dify source code:
git clone https://github.com/langgenius/dify.git cd dify/docker
Configure environment variables (optional):
cp .env.example .env nano .env # Edit environment variables with a text editor
Start Dify with Docker Compose:
docker compose up -d
docker compose
for Docker Compose v2, and docker-compose
for v1.Verify Operation:
http://localhost
in your browser. If the Dify initialization screen appears, it's successful.sudo curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
NGINX_HTTP_PORT
and NGINX_HTTPS_PORT
in the .env
file to other ports (e.g., 8080
→ 8081
).docker compose down
and then docker compose up -d
.docker compose down
.docker volume ls
and remove unnecessary volumes with docker volume rm <volume_name>
.docker compose up -d
.docker compose up -d
docker compose down
docker compose ps
docker compose logs -f
git pull
and then restart with docker compose up -d
.This is the installation guide for Dify. If you encounter any issues with the steps, please consult the community or official support. Even if you are new to Docker, you should be able to get it working by following the instructions carefully.