DEV Community

Works AI_Makoto
Works AI_Makoto

Posted on • Edited on

Use AI Tools with WSL! Step-by-Step Guide to Installing Dify on Windows 11

Dify is a platform that allows users to easily create AI-powered tools without needing programming knowledge. Through a visual interface, users can build AI workflows by simply dragging and dropping, helping to improve business efficiency and automate tasks.

Here is the GitHub page for Dify.
To run Dify, you'll need Docker and Docker Compose.
https://github.com/langgenius/dify

I referred to the following site for the Docker installation.
https://docs.docker.com/engine/install/ubuntu/

Install Docker

Add Docker Repository

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

Install Docker Package

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

Verify Docker Service Start

Confirm Successful Installation of Docker Engine

sudo docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Add User to Docker Group

Add the Current User to the Docker Group

sudo usermod -aG docker $USER
Enter fullscreen mode Exit fullscreen mode

Reload the current shell session to apply changes to the docker group.

newgrp docker
Enter fullscreen mode Exit fullscreen mode

I referred to the following site for installing Docker Compose.
https://docs.docker.com/compose/install/linux/

Install Docker Compose

Install the docker-compose-plugin.

sudo apt-get install docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

Verify that the docker-compose-plugin has been installed.

If "Docker Compose version vN.N.N" is displayed, the docker-compose-plugin has been successfully installed.

docker compose version
Enter fullscreen mode Exit fullscreen mode

Install Dify

Clone the Dify repository from GitHub.

git clone https://github.com/langgenius/dify.git
Enter fullscreen mode Exit fullscreen mode

Move to the directory.

cd dify/docker
Enter fullscreen mode Exit fullscreen mode

Copy the environment file.

cp .env.example .env
Enter fullscreen mode Exit fullscreen mode

Start Dify using Docker Compose.

docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Access the following URL and verify that the Dify login screen is displayed.
Right after the containers start, the page may not load correctly, so if that happens, please refresh your browser.
http://localhost/install

Image description

This blog content is available as a video on YouTube at the link below:
https://youtu.be/dK1sOVxACSo

Top comments (0)