---
title: Deploy Langflow with AI on Blossom
url: "/deploy/langflow/"
canonical_url: https://docs.blossom88.com/deploy/langflow/
markdown_url: https://docs.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
---

# 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.

It uses Python and FastAPI with a React/TypeScript interface. PostgreSQL can
keep flows, credentials, and message history. Browse the
[source on GitHub](https://github.com/langflow-ai/langflow).

This setup runs a text-based model flow on regular App Capacity with managed
PostgreSQL. Your model provider runs the model; no local model or GPU is needed.

[Install the Blossom CLI and skill](/learn/getting-started/install/)
on your agent's machine and choose a Blossom Cloud Location when you log in.
You can also use
[Blossom BYOC (bring your own cloud)](/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Ask Your Agent

> **Ask your AI agent:** Deploy Langflow on Blossom with managed Postgres. Help me build a small AI flow and call it through its API.

> Follow this guide: https://docs.blossom88.com/deploy/langflow/



Your agent checks the current
[deployment requirements](https://docs.langflow.org/deployment-docker), chooses
a compatible maintained image with the providers your flow needs, and saves
the configuration. Supply provider credentials through a private file.

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

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.

## Build and Run a Flow

> **Ask your AI agent:** Connect a chat input, a prompt, a model, and a chat output. Save the flow and help me test its authenticated endpoint.

> Follow this guide: https://docs.blossom88.com/deploy/langflow/



Save the provider key as a **Credential** global variable and reference it from
the model component. Enable the model in your account's model settings. Choose
a small output limit for the first test and ask a question you can check.

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

Create a native Langflow API key for the client. If an external application
needs access, allow only this flow's `/api/v1/run/<flow-id>` path through
Blossom's access policy. The endpoint still requires the Langflow API key;
keep the editor and administrative routes private.

<details class="optional-reading" markdown="1">
<summary>Commands behind the deployment</summary>

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>

## Keep the Flow Through Updates

> **Ask your AI agent:** Update Langflow and check that my saved flow, credential, API key, and message history still work.

> Follow this guide: https://docs.blossom88.com/deploy/langflow/



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.

## 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
