Dify deployment and infrastructure

Production layouts for self-hosted Dify: Docker Compose hardening, external PostgreSQL, Redis and object storage, TLS, offline installs, cloud images and Enterprise on Kubernetes.

Dify production deployment with Docker Compose

Taking the default Compose stack from test to production: replacing default secrets, sizing the host beyond the 2 CPU and 4 GiB minimum, which of the core services and dependencies to move out, and the env file layout.

Dify with an external PostgreSQL database

Moving Dify metadata off the bundled db_postgres container to a managed or clustered PostgreSQL: connection pool settings, TLS for the plugin daemon connection, version choice and backup responsibility.

Dify with Redis Sentinel or Redis Cluster

Removing the single Redis container as a failure point: standalone versus Sentinel versus Cluster modes, TLS and ACL settings, separating the Celery broker database, and key prefixes for shared instances.

Dify HTTPS with Nginx and Let's Encrypt

Serving Dify over TLS from the bundled Nginx: certificate placement, the Certbot challenge option, TLS protocol settings, long proxy timeouts for streaming responses, and updating every public URL variable to https.

Dify in air-gapped and offline networks

Running Dify without internet access: disabling the Marketplace, installing signed .difypkg plugins locally, a private PyPI mirror for plugin dependencies, private image registries, and self-hosted models for every model job.

Dify Enterprise on Kubernetes with Helm

Installing Dify Enterprise from the official Helm chart: Kubernetes and Helm versions, the six domains, testing versus production resources, external PostgreSQL, Redis, Qdrant and object storage, and OpenShift root requirements.

Dify Enterprise on AWS or Azure

Cloud infrastructure for Dify Enterprise: the managed services Dify documents for AWS and an Azure proof of concept, how they map to the resources checklist, and network design for private model endpoints.

Dify sizing and capacity planning

Estimating hardware for Dify: the Compose minimum, Enterprise testing and production profiles, how knowledge indexing and workflow concurrency drive worker and database load, and when Qdrant needs its own cluster.

Dify source code deployment for customization

Running the Dify API, worker and web services from source with the middleware stack in Docker: when platform changes justify a fork, how upgrades get harder, and the ports the middleware publishes.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.