Langflow v1 AI Agent Builder
Langflow is an open-source visual builder for AI agents, RAG pipelines and MCP servers. This template runs Langflow 1.12.5 with Postgres, Redis and a persistent volume, with generated admin credentials and two Gunicorn workers.
What you get
- langflowai/langflow 1.12.5 serving the editor, REST API and MCP endpoints on port 7860
- Postgres 18 for flows, users, messages and encrypted variables instead of SQLite
- Redis 8.2 as the shared build and job queue and for rate-limit counters, so multiple workers stay consistent
- A volume at /app/langflow for uploaded files, knowledge bases and logs
- A generated admin password and encryption key; new sign-ups stay inactive until an admin activates them
Good for
- Prototyping LLM agents with tools such as web search and APIs without writing a backend
- Building retrieval-augmented chat over your documents and exposing it as an API
- Publishing flows as MCP servers for Claude Desktop, Cursor and other MCP clients
- Giving a team a shared, login-protected workspace for AI workflows
Services in this template
- Redis · image
redis:8.2 - Langflow · image
langflowai/langflow:1.12.5 - Postgres · image
ghcr.io/railwayapp-templates/postgres-ssl:18
Questions people ask
How do I log in?
Open the public URL and sign in as admin with LANGFLOW_SUPERUSER_PASSWORD from the Langflow service variables. The first deploy can take a few minutes while migrations and starter projects load.
Where do I put model provider keys?
Under Settings, Global Variables. They are encrypted with LANGFLOW_SECRET_KEY, which you must never change after the first boot.
How do I add more workers?
Raise LANGFLOW_WORKERS, about one per vCPU at roughly 0.6 to 1 GB RAM each according to the template notes, and give the service more resources. Keep LANGFLOW_WORKERS times the pool size and max overflow below about 90 database connections.
Can I embed the chat widget on my site?
Yes. Add each website origin that embeds Langflow to LANGFLOW_CORS_ORIGINS. For a custom domain, also update LANGFLOW_CORS_ORIGINS and LANGFLOW_MCP_BASE_URL.
How do I upgrade?
Back up Postgres, change the image tag on the Langflow service and redeploy; Langflow migrates the database on start. Do not roll back to an older version against a migrated database without restoring the backup. The NOTICE file lists Langflow as MIT licensed.
Full template README
Deploy and Host Langflow with Railway
Langflow is an open-source visual builder for AI agents, RAG pipelines and MCP servers. You connect components on a canvas, test them in a playground and serve every flow as an API or MCP tool. This community template runs a pinned Langflow release with Postgres, Redis and persistent storage.
About Hosting Langflow
Langflow is a Python application that serves its editor, REST API and MCP endpoints from one process. For a team deployment it needs a real database instead of SQLite, a persistent configuration directory for uploaded files, knowledge bases and logs, a stable encryption key for stored credentials, and a login-protected admin account. Running more than one worker also requires a shared job queue, otherwise editor builds can land on the wrong worker. This template provides all of that on Railway: Postgres for flows and users, Redis for the job queue and rate limits, a volume for the config directory, and generated admin credentials.
Common Use Cases
- Prototype and ship LLM agents with tools (web search, APIs, code) without writing a backend
- Build retrieval-augmented chat over your documents and expose it as an API
- Publish flows as MCP servers for Claude Desktop, Cursor and other MCP clients
- Give a team a shared, login-protected workspace for AI workflows and prompt experiments
- Embed a chat widget backed by a Langflow flow in your website or internal tools
Dependencies for Langflow Hosting
- Langflow (
langflowai/langflow, default image profile) - PostgreSQL 15 or newer (Railway Postgres 18)
- Redis (job queue and rate-limit storage for multiple workers)
- A persistent volume for
LANGFLOW_CONFIG_DIR
Deployment Dependencies
- Langflow repository: https://github.com/langflow-ai/langflow
- Deploy Langflow on Docker: https://docs.langflow.org/deployment-docker
- Choose a Langflow Docker image: https://docs.langflow.org/deployment/docker-image-profiles
- Multiple workers with Redis: https://docs.langflow.org/deployment-multi-worker
- Environment variables: https://docs.langflow.org/environment-variables
- Authentication and API keys: https://docs.langflow.org/api-keys-and-authentication
Implementation Details
| Service | Image | Role | Public |
|---|---|---|---|
| Langflow | langflowai/langflow:1.12.5 |
Editor, API, MCP server; 2 Gunicorn workers; volume at /app/langflow |
yes (port 7860) |
| Postgres | Railway Postgres 18 | Flows, users, messages, encrypted variables | no |
| Redis | Railway Redis 8.2 | Shared build/job queue (DB 1) and rate-limit counters (DB 2) | no |
First login
- Wait for the first deploy to pass its healthcheck (
/health_check); migrations and starter projects can take a few minutes. - Open the public URL and sign in as
adminwith the password in the Langflow service variableLANGFLOW_SUPERUSER_PASSWORD. - Add your model provider keys under Settings → Global Variables. They are encrypted with
LANGFLOW_SECRET_KEY; never change that key after first boot. - New users who sign up stay inactive until an admin activates them (
LANGFLOW_NEW_USER_IS_ACTIVE=false).
Scaling workers: raise LANGFLOW_WORKERS (about one per vCPU, 0.6–1 GB RAM each) and give the service more resources. Redis keeps builds consistent across workers. Keep LANGFLOW_WORKERS × (pool_size + max_overflow) from LANGFLOW_DB_CONNECTION_SETTINGS below about 90 connections.
Embedding the chat widget: add each website origin that embeds Langflow to LANGFLOW_CORS_ORIGINS (comma-separated).
Custom domain: add it to the Langflow service, then update LANGFLOW_CORS_ORIGINS and LANGFLOW_MCP_BASE_URL to the new origin.
Pinning and upgrading: the image is pinned to 1.12.5. To upgrade, back up Postgres, change the tag on the Langflow service and redeploy; Langflow migrates the database on start. Do not roll back to an older version against a migrated database without restoring the backup. To change the component inventory, switch between langflowai/langflow:base-{ver}, langflowai/langflow:{ver} and langflowai/langflow-all:{ver}.
Why Deploy Langflow on Railway?
Railway gives Langflow a public HTTPS URL, managed Postgres and Redis on a private network, and a persistent volume in a single project, so your flows, files and credentials survive redeploys. Scaling is a matter of raising workers and resources, and upgrades are a tag change with one-click rollback. This is a community template and is not affiliated with the Langflow project or its maintainers.
Guides for this template
View Langflow v1 AI Agent Builder on railway.com
Similar templates
| Template | Category | DeploymentsDeploys |
|---|---|---|
| 9Router Self-hosted AI router for Claude, Gemini, Cursor & OpenAI tools. | AI/ML | 9,734 |
| flowise-railway Flowise - low-code LLM apps builder | AI/ML | 8,512 |
| LibreChat Open-source ChatGPT clone: multi-model, agents, search, multi-user auth | AI/ML | 6,762 |
| Hermes Agent by Nous Research Template for Hermes Agent by Nous Research | AI/ML | 6,413 |
| OpenClaw [Homebrew support] The AI that actually does things | AI/ML | 5,167 |
| Hermes Agent Self Host Hermes Agent. Autonomous AI agent w/ self-improving, tools & more | AI/ML | 4,092 |