AI Personal Learning
and practical guidance
豆包Marscode1

Dify-Plus: an on-premises management backend for Dify

General Introduction

Dify-Plus is an AI application development platform based on the secondary development of the Dify open source project. It adds a new management center based on Dify and optimizes its functions for enterprise scenarios. The project was initially for internal use, and later found that the community has similar needs, it is open source sharing.Dify-Plus retains the core functions of Dify, such as AI workflow design and model management, while adding user quota management, permission control and other practical enterprise functions. It is completely open source, follows Dify's copyright license, and does not involve multi-tenant features or official logos.

Dify-Plus:为Dify开发的企业级管理后台-1


 

Function List

  • management center: Based on, support for user management, permission settings and expense reports.
  • User quota management: Limit dialog balances, show usage amounts, support asynchronous calculations.
  • AI workflow design: Build AI workflows visually and create applications quickly.
  • model integration: Supports a variety of large language models, such as GPT, Llama3, etc.
  • RAG Pipeline: Built-in search enhancement generation to handle document extraction and Q&A.
  • application center: Shows a list of applications, sorted by number of uses, with support for synchronization to templates.
  • API Key Management: Setting call balance limits and analyzing key usage.
  • Privilege Optimization: Restricts general member operations and hides sensitive information.
  • code tag: Use marked bisections for ease of maintenance.

 

Using Help

Dify-Plus needs to be deployed on its own to work. Below is a detailed installation and operation guide to help users get started quickly.

Installation process

Dify-Plus supports both Docker Compose and source code deployments, here we take Docker Compose as an example.

  1. Preparing the environment
    • Hardware requirements: at least 2-core CPU, 4GB RAM.
    • Install Docker and Docker Compose, refer to: https://docs.docker.com/get-docker/.
    • Install Git for pulling the source code.
  2. Download source code
    Open a terminal and run it:
git clone https://github.com/YFGaia/dify-plus.git
cd dify-plus
  1. Configuring Environment Variables
  • Copy the template file:
    cp .env.example .env
    
  • Edit to set the database and port. Example:
    DB_HOST=localhost
    DB_PORT=5432
    APP_WEB_URL=http://localhost
    
  • If public access is required, it is recommended to configure a domain name and HTTPS.
  1. Starting services
  • Execute the command:
    docker compose up -d
    
  • Wait 5-10 minutes and visit http://localhost/install完成初始化.
  1. Validating Deployment
  • Browsers visit http://localhost and see the login page to be successful.

Source code deployment (optional)

  • Refer to the official document: https://github.com/YFGaia/dify-plus/wiki/ .
  • Requires manual installation of Node.js, Python, and other dependencies for users with development experience.

Main Functions

management center

  • log in: Log in with the default account in .
  • user management: Select "User Management" in the left menu to add users or modify their rights.
  • Statement of costs: Click on "Expense Reports" to view model usage expenses and statistics.

User quota management

  • View Limit: After logging in, the current dialog balance is displayed in the upper left corner.
  • Modification of quota: The administrator goes to the "Personal Limit Modification" screen and enters the new value to save it.
  • Restricted judgment: When the balance is insufficient, the system automatically restricts the conversation.

AI workflow design

  • New Workflow: Click on "New Workflow" to enter the editor.
  • Configuration Nodes: Drag and drop the Model Node, enter the API key, and connect to other nodes.
  • operational test: Click "Run", enter the test text, and view the results.

model integration

  • Adding Models: In "Model Management", enter the API key and model name.
  • Using the model: When creating a workflow, select the added model from the list.

application center

  • View Application: Go to "Application Center" and browse by the number of times you have used it.
  • Synchronized templates: Select the application and click "Synchronize to Application Template" to save it as a template.

API Key Management

  • Creating Keys: Click "Create" in "API Key List" to set the balance limit.
  • test call: Verify the generated key on the "API Call Test" screen.

Featured Function Operation

User quota display

  • After logging in, the balance is displayed in real time in the upper left corner. Administrator can adjust it in the background.

Privilege Optimization

  • Ordinary members can't close the model or view the key to safeguard security.
  • The Model Vendors tab is not visible to non-administrators.

Code Maintenance

  • Search in the source code to see the contents of the second opening. Example:
grep -r "extend" .

Updates and Maintenance

  • Check for updates: Visit https://github.com/YFGaia/dify-plus for the latest version.
  • Pull Updates::
git pull origin main
docker compose up -d --build
  • The project will follow Dify and updates to maintain compatibility.

caveat

  • Configure HTTPS for public network deployment to avoid data leakage.
  • Backup and regularly to prevent configuration loss.
  • For multi-tenant functionality, contact Dify officials for licensing.

With these steps, users can easily deploy and use Dify-Plus. its enterprise optimization features are very useful for teams that need to manage AI applications.

 

application scenario

  1. Enterprise Knowledge Management
    Upload internal documents and build an AI Q&A system so employees can quickly look up information.
  2. Customer Service Automation
    Design autoresponder workflows to handle common customer questions and improve responsiveness.
  3. Model Testbed
    Developers integrate different models, test performance, and optimize AI application development.

 

QA

  1. What is the difference between Dify-Plus and Dify?
    Dify-Plus adds management center and enterprise features such as user quota management and permission control, with core AI capabilities from Dify.
  2. Do I need programming experience to deploy?
    Not required. Follow the documentation to deploy. Secondary development requires programming fundamentals.
  3. What models are supported?
    GPT, Mistral, etc. are supported, as long as the API is compatible with the OpenAI format.
  4. How do I check the cost of usage?
    You can view the model calls and key expenses on the Expense report screen in the Administration center.
May not be reproduced without permission:Chief AI Sharing Circle " Dify-Plus: an on-premises management backend for Dify
en_USEnglish