---
title: Deploy Langflow with AI on Blossom
url: "/deploy/langflow/"
canonical_url: https://blossom88.com/deploy/langflow/
markdown_url: https://blossom88.com/deploy/langflow.md
summary: Deploy Langflow with AI on Blossom. Build visual AI flows with managed PostgreSQL,
  saved credentials, and an authenticated run API.
categories:
- deployment
- ai
stack:
- Python
- FastAPI
- React
- TypeScript
- PostgreSQL
---

# Deploy Langflow with AI on Blossom

[Langflow](https://www.langflow.org/) is a visual builder for AI applications.
Connect prompts, models, and other components into a flow, try it in the
Playground, and call it from your application through an API.

## Ask Your Agent

> **Ask your AI agent:** Deploy Langflow on Blossom with managed Postgres. Help me build a flow I can call from my app.
>
> Follow this guide: https://blossom88.com/deploy/langflow/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Your AI Flow Setup

| Part | Purpose |
|---|---|
| Langflow Service | Visual editor, Playground, and flow execution |
| Managed PostgreSQL | Flows, credentials, API keys, and message history |
| Your model provider | Generates responses |

Bring your model provider's API key; the provider runs the model, so no GPU is
needed. Keep the editor behind Blossom Account access and native sign-in.
This recipe runs one text-flow execution instance.

![Langflow showing a saved AI flow with chat input, prompt, model, and output.](/deploy/assets/images/langflow/flow.png)

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Enable the chosen model in your account's model settings. Allow only this
flow's `/api/v1/run/<flow-id>` route for external clients; it still requires
a native Langflow API key.

Upstream requirements: [deployment requirements](https://docs.langflow.org/deployment-docker).

Keep the editor behind **Blossom Account access** and require native Langflow
sign-in. Configure a strong initial administrator password, turn automatic
login off, and disable public registration. Keep the encryption and signing
settings stable through updates.

[Source code](https://github.com/langflow-ai/langflow).

Create a prebuilt-image Environment, then create and link PostgreSQL:

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom database_instance:create --data postgres.yml --follow
    blossom environment_link:create --data database-link.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom service:create --data langflow-service.yml
    blossom environment:deploy --id environment-100 --follow

Export the linked `DATABASE_URL` as `LANGFLOW_DATABASE_URL` at startup. Use the
supported production startup command, listen on port `7860`, and use `/healthz`
for readiness. It checks application services and storage readiness; `/health`
can respond before the application is fully ready.

Set `LANGFLOW_AUTO_LOGIN=false`, `LANGFLOW_ENABLE_SIGNUP=false`, and private
administrator credentials. Generate `LANGFLOW_SECRET_KEY` in the format the
selected release requires. A URL-safe base64 encoding of 32 random bytes is
Fernet-compatible. Preserve it rather than generating it each time the
Container starts. Keep a stable cache signing key too.

Use database-backed API keys and credential storage. With flows, settings,
and secrets saved outside the Container, its local configuration directory
can be recreated at startup. This guide uses text inputs; add durable storage
before enabling file-upload or local vector components.

Example request, using your private API key through an environment variable:

    curl "$LANGFLOW_URL/api/v1/run/$FLOW_ID" \
      -H "x-api-key: $LANGFLOW_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{"input_value":"Hello","input_type":"chat","output_type":"chat"}'

</details>

## Build and Run a Flow

Connect chat input, a prompt, a model and chat output. Store the provider key
as a Credential global variable. Save the flow, try the Playground and call
its endpoint with a Langflow API key. Open only the intended flow route to
external clients.

<details class="optional-reading" markdown="1">
<summary>Updates and storage</summary>

Keep PostgreSQL and the application secrets. After replacement, sign in again
and run the saved flow with the same API key. Check that the stored credential
works and the earlier messages remain.

This guide tests one execution instance. Review Langflow's shared storage,
cache, and worker requirements before adding replicas or background features.

</details>

## What You Get

- A private visual editor for AI flows
- Saved flows, credentials, and history in managed PostgreSQL
- An authenticated flow endpoint for your application
- A flow that remains usable after Container replacement
