Langflow Self-Hosted

IntermediateAi Agents

Self-hosted Langflow: a shared visual agent builder for your team, with every flow served as an API endpoint and an MCP tool from your own server.

Published 12 October 2026 · Last updated 12 October 2026

Core Tools
Docker
Docker
Langflow
Langflow
Database
PostgreSQL
SQLite
Hosting
Hetzner
Hostinger
DigitalOcean
Railway
Render
+1
Reverse Proxy
Traefik
Caddy
NGINX
Self-Hosted PaaS
Coolify
Dokploy

About Langflow Self-Hosted

Langflow is a visual builder for AI agents and retrieval pipelines: components for models, prompts, tools, vector stores, and memory are wired together on a canvas, tested in a playground, and served as API endpoints and MCP tools. There is no first-party hosted Langflow. DataStax removed its managed version in 2026, so the MIT-licensed project is the product, and a team that wants a shared workspace runs its own server. Self-hosting also keeps the flows, the provider keys stored in Langflow, and every message that passes through them on infrastructure you administer, and it adds no per-run fee: the cost is the server plus what the model providers bill.

The official Docker Compose file runs two services: Langflow on port 7860, serving the visual editor and the API from one process, and PostgreSQL 16 for flows, users, API keys, and message history. Without a database URL Langflow falls back to SQLite in its config directory, which suits one person trying it, not a team. That config directory is the other thing to keep: it holds logs, uploaded files, and, unless you set one, the generated secret key that encrypts the credentials stored in Langflow. The docs put the floor at a dual-core CPU and 2 GB of RAM and recommend 4 GB, so with PostgreSQL beside it a 4 GB server is the practical size. Running more than one worker needs Redis as a shared job queue, an optional addition the Compose file doesn't include.

Port 7860 carries the editor, the API, and the MCP endpoints, so it is the one port to publish. Put a reverse proxy with TLS in front of it, or install Langflow from a self-hosted PaaS template that brings its own proxy, and close the PostgreSQL port that the Compose file publishes on every interface with the password "langflow". The official image keeps automatic login off and refuses to start without a superuser password, and API calls need a Langflow API key, but the default CORS policy accepts requests from any website, so set the allowed origins before the address goes public. A tunnel is the alternative when nothing on the server may accept inbound traffic.

Models, vector stores, and tracing are components, not services the stack runs. Each flow names its own model provider and key, so the server needs no model to start, and a flow moves from a hosted model to one served on your own hardware by swapping a component. Vector stores work the same way: a flow can keep embeddings in the core PostgreSQL through pgvector, once the database image includes that extension, or in a dedicated vector database. Tracing to an external tool takes a few environment variables, and all of these are optional.

Key Features

  • ✓Langflow in Docker from the official Compose file, with a database for flows, users, and message history: PostgreSQL by default, SQLite for a trial
  • ✓The visual editor and the API on one port, with every flow callable as an API endpoint
  • ✓Each project exposed as an MCP server, so other agents and editors can call flows as tools
  • ✓Components for hosted model providers, local runtimes, and vector stores, chosen per flow
  • ✓Authentication on in the official image: a required superuser password and Langflow API keys
  • ✓MIT-licensed, with no paid edition and no limits on flows or runs

When to Use Langflow Self-Hosted

  • →A shared workspace where a team builds and tests agents and RAG flows on one server
  • →Serving agent flows as internal API endpoints that applications call
  • →Exposing flows as MCP tools for coding agents and other MCP clients
  • →Keeping prompts, documents, and stored provider keys on infrastructure you control
  • →Running flows against local models next to hosted ones, for privacy or cost

Pros

  • MIT-licensed and complete: nothing is held back for a paid tier
  • A small footprint for a team tool: one container and a database
  • Flows become API endpoints and MCP tools with no extra service
  • Model, vector store, and tracing are chosen per flow, not fixed per server

Cons

  • No managed option, so updates, backups, and uptime are yours
  • The Compose file publishes PostgreSQL with a default password, so it needs hardening before it faces the internet
  • More than one worker needs Redis as a job queue, which the Compose file does not include
  • Releases come often and components change between them, so pin a version and test existing flows before each upgrade

Database Options for Langflow Self-Hosted

PostgreSQL

Langflow Self-Hosted with PostgreSQL

The default and what the official Compose file runs, as PostgreSQL 16. It holds flows, users, API keys, message history, and the provider credentials saved as global variables, encrypted with the secret key, and it is what Langflow's production guidance asks for. The same server can hold a flow's embeddings through the PGVector component, but the Compose file's image doesn't include the pgvector extension, so switch to an image that ships it before relying on that.

SQLite

Langflow Self-Hosted with SQLite

Langflow's default when no database URL is set: a file in the config directory, with nothing else to run. It suits one person trying flows on a small server. Langflow's production guidance asks for PostgreSQL instead, and moving later means exporting the flows as JSON and importing them on the new instance, then recreating users, API keys, and global variables. Keep the config directory on a volume, or the database goes with the container.

These are highlighted picks. To see all the tools, check the Databases category.

Hosting Options for Langflow Self-Hosted

Hetzner

Deploy Langflow Self-Hosted on Hetzner

The default. A shared-vCPU server with 2 vCPUs and 4 GB of RAM costs about €19 a month, which meets Langflow's 4 GB recommendation with PostgreSQL beside it. This is the route Langflow's remote-server guide describes: Docker, the Compose file with a real database password and a fixed secret key, and Caddy or NGINX in front of port 7860. Hourly billing makes it cheap to move up a plan when flows that load large documents need more memory, or when Redis and a second worker join.

Hostinger

Deploy Langflow Self-Hosted on Hostinger

The budget entry. The KVM 2 plan has 2 vCPUs, 8 GB of RAM, and 100 GB of NVMe at $8.99 a month on a two-year term, $14.99 at the standard rate, which is double Langflow's recommended memory and leaves room for Redis and more workers later. The cheaper KVM 1 has a single vCPU, below Langflow's dual-core minimum. Root access is full and the panel adds weekly backups, while TLS, upgrades, and closing the database port stay your job.

DigitalOcean

Deploy Langflow Self-Hosted on DigitalOcean

Per-second billing and snapshots from the panel. The 4 GB Basic Droplet with 2 vCPUs is $24 a month and matches Langflow's recommendation. Managed PostgreSQL can take the database off the server later, which also removes the published database port, though the flows and the stored keys then live on DigitalOcean's database service rather than your server. A snapshot before each upgrade makes a failed database migration easy to roll back.

Railway

Deploy Langflow Self-Hosted on Railway

A container platform with an official Langflow guide: the template deploys Langflow beside a PostgreSQL service on Railway's private network, with a volume for the config directory and TLS on the platform's domain, so the reverse proxy or PaaS choice doesn't apply. Langflow needs 2 GB of RAM, and memory is billed at about $10 per GB a month on top of the $5 Hobby plan, so a running instance with its database costs roughly $25 or more a month, above a VPS of the same size. Set the superuser password and a secret key in the variables before the first deploy.

Render

Deploy Langflow Self-Hosted on Render

A container platform with a Deploy to Render button in Langflow's docs. The guide says Langflow's 2 GB of RAM means the Standard instance or larger, $25 a month, so the free instance is out. The blueprint keeps SQLite on a persistent disk rather than PostgreSQL, and builds the image from the repository's main branch rather than a release, so point LANGFLOW_DATABASE_URL at a Render Postgres database, from about $6 a month plus storage, and pin a released version before a team relies on it. TLS ends at the platform, so the reverse proxy or PaaS choice doesn't apply.

Google Cloud Platform

Deploy Langflow Self-Hosted on Google Cloud Platform

Langflow's Google Cloud guide starts from a Cloud Shell button that creates a Compute Engine VM with the Langflow package and NGINX, on a spot instance to keep the cost down. A spot VM can be reclaimed at any time, and the guide itself says to use a regular VM for stable use, so switch before a team depends on it: a general-purpose machine with 2 vCPUs and 4 GB runs roughly $25 to $40 a month left on. Cloud SQL for PostgreSQL can hold the database. It fits when the applications calling the flows already run in Google Cloud.

These are highlighted picks. To see all the tools, check the Hosting & Cloud category.

Reverse Proxy Options for Langflow Self-Hosted

Traefik

Langflow Self-Hosted with Traefik

The family default: it discovers the Langflow container from Docker labels and renews certificates itself, and one router for port 7860 covers the editor, the API, and the MCP endpoints. Raise the response timeouts, because streamed agent answers and the MCP server's streamable HTTP and SSE connections stay open a long time, and a proxy that cuts them breaks the playground and MCP clients. Close the PostgreSQL port mapping before publishing anything.

Caddy

Langflow Self-Hosted with Caddy

The proxy in Langflow's own remote-server guide, which runs Langflow and Caddy together with Docker Compose: one site block forwards to port 7860, and Caddy obtains and renews the certificate. It passes streamed responses through as they arrive, which suits the playground and MCP clients. Once it serves HTTPS, set LANGFLOW_ACCESS_SECURE and LANGFLOW_REFRESH_SECURE so Langflow marks its login cookies as secure.

NGINX

Langflow Self-Hosted with NGINX

Langflow documents NGINX with Let's Encrypt for an install without Docker, and the same configuration works in front of the container. Turn proxy_buffering off so streamed answers and MCP events aren't held back, raise proxy_read_timeout past the 60-second default for long agent runs, raise client_max_body_size if people upload documents into flows, and forward the Host and Upgrade headers.

Self-Hosted PaaS Options for Langflow Self-Hosted

Coolify

Langflow Self-Hosted with Coolify

A free, self-hosted deploy platform with a Langflow template in its service library. The template runs Langflow beside a PostgreSQL 18 container, keeps automatic login off, generates the superuser name and password, and health-checks the service. It pins Langflow 1.7.2, many releases behind the current one, so change the image tag before the first start. It also sets the config directory as a relative path while the volume mounts at /app/langflow, so point it at the volume and set LANGFLOW_SECRET_KEY yourself. Coolify's own proxy handles the domain and TLS.

Dokploy

Langflow Self-Hosted with Dokploy

Free and self-hosted, with a Langflow template that runs the latest image beside PostgreSQL 16 and serves it on your domain with HTTPS, with automatic login and new-user activation off. Two values in the template file are the same for every install: the secret key that encrypts stored credentials, and the superuser login, [email protected] with the password changepassword. Replace both before the first start, and pin a version tag instead of latest. Domains and TLS come with the platform, so no separate reverse proxy is added next to it.

Langflow Self-Hosted Add-ons

Each addition below extends this stack with a capability the base stack works fine without. None are required: include the ones your product actually needs when building this stack, and skip the rest.

AI

3

Models, agents, and the pieces around them: retrieval, sandboxes, and model access.

Vector Database Add-ons

Add a vector database when the agent needs to find documents, notes, or past conversations by meaning instead of exact keywords.

Qdrant
Langflow Self-Hosted with Qdrant

The Qdrant component reads and writes collections by URL and API key, so a flow can ingest documents and search them with metadata filters. Run Qdrant as one more container on the same server, or use Qdrant Cloud's free cluster; either way the search load moves off the PostgreSQL database that holds Langflow's own data. Add it when a collection outgrows pgvector on the core database, or when filtering and ranking need tuning.

Pinecone
Langflow Self-Hosted with Pinecone

Fully managed and serverless: the Pinecone component needs an API key and an index name, and there is nothing to run next to Langflow. A fit for a large document collection, or when nobody on the team wants to tune a vector index. The Starter plan is free for small indexes. The embeddings and document text leave your server, which matters if keeping data in-house was the reason to self-host Langflow.

Chroma
Langflow Self-Hosted with Chroma

The lightest start: the Chroma component can write to a persist directory inside Langflow's container, with no extra service at all, or connect to a Chroma server by host and port. A local directory has to sit on the mounted config volume, or the collection disappears when the container is recreated, and only one Langflow worker should write to it. Move to a Chroma server once more than one worker or instance reads the same collection.

Model Inference Add-ons

Add model inference when you want an open-weight model in the mix: on your own hardware for privacy, or on a hosted inference provider for speed and low per-token prices.

Ollama
Langflow Self-Hosted with Ollama

Langflow's Ollama component points a flow at an Ollama server by base URL, port 11434 by default, and lists the models it has pulled. Inside the Langflow container, localhost is the container itself, so use the host's address or run Ollama as another service in the same Compose project. A model that chats well is not always good at tool calls, so test an agent flow's tools on the model you pick. A local model needs far more memory than Langflow's 4 GB, or a graphics card, so plan a larger server or a separate machine for it.

LM Studio
Langflow Self-Hosted with LM Studio

The LM Studio component connects to LM Studio's local server, an OpenAI-compatible API on port 1234 by default. LM Studio is a desktop app, so this fits a Langflow instance on the same workstation, or one that can reach that machine over a private network, more than a server in a data centre. It is a convenient way to compare models in a graphical model browser before settling on one for a server runtime.

These are highlighted picks. To see all the tools, check the AI Runtime & Serving category.

Model Aggregator Add-ons

Add a model aggregator when you want one API key and one bill for models from many providers, with automatic fallback when one of them is down, instead of setting up each provider separately.

OpenRouter
Langflow Self-Hosted with OpenRouter

The OpenRouter component gives flows one key and one prepaid balance for hundreds of hosted models, which helps when different flows want different providers and you would rather not store a key for each in Langflow. Models are billed at the providers' prices, with a 5.5% fee when you buy credits, and your own provider keys can be added to route through your accounts.

LiteLLM
Langflow Self-Hosted with LiteLLM

A gateway you host between Langflow and the providers: flows call one OpenAI-compatible address, and the gateway holds the provider keys, enforces budgets and rate limits per key, and falls back between providers. Langflow has a LiteLLM component, and any OpenAI-compatible model component works with the gateway's base URL. It is a separate service with its own PostgreSQL, so it suits a team that already runs shared infrastructure; LiteLLM Self-Hosted is a stack of its own.

These are highlighted picks. To see all the tools, check the AI Model Aggregators category.

Under the hood (backend)

1

Services your users never see, which store data and keep the app fast and reliable.

Queue Broker Add-ons

Add a queue broker when one process stops keeping up: it lets a service hand work to separate workers and scale execution past a single instance.

Redis
Langflow Self-Hosted with Redis

Langflow runs one worker by default. Set more than one and it refuses to start without a Redis job queue, because the editor and the playground stream build events that the next request may pick up on a different worker. With LANGFLOW_JOB_QUEUE_TYPE set to redis and the queue URL, the events go to Redis Streams and any worker can serve them. Run Redis as a container in the same Compose project; it holds job state, not your flows, which stay in the database.

Hosting and networking

1

Where the service runs and how it is reached: on your own web address, or privately over a tunnel.

Tunnel Add-ons

Add a tunnel when you're self-hosting without a static IP or can't open inbound ports — a home server, a VPS behind restrictive network policies, or anywhere a reverse proxy alone can't reach the internet.

Cloudflare Tunnel
Langflow Self-Hosted with Cloudflare Tunnel

A public HTTPS address through an outbound-only connection, so applications elsewhere can call flows while no inbound port is open on the server. Free, with Cloudflare Access in front if the editor should sit behind your company login. Point it at port 7860 only, never at the database port. A request that gets no answer within about 125 seconds fails with a 524, and non-Enterprise plans can't raise that, so stream long agent runs. A stable hostname needs a domain on Cloudflare.

ngrok
Langflow Self-Hosted with ngrok

The route Langflow's own docs describe for sharing a local server: one command gives port 7860 a public HTTPS address with no domain needed, which suits showing a flow to someone or testing a webhook. The free plan includes three endpoints, 1 GB of transfer, 20,000 requests, and an interstitial page on browser visits, so it is a trial route, not the address applications rely on. Paid plans start at $10 a month.

Monitoring and analytics

1

For you rather than your users: what people do in the app, what breaks, and why a model answered the way it did.

LLM Observability Add-ons

Add LLM observability when you want to see every model call, tool call, and token cost inside a run, so a wrong answer can be traced to the step that caused it.

Langfuse
Langflow Self-Hosted with Langfuse

Langflow sends a trace of every flow run to Langfuse once three environment variables are set: the public key, the secret key, and LANGFUSE_BASE_URL for your own server or the cloud region. Each run shows its components, model calls, latency, and cost, which is how you find the step that sent an agent wrong. Langfuse is open source and can run on your own infrastructure, with Langfuse Self-Hosted as a stack of its own, or on the cloud's free Hobby plan.

LangSmith
Langflow Self-Hosted with LangSmith

LangChain's tracing platform, switched on with LANGSMITH_TRACING, an API key, a project name, and the endpoint. Many Langflow components are built on LangChain, so runs arrive with their chains and tool calls in the shape LangSmith is designed around. It is a hosted, closed-source service with self-hosting limited to Enterprise, so traces with prompts leave your server; the free Developer plan covers one seat and 5,000 traces a month.

Frequently Asked Questions about Langflow Self-Hosted

Is there a managed Langflow, or do I have to self-host it?

There is no first-party managed Langflow. DataStax ran a hosted version inside its Astra platform and removed it on 9 April 2026, pointing users to the open-source release. Langflow Desktop, a free app for macOS and Windows, is the no-server way to use it, but it runs on one person's computer and isn't a shared workspace. One-click templates on Railway and Render still deploy an instance in your own account that you configure and upgrade. So self-hosting is how a team uses Langflow, not a cost-saving alternative to a plan. What it buys: flows, stored provider keys, and conversations stay on infrastructure you administer, and nothing is charged per run. What it costs: you run a server, a database, and the upgrades.

What size server does Langflow need?

Langflow's installation docs give a dual-core CPU and 2 GB of RAM as the minimum and a multi-core CPU with at least 4 GB as the recommendation. That covers Langflow itself; with PostgreSQL on the same host, as the Compose file runs it, a 4 GB server is the practical size for a small team. For serving flows in production on Kubernetes, the docs size each headless runtime instance at 1 CPU and 2 GB, with three replicas. Memory climbs with flows that load large documents or keep many conversations in flight, and a local model is a separate and much larger requirement. Disk has no official floor: it grows with uploaded files, logs, and message history.

Where does state live, and what needs backing up?

Two places. PostgreSQL holds the flows, users, API keys, message history, and the provider credentials saved as global variables. The config directory on the Langflow volume holds logs, uploaded files, and the secret key Langflow generates when you don't set one. That key encrypts the stored credentials, so a restored database without it holds keys nobody can read: set LANGFLOW_SECRET_KEY explicitly and keep it next to the backups, not inside them. Langflow ships a script that re-encrypts everything under a new key when you rotate it. Back up with pg_dump on a schedule, snapshot the volume, and export important flows as JSON into version control. Redis, when added, holds job state only.

How do upgrades work, and is anything behind a paid tier?

Nothing is held back: Langflow is MIT-licensed with no paid edition, so every component, the API, and MCP serving are in the free image. Upgrades are the part that needs care. The official Compose file uses the latest tag with pull_policy set to always, so a restart can pull a new release you didn't plan for; pin a version tag instead. Database migrations run when Langflow starts, so back up PostgreSQL first, and components change between releases, so open the important flows and run them before moving the team over. Recent official images also changed defaults, turning automatic login off, which is why older guides that skip the superuser password no longer start.

Langflow or Dify for a self-hosted AI builder?

Both are open-source visual builders for agents and RAG pipelines, and both self-host with Docker. The difference is what comes out at the end. A Langflow flow is a part of something else: an API endpoint or an MCP tool that your own application or a coding agent calls, and a missing integration becomes a custom component written in Python. Dify publishes finished apps, a chat web app or an embeddable widget, and manages knowledge bases with their own ingestion and retrieval settings, so people who don't write code can build and ship an assistant themselves. The weight differs too: Langflow is one container and a database with a 2 GB floor, while Dify's bundle starts about fifteen containers on a 4 GB floor. Langflow's MIT license comes with no conditions, while Dify's license rules out multi-tenant hosting for outside customers. Dify Self-Hosted is a stack of its own.

Scores

Popularity4/5

One of the most widely adopted open-source agent builders, with a very large GitHub following and guides on several hosting platforms. Self-hosting is the only way to run it for a team, so many installs follow this shape, though it is a builder's tool more than a household name.

Learning Curve3/5

The canvas is approachable, and a first flow takes minutes. Running it for a team adds the usual self-hosting work and a few product-specific steps: a superuser password, a fixed secret key, CORS origins, secure cookies behind TLS, and a closed database port, plus Redis once there is more than one worker.

Flexibility5/5

Any model provider, local runtime, vector store, or tracing tool is a component chosen per flow, custom components are plain Python, and flows are served as API endpoints and MCP tools. The deployment bends too: Compose on a VPS, a deploy platform, a container PaaS, or Kubernetes.

Performance3/5

One Python process serves the editor and the API, and the default single worker is enough for a small team. Heavier use means more workers with a Redis job queue, or separate headless runtime instances on Kubernetes, and flow speed is mostly set by the model calls inside it.

Portability5/5

MIT-licensed on Docker and PostgreSQL, flows export as JSON, and the API and MCP interfaces are standard. Moving between a VPS, a deploy platform, and Kubernetes is configuration, and no vendor service sits underneath.

Tools in the Langflow Self-Hosted Stack

DevOps & CI/CD

Agentic AI

Database (choose one)

Hosting (choose one)

Reverse Proxy or PaaS (choose one)

Reverse Proxy

Self-Hosted PaaS

Add-ons (optional — add any, or none)
AI

Vector Database

Model Inference

Model Aggregator

Under the hood (backend)

Queue Broker

Hosting and networking

Tunnel

Monitoring and analytics

LLM Observability

Langflow Self-Hosted Pricing

From ~$9/mo Free to start

The software is free and MIT-licensed, so the fixed cost is a server: Langflow recommends 4 GB of RAM, and with PostgreSQL beside it a 4 GB server is the practical size, from about $9 a month on a long-term VPS plan. The variable cost is model usage, billed by each provider through the keys your flows use. There is no paid edition and no per-run fee.

Server (VPS or cloud)$9–40/mo

Langflow needs a dual-core CPU and 2 GB of RAM and recommends 4 GB, so with PostgreSQL on the same host a 4 GB server is the practical size: $8.99 a month for an 8 GB plan at Hostinger on a two-year term, about €19 for 4 GB at Hetzner, $24 at DigitalOcean, and $25 for Render's 2 GB instance before its database. More workers mean more memory and a Redis container.

LangflowFree (MIT)

The editor, the API, MCP serving, and every component are MIT-licensed. There is no paid edition and no hosted plan.

Model providersPay per token

Each flow calls a provider with its own key, billed at that provider's prices. A local model through Ollama or LM Studio costs only the hardware it runs on.

ExposureFree

The reverse proxies, deploy platforms, and tunnels here are free, open-source software or free tiers, and TLS certificates come from Let's Encrypt.

Langflow Self-Hosted System Requirements

source
CPU
Dual-core minimum; multi-core recommended
RAM
2 GB minimum, 4 GB recommended
Disk
No official floor; the database, uploaded files, and logs grow with use
OS
Any Linux with Docker for the Compose path; Python 3.10 to 3.14 for the package install

Quoted from Langflow's installation page: a dual-core CPU and 2 GB of RAM minimum, a multi-core CPU and at least 4 GB recommended. Langflow's Kubernetes best-practices page sizes the headless runtime at 2Gi and 1 CPU per instance with three replicas for production, and the development deployment at 512Mi and 0.3 CPU for the frontend plus 1Gi and 0.5 CPU for the backend. The 4 GB server named in the stack's copy is an estimate for Langflow plus PostgreSQL on one host, not a vendor figure.