docs/versioned_docs/version-1.9.0/Deployment/deployment-architecture.mdx
There are two broad types of Langflow deployments:
Langflow IDE (development): Deploy both the Langflow visual editor (frontend) and API (backend). Typically, this is used for development environments where developers use the visual editor to create and manage flows before packaging and serving them through a production runtime deployment.
The Langflow repository's example docker-compose.yml file builds a Langflow IDE image.
For information about IDE deployments on Kubernetes, see Deploy the Langflow development environment on Kubernetes.
Langflow runtime (production): Deploy the Langflow runtime for production flows, which is headless (backend only) service focused on serving the Langflow API. This is used for production environments where flows are executed programmatically without the need for the visual editor. The server exposes your flows as endpoints, and then runs only the processes necessary to serve each flow.
An external PostgreSQL database is strongly recommended with this deployment type to improve scalability and reliability as compared to the default SQLite database.
For information about runtime deployments on Kubernetes, see Deploy the Langflow production environment on Kubernetes.
:::tip
You can start Langflow in headless mode with the LANGFLOW_BACKEND_ONLY environment variable.
:::
You can also deploy the Langflow IDE and runtime on Docker.
Deploying on Kubernetes offers the following advantages:
Scalability: Kubernetes allows you to scale the Langflow service to meet the demands of your workload.
Availability and resilience: Kubernetes provides built-in resilience features, such as automatic failover and self-healing, to ensure that the Langflow service is always available.
Security: Kubernetes provides security features, such as role-based access control and network isolation, to protect the Langflow service and its data.
Portability: Kubernetes is a portable platform, which means that you can deploy the Langflow service to any Kubernetes cluster, on-premises or in the cloud.
Langflow can be deployed on cloud platforms like AWS EKS, Google GKE, or Azure AKS. For more information, see the Langflow Helm charts repository.
A typical Langflow deployment includes:
It is recommended to deploy and run separate development and production environments for Langflow:
This separation is designed to enhance security, support an organized software development pipeline, and optimize infrastructure resource allocation: