Deploy Langflow · Quick Start

Visual builder for AI agents and RAG. Postgres, login required

Deploy Langflow · Quick Start

/var/lib/postgresql/data

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_SUPERUSER and a randomly generated LANGFLOW_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_KEY is 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

  1. Deploy, then wait for the langflow service to turn green (the first boot takes a minute or two).
  2. Open the langflow service's public URL.
  3. Log in as admin with the LANGFLOW_SUPERUSER_PASSWORD value from the Variables tab.
  4. Create a flow from a starter template, open Settings → Global Variables and add your model provider key (for example OPENAI_API_KEY).
  5. 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-key header.

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/langflow for Langflow's config directory

Deployment Dependencies

Implementation Details

Key variables on the langflow service:

VariableValueWhy
LANGFLOW_AUTO_LOGINFalseRequires a login instead of opening the editor to anyone
LANGFLOW_SUPERUSER_PASSWORDgeneratedAdmin password, unique to each deploy
LANGFLOW_NEW_USER_IS_ACTIVEFalseSign-ups wait for admin approval
LANGFLOW_SECRET_KEYgeneratedEncrypts stored credentials; keep it unchanged
LANGFLOW_DATABASE_URL${{Postgres.DATABASE_URL}}Private-network Postgres connection
LANGFLOW_CONFIG_DIR/app/langflowConfig 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

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1