Back to templates
Dify icon

Deploy Dify on Sealos

Dify is an open-source LLM application development platform for building AI agents, workflows, and RAG applications.

AI
Launch a private Dify AI workspace with one-click deployment.Keep models, prompts, and workflow data in your own Sealos environment.Scale GPU or CPU resources as your AI workload grows.Use an open-source template without managing Kubernetes YAML.

Why deploy on Sealos

Sealos makes deploying any app effortless, secure, and production-ready. From one-click launch to ongoing operations, we handle the heavy lifting so you can focus on what matters.

One-Click Deploy
Sealos logo
Compute
Networking
Storage
Security
Observability
Your Application is Live

One-Click Deployment

Deploy any app template in seconds. No compose setup, manual configure, and go live.

Managed Kubernetes Reliability

Built on Sealos Managed Kubernetes for high availability, auto-scaling, and self-healing by default.

Automatic HTTPS & Security

Every deployment includes a secure domain with automatic SSL. We handle certificates and text protection for you.

Persistent Storage

Attach persistent volumes with ease. Your data stays safe, durable, and always accessible.

Scale when needed

Adjust resources as your app grows, no downtime required.

You Get the Whole Stack

Sealos provisions and connects every resource your application needs. Everything is ready to use.

One-click, fully provisionedSecure by defaultProduction ready

App Service

Your application is running and ready to serve requests.

Public HTTPS URL

Secure, global endpoint to access your application.

Database

Managed database instance for your application.

Persistent Volume

Durable storage for uploads and application data.

Environment Variables

Configuration and secrets injected securely into your app.

Logs & Metrics

Centralized logs and basic metrics are enabled.

README

README.md

Deploy and Host Dify on Sealos

Dify is an open-source LLM application development platform for building AI agents, workflows, chatbots, and RAG applications. This template deploys Dify 1.15.0 with PostgreSQL, Redis, Weaviate, sandbox execution, the plugin daemon, and an optional private Sealos Object Storage bucket.

Dify Screenshot

About Hosting Dify

Dify runs as a multi-service AI application platform. The web service serves the console and public app UI, the API service handles backend requests, workers process asynchronous jobs, and the worker beat container schedules periodic tasks. Dify Sandbox isolates code execution, while the plugin daemon installs and runs marketplace plugins.

The template provisions PostgreSQL for application and plugin metadata, Redis for Celery queues, Weaviate for vector search, and an optional Sealos ObjectStorage bucket for uploaded files and plugin packages. Sealos also manages the public HTTPS endpoint through Ingress and exposes Dify as a dashboard App entry.

Common Use Cases

  • AI agents and chatbots: Build hosted assistants with model providers, tools, and memory.
  • RAG applications: Upload documents, index them in Weaviate, and serve grounded answers.
  • Workflow automation: Run multi-step LLM workflows with background worker processing.
  • Plugin-based extensions: Install Dify plugins through the plugin daemon and marketplace.
  • Internal AI portals: Host a shared console for teams building and testing AI apps.

Dependencies for Dify Hosting

The Sealos template includes all required runtime services: Dify Web, Dify API, Celery worker, Celery beat, Dify Sandbox, Dify Plugin Daemon, PostgreSQL, Redis, Weaviate, and optional Sealos ObjectStorage.

Deployment Dependencies

Implementation Details

Architecture Components:

  • Web: Serves the Dify console and public application pages.
  • API: Handles console APIs, app APIs, file routes, MCP routes, migrations, and first setup.
  • Worker: Processes Celery queues for datasets, workflows, mail, and asynchronous jobs.
  • Worker Beat: Schedules periodic background tasks.
  • Sandbox: Runs isolated code execution through an internal service endpoint.
  • Plugin Daemon: Manages plugin installation, execution, and remote plugin debugging endpoints.
  • PostgreSQL: Stores Dify application metadata and a separate plugin database.
  • Redis: Provides queue and cache services for the API, workers, and plugin daemon.
  • Weaviate: Provides the default vector database for knowledge indexing.
  • Storage: Uses persistent local volumes by default. When enable_s3_storage is true, uploaded files and plugin packages use a private Sealos Object Storage bucket.

Configuration:

  • init_password is required and unlocks the first Dify setup screen.
  • enable_s3_storage defaults to false. Set it to true to provision a private Sealos Object Storage bucket and inject S3-compatible credentials.
  • Dify URLs are configured to https://${{ defaults.app_host }}.${{ SEALOS_CLOUD_DOMAIN }} for console, API, app, and service endpoints.
  • PostgreSQL and Redis credentials are sourced from Sealos-managed KubeBlocks secrets.
  • Internal API, Redis, Weaviate, Sandbox, and Plugin Daemon traffic uses namespace-qualified cluster DNS names.

License Information:

Dify is licensed under the Dify Open Source License. This Sealos template is provided under the repository license for Sealos application templates.

Why Deploy Dify on Sealos?

Sealos is an AI-assisted Cloud Operating System built on Kubernetes that unifies application deployment, networking, storage, and operations. By deploying Dify on Sealos, you get:

  • One-Click Deployment: Deploy the full Dify stack from the App Store.
  • Managed Dependencies: Provision PostgreSQL, Redis, Weaviate, storage, and public routing with the template.
  • Instant HTTPS Access: Receive a public URL with SSL after deployment.
  • Canvas Operations: Use the Canvas, AI dialog, and resource cards for post-deployment changes.
  • Pay-As-You-Go Resources: Adjust CPU, memory, and replicas as usage grows.

Deployment Guide

  1. Open the Dify template and click Deploy Now.
  2. Configure the deployment parameters:
    • init_password: Enter a required password that unlocks the initial setup page.
    • enable_s3_storage: Keep false for persistent local storage, or set true for a private Sealos S3-compatible bucket.
  3. Wait for deployment to complete. The databases, migrations, API workers, and web console can take several minutes on first start.
  4. Open the Dify App entry or the public URL shown by Sealos.
  5. Enter init_password on the Administrator initialization password screen and click Verify.
  6. On the next screen, enter the administrator email, display name, and account password, then click Set up. The account password can be different from init_password.
  7. Sign in later with the administrator email and the account password created in step 6.

First Login Checks

After login, verify two core interactions:

  1. Open Studio, create a Workflow or Chatflow app, and open its editor.
  2. Open Knowledge and upload a small text file to confirm the API, worker, Redis queue, Weaviate, and selected storage path are connected.

Model providers are configured inside Dify after login. Add your provider API key in Dify settings before running model-backed chats or workflows.

Configuration

After deployment, you can configure Dify through:

  • Dify Console: Add model providers, create apps, configure tools, and manage knowledge bases.
  • AI Dialog: Describe infrastructure changes in the Sealos Canvas dialog.
  • Resource Cards: Adjust Deployment, StatefulSet, database, storage, and Ingress resources.
  • Environment Variables: Update Dify runtime settings from the relevant workload cards.

Scaling

To scale Dify:

  1. Open the Canvas for your deployment.
  2. Click the Web, API, Worker, Sandbox, Plugin Daemon, PostgreSQL, Redis, or Weaviate resource card.
  3. Adjust CPU, memory, storage, or replica settings.
  4. Apply the changes in the dialog and wait for the rollout to finish.

The validated application resource profile is:

ComponentCPU limitMemory limitObserved memory peak
API500m1Gi756Mi with two Gunicorn workers
Worker500m1Gi400Mi
Worker Beat500m1Gi390Mi
Web200m1Gi388Mi
Weaviate500m512Mi79Mi
Sandbox200m512Mi46Mi
Plugin Daemon200m512Mi15Mi

The API runs two Gunicorn workers so console traffic and health checks remain responsive during plugin and workflow requests. Its probes use the same container-local /health check as the official Dify Compose deployment.

For larger workloads, scale the API and worker containers first, then increase PostgreSQL, Redis, and Weaviate resources based on observed bottlenecks.

Troubleshooting

First setup screen loops

  • Cause: The API service is waiting for PostgreSQL migrations or Redis connectivity.
  • Solution: Check the API and worker logs from the Canvas, then confirm PostgreSQL and Redis resource cards are healthy.

Knowledge base indexing stalls

  • Cause: Worker, Redis, Weaviate, or object storage connectivity is delayed.
  • Solution: Check worker logs, Redis status, and Weaviate readiness. Confirm the deployed enable_s3_storage mode matches the intended storage backend.

Plugin installation fails

  • Cause: Plugin daemon storage or internal API credentials are unavailable.
  • Solution: Check plugin daemon logs and confirm the API service is reachable from the plugin daemon resource.

Getting Help

Additional Resources

License

This Sealos template is provided under the repository license for Sealos templates. Dify itself is licensed under the Dify Open Source License.

Related templates

Explore more production-ready templates.

More