Deploy Dify on SAE (Public Preview)
Dify is an open-source large language model (LLM) application development platform. Serverless App Engine (SAE) allows you to quickly deploy Dify without managing underlying compute resources, and achieve high availability and auto scaling in seconds with simple configuration.
Responsibility Boundaries: Applications deployed from the App Center, unless otherwise specified, are consistent with their open-source community versions. You are responsible for any stability risks and security vulnerabilities associated with the open-source software. The SAE service guarantee covers only the stability of the underlying runtime and does not extend to the quality, security, or maintenance of the open-source software itself. We recommend that you conduct thorough technical reviews and security audits before deploying applications to a production environment.
Deploy Dify production environment
Solution architecture

Resource checklist
Billing
Permissions
Deploy application
Go to the App Center, select Dify Community Edition - Serverless Deployment, and click Deploy.
Select Template: For production environments, select Dify High-availability Edition or Dify High-availability + Observable Edition, which uses Alibaba Cloud database services for high availability. The Dify High-availability + Observable Edition also integrates observability for
dify-sandboxanddify-plugin-daemon, and uses automatic probe instrumentation to provide performance analysis, token analysis, and trace views. To add observability to thedify-apicomponent, see Enable observability for Dify applications.Select Region: Select the region where you want to deploy the resources.
Billing Method Configuration: Select pay-as-you-go or subscription.
SAE Configuration: Set the SAE namespace Name (you can use the default value, 'default'), Number of SAE replicas, SAE vCPUs, and SAE Memory.
Postgres Database Configuration: Set the PostgreSQL instance type, PostgreSQL instance storage type, PostgreSQL instance storage, PostgreSQL database account name, and PostgreSQL database password.
Redis Database Configuration: Set the Redis instance password.
Tablestore Configuration: Set the Tablestore instance type.
Basic Configuration: Select Create VPC or Use Existing VPC. To improve service availability, select two availability zones to deploy your resources.
After confirming the parameters and pricing details, note that if you select an Observable Edition, ARMS incurs additional charges that are not included in the pricing estimate. Click Next: Confirm Order and then Create Now.
In the Deployed Scenarios list, you can view the created application scenario. Wait for the Status to change to Deployed, which indicates a successful deployment.
Click the Scenario ID. In the Service Resources section, you can view and navigate to the deployed Service Resources. In the Use Now section, click the URL next to Dify Service Address to open the Dify management console.
Set up an administrator account, log in, and then start using Dify.
Operations and management
Go to the SAE Application List. Select the application's region and namespace to view the deployed applications. Click an application ID to open its details page.
Application lifecycle management
On the Basic Information page, click the buttons at the top to View Application Configuration, Deploy Application (modify the application configuration and redeploy), perform Manual Scaling (adjust the number of application replicas), Stop Application, Restart Application, or Delete Application.
To delete all resources related to Dify, find the Dify scenario in Deployed Scenarios in the App Center and click Delete.
Auto scaling
On the Basic Information page, click Auto Scaling at the top to configure an auto scaling policy.
Application configuration
On the Basic Information page, click Deploy Application at the top. In the Environment Variables section, set the Variable Value. For some variables, you must reference a ConfigMap or a Secret.
Application monitoring (Observable Edition only)
View monitoring data for dify-sandbox and dify-plugin-daemon on their Application Monitoring pages or in the section of the ARMS console.
To add observability to the dify-api component, see Enable observability for Dify applications.
Deploy Dify High-performance Edition
The Dify High-performance Edition builds on the Dify open-source version with code optimizations and configuration tuning. When deployed with appropriately sized Dify components and external resources, it can meet the demands of high-concurrency, multi-user production workloads.
The deployment and O&M methods are similar to those for the Dify High-availability Edition. The deployment parameters differ as follows:
For Select Template, select Dify High-performance Edition.
For Celery Backend Configuration, set the Celery backend Redis instance type and Celery backend Redis instance password.
Deploy Dify test environment
The Dify Test Edition uses single-node database instances to reduce costs, but this approach lacks high availability. This edition is therefore recommended only for testing.
Deployment and O&M are similar to the Dify High-availability Edition. The only configuration difference is the template selection: for Select Template, you must select Dify Test Edition or Dify Test + Observable Edition.