Deploy Langflow · Quick Start
Visual builder for AI agents and RAG. Postgres, login required
Just deployed
/var/lib/postgresql/data
langflow
Just deployed
/app/langflow
Deploy and Host Langflow on Railway
Langflow is an open-source (MIT) visual builder for AI agents, RAG pipelines and LLM workflows. You drag components onto a canvas (models, prompts, tools, vector stores, MCP servers), test them in the playground, and serve every flow as an API endpoint or MCP tool. It works with OpenAI, Anthropic, Google, Ollama, OpenRouter and most other model providers.
About Hosting Langflow
This template deploys the latest official Langflow image with Railway Postgres. Unlike a default Langflow install, it is locked down from the first request:
- Login required. Auto-login is off. The admin account is created from
LANGFLOW_SUPERUSERand a randomly generatedLANGFLOW_SUPERUSER_PASSWORD(see the langflow service's Variables tab). There is no shared default password. - Sign-ups need approval. New accounts are created inactive and can't log in until the admin activates them under Admin Page.
- Postgres, not SQLite. Flows, users, API keys and message history live in Railway Postgres over the private network, so they survive redeploys and upgrades.
- Encrypted credentials.
LANGFLOW_SECRET_KEYis generated per deploy and encrypts the API keys you save in Langflow. - Persistent config. Langflow's config directory (cache, uploaded files, logs) is on a Railway volume at
/app/langflow.
Getting started
- Deploy, then wait for the langflow service to turn green (the first boot takes a minute or two).
- Open the langflow service's public URL.
- Log in as
adminwith theLANGFLOW_SUPERUSER_PASSWORDvalue from the Variables tab. - Create a flow from a starter template, open Settings → Global Variables and add your model provider key (for example
OPENAI_API_KEY). - Run the flow in the playground. Then use Share → API access to call it from your app, or Settings → Langflow API Keys to create a key for the
x-api-keyheader.
To invite teammates, have them sign up and then activate their accounts from the Admin Page.
Common Use Cases
- AI agents with tools, memory and MCP servers, built visually and served as APIs
- RAG chatbots over your documents with any vector store
- Prototyping and iterating on prompts and multi-step LLM pipelines with your team
- Exposing flows as MCP tools for Claude, Cursor and other agent clients
Dependencies for Langflow Hosting
langflowai/langflow:latest(official Langflow image)- Railway Postgres 18 (
ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume - A Railway volume at
/app/langflowfor Langflow's config directory
Deployment Dependencies
Implementation Details
Key variables on the langflow service:
| Variable | Value | Why |
|---|---|---|
LANGFLOW_AUTO_LOGIN | False | Requires a login instead of opening the editor to anyone |
LANGFLOW_SUPERUSER_PASSWORD | generated | Admin password, unique to each deploy |
LANGFLOW_NEW_USER_IS_ACTIVE | False | Sign-ups wait for admin approval |
LANGFLOW_SECRET_KEY | generated | Encrypts stored credentials; keep it unchanged |
LANGFLOW_DATABASE_URL | ${{Postgres.DATABASE_URL}} | Private-network Postgres connection |
LANGFLOW_CONFIG_DIR | /app/langflow | Config directory on the volume |
The image tracks latest, so every new deploy starts on the current Langflow release. To upgrade an existing install, redeploy the langflow service; database migrations run on boot. To hold a version, set the image tag to a specific release. Langflow needs about 1 GB of memory, and more for large flows.
Why Deploy Langflow on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Langflow on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content

