If you have failed to deploy the new version of Dify, please read this! Dify 1.0.0 local deployment and main problem solving methods

Written by
Silas Grey
Updated on:July-11th-2025
Recommendation

Master the local deployment of Dify 1.0.0 to accelerate the construction of enterprise-level AI applications.

Core content:
1. Introduction to Dify: Introduction to the open source large model application development platform
2. Detailed explanation of Dify deployment steps based on Docker
3. Common problems and solutions in deployment

Yang Fangxian
Founder of 53AI/Most Valuable Expert of Tencent Cloud (TVP)


1. Introduction to dify

Dify is an open source Large Language Model (LLM) application development platform that provides capabilities ranging from Agent construction to AI workflow orchestration, RAG retrieval, model management, etc. It aims to simplify the construction of generative AI applications through low-code/no-code methods, and build complex enterprise-level artificial intelligence applications only by dragging and dropping and configuring. In addition, it also supports programming development and extension through its plug-in system, API calls, etc. to achieve more complex functional requirements.

existdeepseek-r1Driven by the AI ​​craze, people are more enthusiastic than ever about deploying private deepseek models and building local knowledge bases and AI agents. Among the many application frameworks that support knowledge bases, workflows, and agents, Dify stands out for its simple installation and use, flexible configuration, and high playability.

Recently, Dify released a new version 1.0.0. This article will introduce the private installation configuration of Dify 1.0.0 based on Docker and the solutions to the main problems encountered during use.

2. Deploy Dify based on Docker

Please make sure you have installedgitanddocker(You can also install it in your companypodmanAlternativedocker). For reference:

  • • Git Installation: https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git
  • • Docker Desktop installation: https://www.docker.com
  • • Podman installation (Docker alternative): https://podman.io/docs/installation

Then refer to and execute the following command:

# Example, enter the working directory
cd  ~/workspace

# Pull the Dify repository source code
git  clone  https://github.com/langgenius/dify.git

# Copy the `dify/docker` directory
# Because the `docker-compose.yaml` file will be modified later, the files in the warehouse will not be modified to facilitate subsequent code upgrades
cp  -r dify/docker dify-docker
cd  dify-docker
# Create an environment variable configuration file .env by copying
cp  .env.example . env

# Pull the image -- Domestic users may fail, please refer to the next chapter for solutions
docker-compose pull

Newrun.shFile, used to quickly start and stop the Dify service:

echo "docker-compose down && docker-compose up -d"  > run.sh 
# Grant executable permissions
chmod  +x run.sh

implement./run.shStart the Dify service. Then you can access it through your browserhttp:<ip>:<nginx port>,like:http://192.168.1.100:8001.

The above are all the steps to install, configure and start Dify based on Docker.

However, if you are a domestic user and do not have a proxy to access the Internet, you may encounter some problems. You can refer to the next chapter to solve them, mainly by modifyingdocker-compose.yamland.envPart of the file is configured to adapt to the domestic network environment.

2. Main problems and solutions of Dify 1.0.0 version installation in China

First, you should master the basic method of troubleshooting problems by viewing logs and analyzing services deployed based on Docker:

# View the currently running container services
docker ps

# View the logs printed by a container in watch mode
docker logs -f <container ID>
# Example:
docker logs -f dify-docker_dify-api-1
docker logs -f dify-docker_dify-plugin-daemon-1

2.1 Problems and solutions for Docker image pull failure

  • • set updockerThe mirror source ishub.mirrorify.net
  • • editdocker-compose.yamldocument
    • • Search and Replaceghcr.ioforghcr.mirrorify.net
    • • Search and Replacequay.ioforquay.mirrorify.net
    • • Search and Replacedocker.elastic.coforelastic.mirrorify.net

Then executedocker-compose pullPull the image.

2.2 Problem and solution of port 80 being prohibited from binding when starting

This is mainly because I use Podman. Podman starts the container service as a non-root user, and non-root users can only use ports above 1024 by default.sysctlThe command can modify the starting port, for example:

# Temporary effect
sysctl net.ipv4.ip_unprivileged_port_start=0
# Permanent effect
echo "net.ipv4.ip_unprivileged_port_start=0"  >> /etc/sysctl.conf 

Can also edit.envFile, search and modify the NGINX mapping port number to be above 1024. Example:

EXPOSE_NGINX_PORT=8001
EXPOSE_NGINX_SSL_PORT=4443

2.3 Dify plug-in market model, plug-in installation failure issues and solutions

Dify 1.0 has launched a new plug-in market, and all models, tools, and extensions can be installed through plug-in mode. Of course, if you have development capabilities, you can also develop your own plug-ins, which undoubtedly provides Dify with great potential for personalized customization and makes it much more playable. The plug-in market of Dify 1.0 is relatively complete, but the details are not perfect enough, and the user experience is poor in poor network environments.

The underlying layer of the Dify plug-in is Python code development, and the third-party libraries that the plug-in depends on need to be downloaded in real time during installation.

Due to well-known reasons, domestic users are likely to encounter slow downloads and unsuccessful installations due to network problems when installing plug-ins. This can be solved by setting pip to use domestic mirror sources.

existdocker-compose.yamlSearchplugin_daemon, below whichenvironmentAdd the following content:

  plugin_daemon:
    image: langgenius/dify-plugin-daemon:0.0.3-local 
    restart: always 
    environment:
      # Set the timeout to 300 seconds
      PYTHON_ENV_INIT_TIMEOUT: ${PYTHON_ENV_INIT_TIMEOUT:-300} 
      # Set pip to use domestic mirror source
      PIP_MIRROR_URL: ${PIP_MIRROR_URL:-https://pypi.tuna.tsinghua.edu.cn/simple} 

In addition, it is necessary to modify.envFile, add the following environment variable configuration at the end:

MARKETPLACE_URL=https://marketplace.dify.ai

PLUGIN_WORKING_PATH=/app/storage/cwd
PYTHON_ENV_INIT_TIMEOUT=300
PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple

Related suggestions:

  • • The plug-in installation process may take a long time, and there will be no prompts on the web interface.dify-plugin-daemonThe Docker log of the container to find out whether an exception occurred and more information.
  • • If the plugin installation has failed before, and the above methods still cannot solve the plugin installation problem, you can deletedify-docker/volumesdirectory, restart the service and try again ( if there is historical data, please be careful, all private data is in this directory ).
  • • If the installation through the Web interface plugin market always fails, you can try to install it by clicking Details, downloading it on the Details page, and then coming back to upload it through the “Local plugin” method.

2.4 Problems and solutions for starting errors with Podman

PodmanIs the best currentlydockerOpen source alternative. Due to licensing issues, the company prohibits the use of docker-desktop, so I use Podman instead of Docker on a daily basis.

aboutPodmanFor the installation and use of podman, please refer to this article: Replace docker and docker-desktop: Installation and use of podman in the domestic environment

    In usepodman-composeWhen starting the service,networkRelated errors:

    RuntimeError: missing networks: default

    After investigation and analysis, the solution is:docker-compose.yamlFiles, SearchnetworksAnd add the following content below it:

     sandbox:
        networks:
          -ssrf_proxy_network 
          - default # Content to be added  

    networks:
      default: # Content to be added 
        driver: bridge # Content to be added  
    • • Solution reference: https://github.com/langgenius/dify/issues/14491

    3. Download, configure and use the Dify 1.0 model

    All model configurations of the new version are provided in the form of plug-ins. First you need to download and install the model, then configure it. It is recommended to download and install the following models in the plug-in market:
    • ollama: If you have installed it locallyollamaand pulled the local model, then it is needed. The current version ofollamaIt is relatively simple to add models through plugins. It will not automatically obtain the model list from the API and only supports configuration.LLMandEMBEDDINGThis type of model should have a lot of room for optimization in the future.
    • OpenAI: Currently, the APIs provided by third-party model suppliers are basically the same asOpenAIIt is compatible, so if you use a third-party model but can't find its corresponding plug-in, it's right to install this to configure it.
      • • For example, I have configuredAICNNFor an example of a model, see the figure above.
    • Silicon-based flow: Provides up to models, and new users will receive a 14 yuan bonus when they register.

    You can use more powerful large model capabilities by adding the API of third-party model suppliers. Currently, there are several suppliers that provide free quotas upon registration:

    • • Silicon-based flow (Invite registration to send 14 yuan bonus)https://cloud.siliconflow.cn/i/hDM9hDR6
    • • Paio Computing Cloud (Invite registration to get 50 yuan bonus)https://ppinfra.com/user/register?invited_by=XRMRL5
    • • Zhipu AI (Invite registration to get 20 million tokens, and you can invite 10 new users per month)https://www.bigmodel.cn/invite?icode=TY4kHajmj2PV8KLUkl97jP2gad6AKpjZefIo3dVEQyA%3D
    • • Volcano Ark DeepSeek (Invite registration to get 15 yuan)https://volcengine.com/L/i55LvAaP/
    • • AICNN (Provide Grok3/Claude 3.7 sonnet. Invite registration to get 8888 points, daily sign-in to get points)http://aicnn.cn/loginPage?aff=4MvsDBGxfZ

    After installation and configuration, you can create personalized AI applications in the "Studio". The following figure is an example of a more complex investment tool workflow, which includes dozens of work steps. It can be seen that the workflow model is quite flexible:

    It is worth mentioning that Dify supports DSL import and export, which allows you to easily export workflows as DSL files and then share them with others, who can then import them through DSL files. The following is an open source Dify DSL repository. If you are interested, you can download and refer to it to learn how others create and use it:

    •    4. Summary and References

    In general, the biggest change in Dify 1.0 is the introduction of a new plug-in system and the provision of a plug-in market, which extracts large-scale model adaptation, tools, and extensions from the core framework into independent plug-ins, thus providing a lot of room for personalized customization. By installing official plug-ins, you can quickly build AI native applications in a low-code/no-code manner, or you can develop customized private plug-ins to expand more complex personalized capabilities. This model also provides room for imagination for the subsequent introduction of paid plug-ins.

    However, the current plug-in system is not yet complete, and the experience is poor in general network environments. The process of installing and configuring plug-ins will consume a lot of time. Students who are already using an older version are advised to wait a little longer and decide whether it is worth upgrading after experiencing a new installation.