Deploy a Dify instance with one click

Updated at:
Copy as MD

AI-Native Database Service allows you to deploy a Dify instance with one click through ComputeNest. After the deployment is complete, the Dify instance and its dependent database resources are automatically registered in the AI-Native Database Service console. You can then use Dify to build AI applications.

Supported regions

One-click Dify deployment is available in the following regions:

  • China site: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), and China (Hong Kong).

Prerequisites

Before you deploy a Dify instance, make sure that the following RAM permission policies are granted to the current account:

Cloud service Required permission policy

ApsaraDB RDS

AliyunRDSFullAccess

Tair (Redis OSS-Compatible)

AliyunKvstoreFullAccess

AnalyticDB for PostgreSQL

AliyunGPDBFullAccess

Virtual Private Cloud (VPC)

AliyunVPCFullAccess

Elastic Compute Service (ECS)

AliyunECSFullAccess

ComputeNest

AliyunComputeNestUserFullAccess

Resource Orchestration Service (ROS)

AliyunROSFullAccess

Data Management (DMS)

AliyunDMSFullAccess

Note

If you use a RAM user, contact the Alibaba Cloud account administrator to grant the preceding permission policies. For more information about how to grant permissions, see Grant permissions to a RAM user.

Procedure

  1. Log on to the AI-Native Database Service console.

  2. In the left-side navigation pane, choose Agent Developer Platform > Custom Development.

  3. On the Dify tab, click Deploy Dify with One Click. You are redirected to the ComputeNest deployment configuration page.

  4. Configure Billing Method.

    • Pay-as-you-go: You are charged based on actual resource usage. This option is suitable for development, testing, or short-term scenarios.

    • Subscription: You prepay for a fixed duration. This option is suitable for production environments with long-term, stable usage.

  5. Select a Deployment Region. We recommend that you select the region closest to your end users to minimize network latency.

  6. Configure Network Resources.

    • VPC: Select an existing VPC, or click Create VPC to create a new one. We recommend that you select the same VPC as your existing business systems.

    • vSwitch: Select a vSwitch in the selected VPC. The zone of the vSwitch must match the deployment region.

  7. Configure the Metadata Database. The system automatically creates an ApsaraDB RDS for PostgreSQL instance to store Dify application configurations, user information, and other metadata. Select an instance type based on your workload.

  8. Configure the Redis Cache. The system automatically creates a Redis instance for cache acceleration and session management in Dify. Select an instance type based on the expected number of concurrent users.

  9. Configure the Vector Database. The system automatically creates an AnalyticDB for PostgreSQL instance for vector storage and semantic retrieval in the Dify knowledge base. Select an instance type based on the expected knowledge base data volume.

  10. Confirm the configuration and estimated cost, read and select the service agreement, and then click Create Now.

  11. Wait for the deployment to complete. The deployment typically takes 10 to 15 minutes. You can view the deployment progress and resource creation status in the ComputeNest console.

Result

After the deployment is complete, the system automatically performs the following operations:

  • The Dify instance is automatically registered in the AI-Native Database Service console. You can view and manage the instance on the Dify tab of the Agent Developer Platform > Custom Development page.

  • The ApsaraDB RDS for PostgreSQL, Redis, and AnalyticDB for PostgreSQL instances created during deployment are also registered in the console for centralized O&M management.

  • The Dify instance provides a dedicated access URL. You can use this URL to access the Dify console and start building AI applications.

FAQ

What do I do if the deployment fails?

Check the following items in order: whether all required permission policies are granted to the RAM user, whether the selected region and zone have sufficient resource inventory, and whether the VPC and vSwitch CIDR block configurations have conflicts. You can view detailed error messages in the deployment logs in the ComputeNest console.

How do I access Dify after the deployment is complete?

Log on to the AI-Native Database Service console. On the Agent Developer Platform > Custom Development page, find the deployed Dify instance and click the access URL to open the Dify console.