Skip to main content
Langflow runs on Sevalla as an application from its official Docker image, langflowai/langflow: the web process serves the visual editor and the API that runs your flows, and a Sevalla PostgreSQL database keeps users, flows, API keys and global variables. Sign-in is required, the admin account comes from environment variables, and your model provider’s API key becomes an encrypted global variable, so no secret sits in a flow.

At a glance

Environment variables

An application from a Docker image has no build, so every variable is a runtime variable. Set the environment variables explains each one.

Before you begin

  • A Sevalla company with a payment method: Langflow needs the M1 size or larger.
  • Python 3 on your computer, to generate the secret key (python3 --version).
  • An API key from your model provider. This guide uses Anthropic.

Create the database

1

Open the create form

In the sidebar, click Databases, then click Create database.
2

Choose PostgreSQL

Click PostgreSQL and choose the newest version. This guide was tested with PostgreSQL 18.
3

Name and place it

Enter the Display name langflow-db, choose the Data center where Langflow will run, and choose the Size. This guide was tested on DB1.
4

Create it

Click Create database and wait for the status Ready.

Create the application

1

Choose the image

In the sidebar, click Applications, then click Create > Application. Under Source, click Docker image and enter langflowai/langflow:1.13.0 in Docker image. Keep the Registry credential at None (public image).
2

Name, place and size it

Enter the Name langflow, choose the database’s Data center, and choose the Size M1.
3

Create it without deploying

Click Create application. The application opens with the status Not deployed yet.
The tag pins one Langflow release: 1.13.0 is the current one. The image is 785 MB to download and runs Langflow on Python 3.14 as an unprivileged user. Langflow migrates its database when a new version starts, so pin a version and upgrade on purpose.

Connect the database

1

Open the database's networking

In the sidebar, click Databases, then click langflow-db. Click the Networking tab.
2

Add the connection

Under Private networking, in Connected applications, click Add internal connection, and choose the langflow Application.
3

Keep only the URL

Turn on Add environment variables to the application. Change the key DB_URL to LANGFLOW_DATABASE_URL, and in its value change postgres:// at the start to postgresql://. Click the trash icon next to the other five variables.
4

Save

Click Add internal connection.
Langflow checks the URL with SQLAlchemy, which knows the scheme postgresql:// but not postgres://. With the URL as the dashboard writes it, Langflow stops at start with Invalid database_url provided: 'postgres://***:***@...'.

Set the environment variables

Generate the secret key on your computer, and store it in your password manager:
On the application’s Environment variables tab, click Add environment variables, paste these lines into the first key field, replace the secret key, the password and the Anthropic key with yours, and click Add environment variables:
.env

Add a readiness probe

Langflow takes about 50 seconds to start. A readiness probe keeps sending requests to the running version until the new one is ready.
1

Open the web process

Click the Processes tab, click ⋯ on the web process, then click Update process.
2

Turn on the probe

Under Health checks, turn on Readiness probe, enter the Path /health_check, the Initial delay 10 and the Timeout 5. Keep the Port at 8080.
3

Save

Click Update process.
In the tests, every request succeeded during a deployment with the probe.

Deploy Langflow

Click the Overview tab, click Deploy now, then click Deploy. The deployment pulls the image and starts the web process; there’s no build. The first start creates the tables in PostgreSQL, the admin account and the ANTHROPIC_API_KEY global variable.

Verify the deployment

  1. On the Deployments tab, the deployment’s status is Deployed. With the API, Get deployment (getDeploymentV3) returns "status": "success".
  2. The health check answers once Langflow can reach PostgreSQL:
  3. The version endpoint answers without signing in:
  4. Open the domain. Langflow shows Sign in to Langflow. Sign in with LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD.

Build a flow with Claude

1

Start from a template

Click Create first flow (New Flow once you have flows), then click Browse more… and pick Basic Prompting. The flow has a Chat Input, a Prompt Template, a Language Model and a Chat Output.
2

Choose the model

In the Language Model component, open the Language Model list and choose claude-haiku-5-5, Anthropic’s fastest and cheapest current model. The template shows the first model in the list before you choose one, but saves no model: if claude-haiku-5-5 is already shown, choose another model first, then claude-haiku-5-5.
3

Try it

Click Playground and send a message. The answer comes from Claude.
The flow’s ID is the part of the address after /flow/, for example d1b19062-7061-451b-9259-4f42f5baadce in https://langflow-x7k2m.sevalla.app/flow/d1b19062-7061-451b-9259-4f42f5baadce/folder/.... The same screen also offers to build a flow from a description. That assistant runs on claude-sonnet-5-5 with the same Anthropic key, so it spends from your account too.

Run the flow through the API

Every request that runs a flow needs a Langflow API key in the x-api-key header. A key has the permissions of the user who created it.
1

Create an API key

Click your profile icon, then Settings. Click Langflow API Keys, then Add New. Enter a name, for example storefront, click Create API Key, and copy the key: Langflow shows it once.
2

Run the flow

Send a message to the flow’s run endpoint:
The model writes the answer in its own words, so yours can differ; .outputs[0].outputs[0].results.message.sender_name is always AI, and .properties.usage in the same message holds the token counts. In the test, a run used 58 input and 186 output tokens. Without the header, the endpoint answers 403 with {"detail":"An API key must be passed as query or header"}. Add ?stream=true to the URL to receive the answer as Server-Sent Events (text/event-stream): one token event per piece of text, then an end event. Through Cloudflare and Sevalla’s proxy, the tokens of a 46-token answer arrived one by one over 1 second, the first after 0.94 s, without buffering. Store the API key in the calling application’s environment variables, never in front-end code: anyone with the key can run your flows on your model account. Set a spending limit in your model provider’s console.

Keep the secret key

LANGFLOW_SECRET_KEY must stay the same for the life of the instance.
If you change LANGFLOW_SECRET_KEY, Langflow can no longer read the global variables you created in its settings: they show no value, and the log shows API key decryption failed after retry. This may indicate a corrupted key or SECRET_KEY mismatch. Everyone is signed out. Keep a copy of the key outside Sevalla, so deleting the variable or the application doesn’t lose it.
Variables Langflow loads from environment variables, such as ANTHROPIC_API_KEY, come back at the next start. In the tests, putting the original key back made the other variables readable again.

Keep uploaded files

Flows, users, API keys and global variables are in PostgreSQL. Files you upload in Langflow (My Files, the File component) and knowledge bases are written under /app/data, the image’s home folder, which every deployment wipes: after a deployment, a file uploaded before it returns 404 with File not found. To keep them, add a disk:
1

Create the disk

On the application’s Disks tab, click Create disk. Pick the web process, enter the Path /app/data, pick the Size 10 GB, and click Create disk.
2

Deploy

Deploy the application. Langflow writes to the disk from this deployment on.
In the tests, an uploaded file was still there after the next deployment. A process with a disk runs 1 instance and stops before the new version starts (Persistent storage): during each deployment, Langflow didn’t answer for about 110 seconds.

Upgrade Langflow

  1. Read the release notes of every version between yours and the new one on Langflow’s GitHub releases.
  2. Back up langflow-db: on its Backups tab, create a manual backup. See Backups.
  3. On the application’s Settings tab, in the Source section, click Update source, change the tag in Docker image, and click Update source.
  4. Deploy. Langflow migrates the database when the new version starts.
To go back, restore the backup and set the previous tag.

Add a custom domain

To serve Langflow from your own domain, such as flows.example.com, add it on the application’s Domains tab and create the DNS records Sevalla shows; the web process must be larger than H1, which M1 is. See Custom domains.

Troubleshoot

Deploy with the API

These calls create the same deployment without the dashboard: the database, the application, the variables, the readiness probe and the first deployment. They need:
  • An API key that can create applications and databases, in SEVALLA_API_KEY, and your Anthropic key in ANTHROPIC_API_KEY.
  • curl, jq, openssl and python3.
The application comes from a public Docker image, so no Git provider needs to be connected.
1

Choose the location and sizes

List clusters (listClustersV3), List process resource types (listProcessResourceTypesV3) and List database resource types (listDatabaseResourceTypesV3). Pick the location by its region ID, here Frankfurt:
CLI: sevalla resources clusters, sevalla resources process-types and sevalla resources db-types. MCP: get_platform_options.
2

Create the database

Create database (createDatabaseV3). The API doesn’t return the password later, so generate it here:
CLI: sevalla databases create --name langflow-db --type postgresql --db-version 18 --cluster $CLUSTER_ID --resource-type $DB1 --db-name langflow --db-user langflow --db-password $DB_PASSWORD. MCP: sevalla_api_create with createDatabaseV3 and the same body.
3

Wait for the database

Get database (getDatabaseV3) until status is ready, then read the internal hostname:
CLI: sevalla databases get $DB_ID. MCP: get_database.
4

Create the application

Create application (createApplicationV3) with the Docker image source. It doesn’t start a deployment:
The last two calls are List application domains (listApplicationDomainsV3) and List processes (listProcessesV3). CLI: sevalla apps create --name langflow --cluster $CLUSTER_ID --source dockerImage --docker-image langflowai/langflow:1.13.0. MCP: create_application with deploy: false, then get_application.
5

Size the web process and add the readiness probe

Update process (updateProcessV3). The API creates the web process at S1, which is too small for Langflow. Always send timeoutSeconds: without it, the probe gets 120 seconds instead of the dashboard’s 1:
CLI: sevalla apps processes update $WEB_ID --app-id $APP_ID --resource-type $M1 (the CLI can’t set a probe). MCP: sevalla_api_update with updateProcessV3 and the same body.
6

Connect the database

Create internal connection (createApplicationInternalConnectionV3). Unlike the dashboard, it adds no variables:
CLI: sevalla apps internal-connections create $APP_ID --target-id $DB_ID --target-type database. MCP: sevalla_api_create with createApplicationInternalConnectionV3. MCP’s create_database with connect_to_application_id and env_var_name: LANGFLOW_DATABASE_URL does this step and the URL in one call, with a postgresql:// URL.
7

Add the environment variables

Create environment variable (createEnvironmentVariableV3), once per variable. Store the secret key and the password somewhere safe before you send them:
Each call prints the key it added. CLI: sevalla apps env-vars create $APP_ID --key LANGFLOW_PORT --value 8080, once per variable; the CLI makes each variable available during runtime and build, which makes no difference for an image. MCP: set_environment_variables with all of them in variables.
8

Deploy

Trigger deployment (triggerDeploymentV3):
CLI: sevalla apps deployments trigger $APP_ID. MCP: trigger_deployment.
9

Wait for the deployment

Get deployment (getDeploymentV3) until status is final (success, failed, cancelled or skipped), for up to 30 minutes; Get application deployment logs (getApplicationDeploymentLogsV3) shows why one failed:
CLI: sevalla apps deployments get $DEPLOYMENT_ID --app-id $APP_ID and sevalla apps deployments logs $DEPLOYMENT_ID --app-id $APP_ID. MCP: get_deployment and get_deployment_logs.
10

Check Langflow

The health check answers, and the admin account can sign in and create an API key with Langflow’s own API:
CLI: sevalla apps logs runtime $APP_ID --search ERROR shows start errors. MCP: search_runtime_logs.
Then sign in at https://$APP_HOST and build the flow.