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
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
Open the create form
Choose PostgreSQL
Name and place it
langflow-db, choose the Data center where Langflow will run, and choose the Size. This guide was tested on DB1.Create it
Create the application
Choose the image
langflowai/langflow:1.13.0 in Docker image. Keep the Registry credential at None (public image).Name, place and size it
langflow, choose the database’s Data center, and choose the Size M1.Create it without deploying
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
Open the database's networking
langflow-db. Click the Networking tab.Add the connection
langflow Application.Keep only the URL
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.Save
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: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.Open the web process
Turn on the probe
/health_check, the Initial delay 10 and the Timeout 5. Keep the Port at 8080.Save
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 theANTHROPIC_API_KEY global variable.
Verify the deployment
-
On the Deployments tab, the deployment’s status is Deployed. With the API, Get deployment (
getDeploymentV3) returns"status": "success". -
The health check answers once Langflow can reach PostgreSQL:
-
The version endpoint answers without signing in:
-
Open the domain. Langflow shows Sign in to Langflow. Sign in with
LANGFLOW_SUPERUSERandLANGFLOW_SUPERUSER_PASSWORD.
Build a flow with Claude
Start from a template
Choose the model
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.Try it
/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 thex-api-key header. A key has the permissions of the user who created it.
Create an API key
storefront, click Create API Key, and copy the key: Langflow shows it once.Run the flow
.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.
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:
Create the disk
/app/data, pick the Size 10 GB, and click Create disk.Deploy
Upgrade Langflow
- Read the release notes of every version between yours and the new one on Langflow’s GitHub releases.
- Back up
langflow-db: on its Backups tab, create a manual backup. See Backups. - On the application’s Settings tab, in the Source section, click Update source, change the tag in Docker image, and click Update source.
- Deploy. Langflow migrates the database when the new version starts.
Add a custom domain
To serve Langflow from your own domain, such asflows.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 inANTHROPIC_API_KEY. curl,jq,opensslandpython3.
Choose the location and sizes
listClustersV3), List process resource types (listProcessResourceTypesV3) and List database resource types (listDatabaseResourceTypesV3). Pick the location by its region ID, here Frankfurt:sevalla resources clusters, sevalla resources process-types and sevalla resources db-types. MCP: get_platform_options.Create the database
createDatabaseV3). The API doesn’t return the password later, so generate it here: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.Wait for the database
getDatabaseV3) until status is ready, then read the internal hostname:sevalla databases get $DB_ID. MCP: get_database.Create the application
createApplicationV3) with the Docker image source. It doesn’t start a deployment: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.Size the web process and add the readiness probe
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: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.Connect the database
createApplicationInternalConnectionV3). Unlike the dashboard, it adds no variables: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.Add the environment variables
createEnvironmentVariableV3), once per variable. Store the secret key and the password somewhere safe before you send them: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.Deploy
triggerDeploymentV3):sevalla apps deployments trigger $APP_ID. MCP: trigger_deployment.Wait for the 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: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.Check Langflow
sevalla apps logs runtime $APP_ID --search ERROR shows start errors. MCP: search_runtime_logs.https://$APP_HOST and build the flow.