Repository: langflow-ai/langflow
Pull request #7108: docs: deployment overview
Author: login: mendonk
Labels: name: documentation
description: Improvements or additions to documentation
name: size:L
description: This PR changes 100-499 lines, ignoring generated files.
name: lgtm
description: This PR has been approved by a maintainer
Created: 2025-03-17T19:07:38Z | Merged: 2025-03-27T20:51:47Z

* [Add an overview page for Langflow deployment options, with links to the step-by-step guides.](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/deployment-overview)
* [Add instructions for deploying multiple Langflow containers with a single postgresql database.](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/configuration-custom-database#connect-multiple-langflow-containers-to-postgresql)


Diff:
diff --git a/docs/docs/Configuration/configuration-custom-database.md b/docs/docs/Configuration/configuration-custom-database.md
index f4715327c08f..7ed741cdecb4 100644
--- a/docs/docs/Configuration/configuration-custom-database.md
+++ b/docs/docs/Configuration/configuration-custom-database.md
@@ -4,7 +4,7 @@ slug: /configuration-custom-database
 ---
 Langflow's default database is [SQLite](https://www.sqlite.org/docs.html), but you can configure Langflow to use PostgreSQL instead.
 
-This guide will walk you through the process of setting up an external database for Langflow by replacing the default SQLite connection string `sqlite:///./langflow.db` with PostgreSQL.
+This guide walks you through setting up an external database for Langflow by replacing the default SQLite connection string `sqlite:///./langflow.db` with PostgreSQL.
 
 ## Prerequisite
 
@@ -16,13 +16,11 @@ To connect Langflow to PostgreSQL, follow these steps.
 
 1. Find your PostgreSQL database's connection string.
 It looks like `postgresql://user:password@host:port/dbname`.
-For example, if you started PostgreSQL with this Docker command:
 
-```
-docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
-```
-
-Your connection string would be `postgresql://some-postgres:mysecretpassword@localhost:5432/postgres`.
+The hostname in your connection string depends on how you're running PostgreSQL.
+- If you're running PostgreSQL directly on your machine, use `localhost`.
+- If you're running PostgreSQL in Docker Compose, use the service name, such as `postgres`.
+- If you're running PostgreSQL in a separate Docker container with `docker run`, use the container's IP address or network alias.
 
 2. Create a `.env` file for configuring Langflow.
 ```
@@ -30,7 +28,7 @@ touch .env
 ```
 
 3. To set the database URL environment variable, add it to your `.env` file:
-```plaintext
+```text
 LANGFLOW_DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
 ```
 
@@ -42,35 +40,141 @@ Replace the value for `LANGFLOW_DATABASE_URL` with your PostgreSQL connection st
 
 4. Run Langflow with the `.env` file:
 ```bash
-langflow run --env-file .env
+uv run langflow run --env-file .env
 ```
 
 5. In Langflow, create traffic by running a flow.
 6. Inspect your PostgreSQL deployment's tables and activity.
-You will see new tables and traffic created.
+New tables and traffic are created.
 
 ## Example Langflow and PostgreSQL docker-compose.yml
 
-The Langflow project includes a [`docker-compose.yml`](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file  for quick deployment with PostgreSQL.
+The Langflow project includes a [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file for quick deployment with PostgreSQL.
 
-This configuration launches Langflow and PostgreSQL containers, with Langflow pre-configured to use the PostgreSQL database. Customize the database credentials as needed.
+This configuration launches Langflow and PostgreSQL containers in the same Docker network, ensuring proper connectivity between services. It also sets up persistent volumes for both Langflow and PostgreSQL data.
 
 To start the services, navigate to the `/docker_example` directory, and then run `docker-compose up`.
 
 ```yaml
 services:
   langflow:
-    image: langflow-ai/langflow:latest
-    environment:
-      - LANGFLOW_DATABASE_URL=postgresql://user:password@postgres:5432/langflow
+    image: langflowai/langflow:latest    # or another version tag on https://hub.docker.com/r/langflowai/langflow
+    pull_policy: always                   # set to 'always' when using 'latest' image
+    ports:
+      - "7860:7860"
     depends_on:
       - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
+      # This variable defines where the logs, file storage, monitor data, and secret keys are stored.
+      - LANGFLOW_CONFIG_DIR=app/langflow
+    volumes:
+      - langflow-data:/app/langflow
 
   postgres:
-    image: postgres:15
+    image: postgres:16
     environment:
-      - POSTGRES_USER=user
-      - POSTGRES_PASSWORD=password
-      - POSTGRES_DB=langflow
+      POSTGRES_USER: langflow
+      POSTGRES_PASSWORD: langflow
+      POSTGRES_DB: langflow
+    ports:
+      - "5432:5432"
+    volumes:
+      - langflow-postgres:/var/lib/postgresql/data
+
+volumes:
+  langflow-postgres:    # Persistent volume for PostgreSQL data
+  langflow-data:        # Persistent volume for Langflow data
+```
+
+:::note
+Docker Compose creates an isolated network for all services defined in the docker-compose.yml file. This ensures that the services can communicate with each other using their service names as hostnames, for example, `postgres` in the database URL. If you were to run PostgreSQL separately using `docker run`, it would be in a different network and Langflow wouldn't be able to connect to it using the service name.
+:::
+
+## Deploy multiple Langflow instances with a shared database
+
+To configure multiple Langflow instances that share the same PostgreSQL database, modify your `docker-compose.yml` file to include multiple Langflow services.
+
+Use environment variables for more centralized configuration management:
+
+1. Update your `.env` file with values for your PostgreSQL database:
+```text
+POSTGRES_USER=langflow
+POSTGRES_PASSWORD=your_secure_password
+POSTGRES_DB=langflow
+POSTGRES_HOST=postgres
+POSTGRES_PORT=5432
+LANGFLOW_CONFIG_DIR=app/langflow
+LANGFLOW_PORT_1=7860
+LANGFLOW_PORT_2=7861
+LANGFLOW_HOST=0.0.0.0
 ```
+2. Reference these variables in your `docker-compose.yml`:
+```yaml
+services:
+  postgres:
+    image: postgres:16
+    environment:
+      - POSTGRES_USER=${POSTGRES_USER}
+      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
+      - POSTGRES_DB=${POSTGRES_DB}
+    ports:
+      - "${POSTGRES_PORT}:5432"
+    volumes:
+      - langflow-postgres:/var/lib/postgresql/data
+
+  langflow-1:
+    image: langflowai/langflow:latest
+    pull_policy: always
+    ports:
+      - "${LANGFLOW_PORT_1}:7860"
+    depends_on:
+      - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+      - LANGFLOW_CONFIG_DIR=${LANGFLOW_CONFIG_DIR}
+      - LANGFLOW_HOST=${LANGFLOW_HOST}
+      - PORT=7860
+    volumes:
+      - langflow-data-1:/app/langflow
+
+  langflow-2:
+    image: langflowai/langflow:latest
+    pull_policy: always
+    ports:
+      - "${LANGFLOW_PORT_2}:7860"
+    depends_on:
+      - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+      - LANGFLOW_CONFIG_DIR=${LANGFLOW_CONFIG_DIR}
+      - LANGFLOW_HOST=${LANGFLOW_HOST}
+      - PORT=7860
+    volumes:
+      - langflow-data-2:/app/langflow
+
+volumes:
+  langflow-postgres:
+  langflow-data-1:
+  langflow-data-2:
+```
+
+3. Deploy the file with `docker-compose up`.
+You can access the first Langflow instance at `http://localhost:7860`, and the second Langflow instance at `http://localhost:7861`.
+
+4. To confirm both instances are using the same database, run the `docker exec` command to start `psql` in your PostgreSQL container.
+Your container name may vary.
+```bash
+docker exec -it docker-test-postgres-1 psql -U langflow -d langflow
+```
+
+5. Query the database for active connections:
+```sql
+langflow=# SELECT * FROM pg_stat_activity WHERE datname = 'langflow';
+```
+
+6. Examine the query results for multiple connections with different `client_addr` values, for example `172.21.0.3` and `172.21.0.4`.
+
+Since each Langflow instance runs in its own container on the Docker network, using different incoming IP addresses confirms that both instances are actively connected to the PostgreSQL database.
 
+7. To quit psql, type `quit`.
\ No newline at end of file
diff --git a/docs/docs/Deployment/deployment-docker.md b/docs/docs/Deployment/deployment-docker.md
index 2db0422e5567..59d938a081d9 100644
--- a/docs/docs/Deployment/deployment-docker.md
+++ b/docs/docs/Deployment/deployment-docker.md
@@ -102,7 +102,7 @@ wget https://raw.githubusercontent.com/langflow-ai/langflow-helm-charts/refs/hea
 
 3. Create a Dockerfile:
 ```dockerfile
-FROM langflowai/langflow:latest
+FROM langflowai/langflow-backend:latest
 RUN mkdir /app/flows
 COPY ./*json /app/flows/.
 ```
diff --git a/docs/docs/Deployment/deployment-kubernetes.md b/docs/docs/Deployment/deployment-kubernetes.md
index 930164ccf751..a433eb163b4c 100644
--- a/docs/docs/Deployment/deployment-kubernetes.md
+++ b/docs/docs/Deployment/deployment-kubernetes.md
@@ -184,6 +184,14 @@ The runtime chart is tailored for deploying applications in a production environ
 
 The `langflow-runtime` Helm chart is available in the [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-runtime).
 
+:::important
+By default, the [Langflow runtime Helm chart](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml#L46) enables `readOnlyRootFilesystem: true` as a security best practice. This setting prevents modifications to the container's root filesystem at runtime, which is a recommended security measure in production environments.
+
+Disabling `readOnlyRootFilesystem` reduces the security of your deployment. Only disable this setting if you understand the security implications and have implemented other security measures.
+
+For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).
+:::
+
 ### Prerequisites
 
 - A [Kubernetes](https://kubernetes.io/docs/setup/) server
diff --git a/docs/docs/Deployment/deployment-overview.md b/docs/docs/Deployment/deployment-overview.md
new file mode 100644
index 000000000000..2a7e4d0c8698
--- /dev/null
+++ b/docs/docs/Deployment/deployment-overview.md
@@ -0,0 +1,40 @@
+---
+title: Langflow deployment overview
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an [IDE](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-ide) or as a [runtime](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-runtime).
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the frontend for visual development.
+
+## Package your flow with the Langflow runtime image
+
+To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
+
+An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
+
+For more on building the Langflow docker image and pushing it to Docker Hub, see [Package your flow as a docker image](/deployment-docker#package-your-flow-as-a-docker-image).
+
+## Deploy to Kubernetes
+
+After your flow is packaged as a Docker image and available on Docker Hub, deploy your application by overriding the values in the [langflow-runtime](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/Chart.yaml) Helm chart.
+
+For more information, see [Deploy Langflow on Kubernetes](/deployment-kubernetes).
+
+
+
+
+
diff --git a/docs/sidebars.js b/docs/sidebars.js
index fd51670a9fc2..71d0371a1bfd 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -79,6 +79,7 @@ module.exports = {
         "Configuration/configuration-auto-saving",
         "Configuration/configuration-backend-only",
         "Configuration/configuration-cli",
+        "Configuration/configuration-custom-database",
         "Configuration/configuration-global-variables",
         "Configuration/environment-variables",
         "Configuration/configuration-security-best-practices"
@@ -88,11 +89,21 @@ module.exports = {
       type: "category",
       label: "Deployment",
       items: [
+        {
+          type:"doc",
+          id: "Deployment/deployment-overview",
+          label: "Deployment overview"
+        },
         {
           type: "doc",
           id: "Deployment/deployment-docker",
           label: "Docker"
         },
+        {
+          type: "doc",
+          id: "Deployment/deployment-kubernetes",
+          label: "Kubernetes"
+        },
         {
           type: "doc",
           id: "Deployment/deployment-gcp",
@@ -103,11 +114,6 @@ module.exports = {
           id: "Deployment/deployment-hugging-face-spaces",
           label: "Hugging Face Spaces"
         },
-        {
-          type: "doc",
-          id: "Deployment/deployment-kubernetes",
-          label: "Kubernetes"
-        },
         {
           type: "doc",
           id: "Deployment/deployment-railway",


Reviews:
user: login: jordanrfrazier
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-19T21:55:41Z
user: login: mendonk
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-20T20:26:32Z
user: login: mendonk
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-20T20:55:05Z
user: login: mendonk
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-20T21:11:26Z
user: login: KimberlyFields
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-24T20:07:21Z
user: login: mendonk
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T19:20:21Z
user: login: KimberlyFields
body: Left a few suggestions, but approving. 
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-27T15:26:29Z

Review comments:
diff_hunk: @@ -74,3 +74,50 @@ services:
       - POSTGRES_DB=langflow
 ```
 
+
+## Connect multiple Langflow containers to PostgreSQL
+
+When deploying multiple Langflow containers, use a single PostgreSQL database to serve multiple Langflow runtime containers with a single PostgreSQL database.
+
+To connect multiple Langflow containers to the same PostgreSQL database, all Langflow containers should use the same `LANGFLOW_DATABASE_URL`.
+
+1. Add multiple Langflow runtime images to your `docker-compose.yml` file:
+```yaml
+   services:
+     langflow-1:
+       image: langflowai/langflow-backend:latest
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://langflow:password@postgres:5432/langflow
+
+     langflow-2:
+       image: langflowai/langflow-backend:latest
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://langflow:password@postgres:5432/langflow
+```
+
+2. To manage your database credentials using environment variables, create a `.env` file with the following values.
+```text
+   POSTGRES_USER=langflow
+   POSTGRES_PASSWORD=your_secure_password
+   POSTGRES_DB=langflow
+   POSTGRES_HOST=postgres
+   POSTGRES_PORT=5432
+```
+
+3. Reference the `.env` values in your `docker-compose.yml`:
+```yaml
+   services:
+     langflow-1:
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+
+     langflow-2:
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+```
+
+4. Run `docker compose up` to deploy the containers locally.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: jordanrfrazier
body: `docker-compose up` runs services in a separate docker network. 

"""
Docker Compose creates an isolated network for all services it starts. If your PostgreSQL container was started separately (e.g., with docker run), it won’t be in that network, and langflow won’t be able to reach it using postgres.
"""

You can see that my postgres (started with a separate docker run postgres.. command) is running on `bridge` network, whereas langflow containers are on the `langflow-default` network. 
```
~/Documents/langflow/langflow (feature/watsonx_component ✗) docker network ls             
NETWORK ID     NAME               DRIVER    SCOPE
c59494122de1   bridge             bridge    local
6e32f46ac8db   host               host      local
3dfc2ce43fe3   langflow_default   bridge    local
e62963e586cc   none               null      local
~/Documents/langflow/langflow (feature/watsonx_component ✗) docker inspect postgres-container --format '{{json .NetworkSettings.Networks}}' | jq
{
  "bridge": {
    "IPAMConfig": null,
    "Links": null,
    "Aliases": null,
    "MacAddress": "02:42:ac:11:00:02",
    "DriverOpts": null,
    "NetworkID": "c59494122de11549dc9c5feaaf6580d480ec7406c2077991ee0b7798ad847010",
    "EndpointID": "4e749aaba532e316772105c74404afaf636810c968b12c73f81196c6b60e9e16",
    "Gateway": "172.17.0.1",
    "IPAddress": "172.17.0.2",
    "IPPrefixLen": 16,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "DNSNames": null
  }
}
```


All this to say, maybe we should include the postgres service within this example docker-compose yaml? Something like (chatgpt generated, may need touchups):
```
services:
  postgres:
    image: postgres
    restart: always
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: mysecretpassword
      POSTGRES_DB: langflow
    ports:
      - "5432:5432"
  
  langflow:
    image: your-langflow-image
    depends_on:
      - postgres
    environment:
      DATABASE_URL: postgresql://postgres:mysecretpassword@postgres:5432/langflow
```
created_at: 2025-03-19T21:44:08Z
author_association: COLLABORATOR
diff_hunk: @@ -74,3 +74,50 @@ services:
       - POSTGRES_DB=langflow
 ```
 
+
+## Connect multiple Langflow containers to PostgreSQL
+
+When deploying multiple Langflow containers, use a single PostgreSQL database to serve multiple Langflow runtime containers with a single PostgreSQL database.
+
+To connect multiple Langflow containers to the same PostgreSQL database, all Langflow containers should use the same `LANGFLOW_DATABASE_URL`.
+
+1. Add multiple Langflow runtime images to your `docker-compose.yml` file:
+```yaml
+   services:
+     langflow-1:
+       image: langflowai/langflow-backend:latest
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://langflow:password@postgres:5432/langflow
+
+     langflow-2:
+       image: langflowai/langflow-backend:latest
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://langflow:password@postgres:5432/langflow
+```
+
+2. To manage your database credentials using environment variables, create a `.env` file with the following values.
+```text
+   POSTGRES_USER=langflow
+   POSTGRES_PASSWORD=your_secure_password
+   POSTGRES_DB=langflow
+   POSTGRES_HOST=postgres
+   POSTGRES_PORT=5432
+```
+
+3. Reference the `.env` values in your `docker-compose.yml`:
+```yaml
+   services:
+     langflow-1:
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+
+     langflow-2:
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+```
+
+4. Run `docker compose up` to deploy the containers locally.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: jordanrfrazier
body: ```
services:
  postgres:
    image: postgres:latest
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=mysecretpassword
      - POSTGRES_DB=postgres
    ports:
      - "5432:5432"

  langflow-1:
    image: langflowai/langflow-backend:latest
    depends_on:
      - postgres
    environment:
      - LANGFLOW_DATABASE_URL=postgresql://postgres:mysecretpassword@postgres:5432/postgres
    ports:
      - "7860:7860"  # Expose Langflow-1 on port 7860

  langflow-2:
    image: langflowai/langflow-backend:latest
    depends_on:
      - postgres
    environment:
      - LANGFLOW_DATABASE_URL=postgresql://postgres:mysecretpassword@postgres:5432/postgres
    ports:
      - "7861:7860"  # Expose Langflow-2 on port 7861

```
created_at: 2025-03-19T21:51:22Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,70 @@
+---
+title: Langflow deployment concepts
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an **IDE** or as a **runtime**.
path: docs/docs/Deployment/deployment-overview.md
user: login: jordanrfrazier
body: should this link to the helm chart repo too?
created_at: 2025-03-19T21:53:42Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,70 @@
+---
+title: Langflow deployment concepts
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an **IDE** or as a **runtime**.
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the front-end for visual development.
+
+## Package your flow with the Langflow runtime image
+
+To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
+
+For example, if you have your flow stored in a directory like this:
+
+```text
+LANGFLOW-APPLICATION/
+├── flows/
+│   ├── flow1.json
+│   └── flow2.json
+├── Dockerfile
+```
+
+Include the `COPY` command in your Dockerfile:
+
+```dockerfile
+FROM langflowai/langflow-backend
+RUN mkdir -p /app/flows
+COPY ./flows/*.json /app/flows/
+```
+
+An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
+
+For a step-by-step example, see Build Applications in Langflow in the Platform guide.
path: docs/docs/Deployment/deployment-overview.md
user: login: jordanrfrazier
body: does this need a link?
created_at: 2025-03-19T21:53:55Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,70 @@
+---
+title: Langflow deployment concepts
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an **IDE** or as a **runtime**.
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the front-end for visual development.
+
+## Package your flow with the Langflow runtime image
+
+To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
+
+For example, if you have your flow stored in a directory like this:
+
+```text
+LANGFLOW-APPLICATION/
+├── flows/
+│   ├── flow1.json
+│   └── flow2.json
+├── Dockerfile
+```
+
+Include the `COPY` command in your Dockerfile:
+
+```dockerfile
+FROM langflowai/langflow-backend
+RUN mkdir -p /app/flows
+COPY ./flows/*.json /app/flows/
+```
+
+An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
+
+For a step-by-step example, see Build Applications in Langflow in the Platform guide.
+
+For more on building the Langflow docker image and pushing it to Docker Hub, see [Package your flow as a docker image](/deployment-docker#package-your-flow-as-a-docker-image).
+
+## Deploy to Kubernetes
+
+Override the values in the [langflow-runtime](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/Chart.yaml) Helm chart to deploy the application.
+
+```text
+helm repo add langflow https://langflow-ai.github.io/langflow-helm-charts
+helm repo update
+helm install langflow-runtime langflow/langflow-runtime \
+    --set "image.repository=myuser/langflow-hello-world" \
+    --set "image.tag=1.0.0"\
+```
+
+For more information, refer to [Deploy Langflow on Kubernetes](/deployment-kubernetes).
+
+For more detailed information about database configuration, see [Configure an external PostgreSQL database](/configuration-custom-database).
path: docs/docs/Deployment/deployment-overview.md
user: login: jordanrfrazier
body: I know people have had issues with the helm charts sometimes due to the security constraints, especially with 
https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml#L46. I'm not sure we should recommend disabling it, but maybe a footnote or something in the FAQs or known issues when deploying page. 
created_at: 2025-03-19T21:55:37Z
author_association: COLLABORATOR
diff_hunk: @@ -74,3 +74,50 @@ services:
       - POSTGRES_DB=langflow
 ```
 
+
+## Connect multiple Langflow containers to PostgreSQL
+
+When deploying multiple Langflow containers, use a single PostgreSQL database to serve multiple Langflow runtime containers with a single PostgreSQL database.
+
+To connect multiple Langflow containers to the same PostgreSQL database, all Langflow containers should use the same `LANGFLOW_DATABASE_URL`.
+
+1. Add multiple Langflow runtime images to your `docker-compose.yml` file:
+```yaml
+   services:
+     langflow-1:
+       image: langflowai/langflow-backend:latest
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://langflow:password@postgres:5432/langflow
+
+     langflow-2:
+       image: langflowai/langflow-backend:latest
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://langflow:password@postgres:5432/langflow
+```
+
+2. To manage your database credentials using environment variables, create a `.env` file with the following values.
+```text
+   POSTGRES_USER=langflow
+   POSTGRES_PASSWORD=your_secure_password
+   POSTGRES_DB=langflow
+   POSTGRES_HOST=postgres
+   POSTGRES_PORT=5432
+```
+
+3. Reference the `.env` values in your `docker-compose.yml`:
+```yaml
+   services:
+     langflow-1:
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+
+     langflow-2:
+       environment:
+         - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+```
+
+4. Run `docker compose up` to deploy the containers locally.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: mendonk
body: Thanks Jordan, here's the outcome for the new file in the doc:
<img width="1038" alt="Screenshot 2025-03-20 at 4 25 45 PM" src="https://github.com/user-attachments/assets/2d4c61cf-a529-44ec-ba05-7b9b7a8be851" />

created_at: 2025-03-20T20:26:32Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,70 @@
+---
+title: Langflow deployment concepts
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an **IDE** or as a **runtime**.
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the front-end for visual development.
+
+## Package your flow with the Langflow runtime image
+
+To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
+
+For example, if you have your flow stored in a directory like this:
+
+```text
+LANGFLOW-APPLICATION/
+├── flows/
+│   ├── flow1.json
+│   └── flow2.json
+├── Dockerfile
+```
+
+Include the `COPY` command in your Dockerfile:
+
+```dockerfile
+FROM langflowai/langflow-backend
+RUN mkdir -p /app/flows
+COPY ./flows/*.json /app/flows/
+```
+
+An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
+
+For a step-by-step example, see Build Applications in Langflow in the Platform guide.
path: docs/docs/Deployment/deployment-overview.md
user: login: mendonk
body: The page isn't deployed yet so it will error out
Removed for now
created_at: 2025-03-20T20:55:05Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,70 @@
+---
+title: Langflow deployment concepts
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an **IDE** or as a **runtime**.
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the front-end for visual development.
+
+## Package your flow with the Langflow runtime image
+
+To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
+
+For example, if you have your flow stored in a directory like this:
+
+```text
+LANGFLOW-APPLICATION/
+├── flows/
+│   ├── flow1.json
+│   └── flow2.json
+├── Dockerfile
+```
+
+Include the `COPY` command in your Dockerfile:
+
+```dockerfile
+FROM langflowai/langflow-backend
+RUN mkdir -p /app/flows
+COPY ./flows/*.json /app/flows/
+```
+
+An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
+
+For a step-by-step example, see Build Applications in Langflow in the Platform guide.
+
+For more on building the Langflow docker image and pushing it to Docker Hub, see [Package your flow as a docker image](/deployment-docker#package-your-flow-as-a-docker-image).
+
+## Deploy to Kubernetes
+
+Override the values in the [langflow-runtime](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/Chart.yaml) Helm chart to deploy the application.
+
+```text
+helm repo add langflow https://langflow-ai.github.io/langflow-helm-charts
+helm repo update
+helm install langflow-runtime langflow/langflow-runtime \
+    --set "image.repository=myuser/langflow-hello-world" \
+    --set "image.tag=1.0.0"\
+```
+
+For more information, refer to [Deploy Langflow on Kubernetes](/deployment-kubernetes).
+
+For more detailed information about database configuration, see [Configure an external PostgreSQL database](/configuration-custom-database).
path: docs/docs/Deployment/deployment-overview.md
user: login: mendonk
body: [Added note in deployment-kubernetes](https://github.com/langflow-ai/langflow/pull/7108/files#diff-a5c1f787e0b0363b21942b6f08c960974031952f1e4f07538f5b9d07892356c0R187)
created_at: 2025-03-20T21:11:26Z
author_association: COLLABORATOR
diff_hunk: @@ -16,13 +16,11 @@ To connect Langflow to PostgreSQL, follow these steps.
 
 1. Find your PostgreSQL database's connection string.
 It looks like `postgresql://user:password@host:port/dbname`.
-For example, if you started PostgreSQL with this Docker command:
 
-```
-docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
-```
-
-Your connection string would be `postgresql://some-postgres:mysecretpassword@localhost:5432/postgres`.
+The hostname in your connection string will depend on how you're running PostgreSQL.
+- If you're running PostgreSQL directly on your machine, use `localhost`.
+- If you're running PostgreSQL in Docker Compose, use the service name (e.g., `postgres`).
path: docs/docs/Configuration/configuration-custom-database.md
user: login: KimberlyFields
body: ```suggestion
- If you're running PostgreSQL in Docker Compose, use the service name, such as `postgres`.
```
created_at: 2025-03-24T19:13:41Z
author_association: COLLABORATOR
diff_hunk: @@ -42,35 +40,146 @@ Replace the value for `LANGFLOW_DATABASE_URL` with your PostgreSQL connection st
 
 4. Run Langflow with the `.env` file:
 ```bash
-langflow run --env-file .env
+uv run langflow run --env-file .env
 ```
 
 5. In Langflow, create traffic by running a flow.
 6. Inspect your PostgreSQL deployment's tables and activity.
-You will see new tables and traffic created.
+New tables and traffic are created.
 
 ## Example Langflow and PostgreSQL docker-compose.yml
 
-The Langflow project includes a [`docker-compose.yml`](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file  for quick deployment with PostgreSQL.
+The Langflow project includes a [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file for quick deployment with PostgreSQL.
 
-This configuration launches Langflow and PostgreSQL containers, with Langflow pre-configured to use the PostgreSQL database. Customize the database credentials as needed.
+This configuration launches Langflow and PostgreSQL containers in the same Docker network, ensuring proper connectivity between services. It also sets up persistent volumes for both Langflow and PostgreSQL data.
 
 To start the services, navigate to the `/docker_example` directory, and then run `docker-compose up`.
 
 ```yaml
 services:
   langflow:
-    image: langflow-ai/langflow:latest
-    environment:
-      - LANGFLOW_DATABASE_URL=postgresql://user:password@postgres:5432/langflow
+    image: langflowai/langflow:latest    # or another version tag on https://hub.docker.com/r/langflowai/langflow
+    pull_policy: always                   # set to 'always' when using 'latest' image
+    ports:
+      - "7860:7860"
     depends_on:
       - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
+      # This variable defines where the logs, file storage, monitor data and secret keys are stored.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: KimberlyFields
body: Use the Oxford comma. 
created_at: 2025-03-24T19:14:11Z
author_association: COLLABORATOR
diff_hunk: @@ -42,35 +40,146 @@ Replace the value for `LANGFLOW_DATABASE_URL` with your PostgreSQL connection st
 
 4. Run Langflow with the `.env` file:
 ```bash
-langflow run --env-file .env
+uv run langflow run --env-file .env
 ```
 
 5. In Langflow, create traffic by running a flow.
 6. Inspect your PostgreSQL deployment's tables and activity.
-You will see new tables and traffic created.
+New tables and traffic are created.
 
 ## Example Langflow and PostgreSQL docker-compose.yml
 
-The Langflow project includes a [`docker-compose.yml`](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file  for quick deployment with PostgreSQL.
+The Langflow project includes a [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file for quick deployment with PostgreSQL.
 
-This configuration launches Langflow and PostgreSQL containers, with Langflow pre-configured to use the PostgreSQL database. Customize the database credentials as needed.
+This configuration launches Langflow and PostgreSQL containers in the same Docker network, ensuring proper connectivity between services. It also sets up persistent volumes for both Langflow and PostgreSQL data.
 
 To start the services, navigate to the `/docker_example` directory, and then run `docker-compose up`.
 
 ```yaml
 services:
   langflow:
-    image: langflow-ai/langflow:latest
-    environment:
-      - LANGFLOW_DATABASE_URL=postgresql://user:password@postgres:5432/langflow
+    image: langflowai/langflow:latest    # or another version tag on https://hub.docker.com/r/langflowai/langflow
+    pull_policy: always                   # set to 'always' when using 'latest' image
+    ports:
+      - "7860:7860"
     depends_on:
       - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
+      # This variable defines where the logs, file storage, monitor data and secret keys are stored.
+      - LANGFLOW_CONFIG_DIR=app/langflow
+    volumes:
+      - langflow-data:/app/langflow
+
+  postgres:
+    image: postgres:16
+    environment:
+      POSTGRES_USER: langflow
+      POSTGRES_PASSWORD: langflow
+      POSTGRES_DB: langflow
+    ports:
+      - "5432:5432"
+    volumes:
+      - langflow-postgres:/var/lib/postgresql/data
+
+volumes:
+  langflow-postgres:    # Persistent volume for PostgreSQL data
+  langflow-data:        # Persistent volume for Langflow data
+```
 
+:::note
+Docker Compose creates an isolated network for all services defined in the docker-compose.yml file. This ensures that the services can communicate with each other using their service names as hostnames (for example, `postgres` in the database URL). If you were to run PostgreSQL separately using `docker run`, it would be in a different network and Langflow wouldn't be able to connect to it using the service name.
+:::
+
+## Deploy multiple Langflow instances with a shared database
+
+To configure multiple Langflow instances that share the same PostgreSQL database, modify your `docker-compose.yml` file to include multiple Langflow services.
+
+Use environment variables for better configuration management:
+
+1. Update your `.env` file with values for your PostgreSQL database:
+```text
+POSTGRES_USER=langflow
+POSTGRES_PASSWORD=your_secure_password
+POSTGRES_DB=langflow
+POSTGRES_HOST=postgres
+POSTGRES_PORT=5432
+LANGFLOW_CONFIG_DIR=app/langflow
+LANGFLOW_PORT_1=7860
+LANGFLOW_PORT_2=7861
+LANGFLOW_HOST=0.0.0.0
+```
+
+2. Reference these variables in your `docker-compose.yml`:
+```yaml
+services:
   postgres:
-    image: postgres:15
+    image: postgres:16
     environment:
-      - POSTGRES_USER=user
-      - POSTGRES_PASSWORD=password
-      - POSTGRES_DB=langflow
+      - POSTGRES_USER=${POSTGRES_USER}
+      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
+      - POSTGRES_DB=${POSTGRES_DB}
+    ports:
+      - "${POSTGRES_PORT}:5432"
+    volumes:
+      - langflow-postgres:/var/lib/postgresql/data
+
+  langflow-1:
+    image: langflowai/langflow:latest
+    pull_policy: always
+    ports:
+      - "${LANGFLOW_PORT_1}:7860"
+    depends_on:
+      - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+      - LANGFLOW_CONFIG_DIR=${LANGFLOW_CONFIG_DIR}
+      - LANGFLOW_HOST=${LANGFLOW_HOST}
+      - PORT=7860
+    volumes:
+      - langflow-data-1:/app/langflow
+
+  langflow-2:
+    image: langflowai/langflow:latest
+    pull_policy: always
+    ports:
+      - "${LANGFLOW_PORT_2}:7860"
+    depends_on:
+      - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
+      - LANGFLOW_CONFIG_DIR=${LANGFLOW_CONFIG_DIR}
+      - LANGFLOW_HOST=${LANGFLOW_HOST}
+      - PORT=7860
+    volumes:
+      - langflow-data-2:/app/langflow
+
+volumes:
+  langflow-postgres:
+  langflow-data-1:
+  langflow-data-2:
+```
+
+3. Deploy the file with `docker-compose up`.
+You can access the first Langflow instance at `http://localhost:7860`, and the second Langflow instance at `http://localhost:7861`.
+
+4. To confirm both instances are using the same database, run the `docker exec` command to start `psql` in your PostgreSQL container.
+Your container name may vary.
+```bash
+docker exec -it docker-test-postgres-1 psql -U langflow -d langflow
+```
+
+5. Query the database for active connections:
+```sql
+langflow=# SELECT * FROM pg_stat_activity WHERE datname = 'langflow';
 ```
 
+6. Examine the query results for multiple connections with different `client_addr` values, for example `172.21.0.3` and `172.21.0.4`.
+
+Since each Langflow instance runs in its own container on the Docker network, different incoming IP addresses confirms that both instances are actively connected to the PostgreSQL database.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: KimberlyFields
body: ```suggestion
Since each Langflow instance runs in its own container on the Docker network, using different incoming IP addresses confirms that both instances are actively connected to the PostgreSQL database.
```
created_at: 2025-03-24T19:16:33Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,68 @@
+---
+title: Langflow deployment concepts
path: docs/docs/Deployment/deployment-overview.md
user: login: KimberlyFields
body: I'm not sure of the purpose of this topic. It's called "concepts", but it includes some content that's almost procedural. As a user, why would I read this and what would I get out of it?
created_at: 2025-03-24T20:06:29Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,68 @@
+---
+title: Langflow deployment concepts
path: docs/docs/Deployment/deployment-overview.md
user: login: mendonk
body: I have renamed the page Deployment Overview and removed the specifics, so it's an overview of deployment options with the specifics offloaded to the Docker and Kubernetes pages.
created_at: 2025-03-25T19:20:21Z
author_association: COLLABORATOR
diff_hunk: @@ -16,13 +16,11 @@ To connect Langflow to PostgreSQL, follow these steps.
 
 1. Find your PostgreSQL database's connection string.
 It looks like `postgresql://user:password@host:port/dbname`.
-For example, if you started PostgreSQL with this Docker command:
 
-```
-docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
-```
-
-Your connection string would be `postgresql://some-postgres:mysecretpassword@localhost:5432/postgres`.
+The hostname in your connection string will depend on how you're running PostgreSQL.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: KimberlyFields
body: Avoid future tense. Replace "will depend" with "depends".
created_at: 2025-03-27T15:21:48Z
author_association: COLLABORATOR
diff_hunk: @@ -42,35 +40,141 @@ Replace the value for `LANGFLOW_DATABASE_URL` with your PostgreSQL connection st
 
 4. Run Langflow with the `.env` file:
 ```bash
-langflow run --env-file .env
+uv run langflow run --env-file .env
 ```
 
 5. In Langflow, create traffic by running a flow.
 6. Inspect your PostgreSQL deployment's tables and activity.
-You will see new tables and traffic created.
+New tables and traffic are created.
 
 ## Example Langflow and PostgreSQL docker-compose.yml
 
-The Langflow project includes a [`docker-compose.yml`](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file  for quick deployment with PostgreSQL.
+The Langflow project includes a [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file for quick deployment with PostgreSQL.
 
-This configuration launches Langflow and PostgreSQL containers, with Langflow pre-configured to use the PostgreSQL database. Customize the database credentials as needed.
+This configuration launches Langflow and PostgreSQL containers in the same Docker network, ensuring proper connectivity between services. It also sets up persistent volumes for both Langflow and PostgreSQL data.
 
 To start the services, navigate to the `/docker_example` directory, and then run `docker-compose up`.
 
 ```yaml
 services:
   langflow:
-    image: langflow-ai/langflow:latest
-    environment:
-      - LANGFLOW_DATABASE_URL=postgresql://user:password@postgres:5432/langflow
+    image: langflowai/langflow:latest    # or another version tag on https://hub.docker.com/r/langflowai/langflow
+    pull_policy: always                   # set to 'always' when using 'latest' image
+    ports:
+      - "7860:7860"
     depends_on:
       - postgres
+    environment:
+      - LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
+      # This variable defines where the logs, file storage, monitor data, and secret keys are stored.
+      - LANGFLOW_CONFIG_DIR=app/langflow
+    volumes:
+      - langflow-data:/app/langflow
 
   postgres:
-    image: postgres:15
+    image: postgres:16
     environment:
-      - POSTGRES_USER=user
-      - POSTGRES_PASSWORD=password
-      - POSTGRES_DB=langflow
+      POSTGRES_USER: langflow
+      POSTGRES_PASSWORD: langflow
+      POSTGRES_DB: langflow
+    ports:
+      - "5432:5432"
+    volumes:
+      - langflow-postgres:/var/lib/postgresql/data
+
+volumes:
+  langflow-postgres:    # Persistent volume for PostgreSQL data
+  langflow-data:        # Persistent volume for Langflow data
+```
+
+:::note
+Docker Compose creates an isolated network for all services defined in the docker-compose.yml file. This ensures that the services can communicate with each other using their service names as hostnames (for example, `postgres` in the database URL). If you were to run PostgreSQL separately using `docker run`, it would be in a different network and Langflow wouldn't be able to connect to it using the service name.
path: docs/docs/Configuration/configuration-custom-database.md
user: login: KimberlyFields
body: ```suggestion
Docker Compose creates an isolated network for all services defined in the docker-compose.yml file. This ensures that the services can communicate with each other using their service names as hostnames, for example, `postgres` in the database URL. If you were to run PostgreSQL separately using `docker run`, it would be in a different network and Langflow wouldn't be able to connect to it using the service name.
```
created_at: 2025-03-27T15:22:52Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,40 @@
+---
+title: Langflow deployment overview
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an [IDE](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-ide) or as a [runtime](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-runtime).
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the front-end for visual development.
path: docs/docs/Deployment/deployment-overview.md
user: login: KimberlyFields
body: Per the Google style guide, use "frontend" instead of "front-end".
created_at: 2025-03-27T15:25:37Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,40 @@
+---
+title: Langflow deployment overview
+slug: /deployment-overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+You have a flow, and want to share it with the world in a production environment.
+
+This page outlines the journey from locally-run flow to a cloud-hosted production server.
+
+More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
+
+## Langflow deployment architecture
+
+Langflow can be deployed as an [IDE](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-ide) or as a [runtime](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-runtime).
+
+The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
+
+The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the front-end for visual development.
+
+## Package your flow with the Langflow runtime image
+
+To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
+
+An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
+
+For more on building the Langflow docker image and pushing it to Docker Hub, see [Package your flow as a docker image](/deployment-docker#package-your-flow-as-a-docker-image).
+
+## Deploy to Kubernetes
+
+After your flow is packaged as a Docker image and available on Docker Hub, deploy your application by overriding the values in the [langflow-runtime](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/Chart.yaml) Helm chart.
+
+For more information, refer to [Deploy Langflow on Kubernetes](/deployment-kubernetes).
path: docs/docs/Deployment/deployment-overview.md
user: login: KimberlyFields
body: ```suggestion
For more information, see [Deploy Langflow on Kubernetes](/deployment-kubernetes).
```
created_at: 2025-03-27T15:26:12Z
author_association: COLLABORATOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-03-17T19:10:28Z
body: Build failure! :x:
> yarn run v1.22.22 $ docusaurus build [INFO] [en] Creating an optimized production build... [info] [webpackbar] Compiling Client [info] [webpackbar] Compiling Server [Code Hike warning] plain is not a valid language, no syntax highlighting will be applied. [Code Hike warning] result is not a valid language, no syntax highlighting will be applied. [Code Hike warning] curl is not a valid language, no syntax highlighting will be applied. [Code Hike warning] plaintext is not a valid language, no syntax highlighting will be applied. [Code Hike warning] env is not a valid language, no syntax highlighting will be applied. [success] [webpackbar] Server: Compiled successfully in 1.04m [success] [webpackbar] Client: Compiled successfully in 1.63m [ERROR] Error: Unable to build website for locale en. at tryToBuildLocale (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:78:15) at async /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9 ... 4 lines matching cause stack trace ... at async file:///home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 { [cause]: Error: Docusaurus found broken links! Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist. Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass. Exhaustive list of all broken links found: - Broken link on source page path = /langflow-drafts/docs-deployment-overview/deployment-overview: -> linking to /langflow-drafts/docs-deployment-overview/platform-build-application at throwError (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/logger/lib/logger.js:80:11) at reportBrokenLinks (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/server/brokenLinks.js:250:47) at handleBrokenLinks (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/server/brokenLinks.js:282:5) at executeBrokenLinksCheck (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:91:47) at /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:70:67 at Object.async (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/logger/lib/perfLogger.js:42:47) at buildLocale (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:70:31) at async runBuildLocaleTask (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:93:5) at async /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:74:13 at async tryToBuildLocale (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:70:9) at async /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9 at async mapAsyncSequential (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24) at async Command.build (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:33:5) at async Promise.all (index 0) at async runCLI (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/cli.js:56:5) at async file:///home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 } [INFO] Docusaurus version: 3.7.0 Node version: v18.20.7 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-17T19:13:06Z
body: Build failure! :x:
> yarn run v1.22.22 $ docusaurus build [INFO] [en] Creating an optimized production build... [info] [webpackbar] Compiling Client [info] [webpackbar] Compiling Server [Code Hike warning] plain is not a valid language, no syntax highlighting will be applied. [Code Hike warning] result is not a valid language, no syntax highlighting will be applied. [Code Hike warning] curl is not a valid language, no syntax highlighting will be applied. [Code Hike warning] plaintext is not a valid language, no syntax highlighting will be applied. [Code Hike warning] env is not a valid language, no syntax highlighting will be applied. [success] [webpackbar] Server: Compiled successfully in 56.29s [success] [webpackbar] Client: Compiled successfully in 1.47m [ERROR] Error: Unable to build website for locale en. at tryToBuildLocale (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:78:15) at async /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9 ... 4 lines matching cause stack trace ... at async file:///home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 { [cause]: Error: Docusaurus found broken links! Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist. Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass. Exhaustive list of all broken links found: - Broken link on source page path = /langflow-drafts/docs-deployment-overview/deployment-overview: -> linking to /langflow-drafts/docs-deployment-overview/platform-build-application at throwError (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/logger/lib/logger.js:80:11) at reportBrokenLinks (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/server/brokenLinks.js:250:47) at handleBrokenLinks (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/server/brokenLinks.js:282:5) at executeBrokenLinksCheck (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:91:47) at /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:70:67 at Object.async (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/logger/lib/perfLogger.js:42:47) at buildLocale (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:70:31) at async runBuildLocaleTask (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:93:5) at async /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:74:13 at async tryToBuildLocale (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:70:9) at async /home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9 at async mapAsyncSequential (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24) at async Command.build (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/build/build.js:33:5) at async Promise.all (index 0) at async runCLI (/home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/lib/commands/cli.js:56:5) at async file:///home/runner/work/langflow/langflow/docs/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 } [INFO] Docusaurus version: 3.7.0 Node version: v18.20.7 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-17T19:15:57Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-20T20:54:31Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-20T21:07:10Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-25T18:53:08Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-25T18:56:51Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-25T19:19:29Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-25T19:29:47Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-27T19:48:16Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-27T20:37:52Z
body: Build successful! :white_check_mark:
Deploying docs draft.
Deploy successful! [View draft](https://d5rxiv0do0q3v.cloudfront.net/langflow-drafts/docs-deployment-overview/index.html)
author_association: CONTRIBUTOR