---
title: "Deploy Langflow · Quick Start"
description: "Visual builder for AI agents and RAG. Postgres, login required"
category: "AI/ML"
url: https://railway.com/deploy/langflow-quick-start
---

# Deploy Langflow · Quick Start

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

**[Deploy Langflow · Quick Start on Railway](https://railway.com/template/langflow-quick-start)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/langflow-quick-start/manifest.json

- **Creator:** withSeismic
- **Category:** AI/ML

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### langflow

- **Image:** langflowai/langflow:latest
- **Health check:** /health_check
- **Public domain:** Yes

## Documentation

# 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

- [Langflow documentation](https://docs.langflow.org/)
- [Langflow environment variables](https://docs.langflow.org/environment-variables)
- [Langflow authentication](https://docs.langflow.org/configuration-authentication)
- [Langflow on GitHub](https://github.com/langflow-ai/langflow)

### 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](https://hub.docker.com/r/langflowai/langflow/tags). 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.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/langflow-quick-start
