Deploy Langflow
Pinned Langflow, private Postgres, volume, generated secret, /health_check.
Langflow
Just deployed
/app/langflow
Just deployed
/var/lib/postgresql/data
Deploy and Host Langflow on Railway
Visual LLM flow builder with a pinned langflowai/langflow:1.12.0 image, Railway Postgres over the private network, a volume for flows/uploads, a generated LANGFLOW_SECRET_KEY, and /health_check.
This listing replaces rotting marketplace clones that ship :latest, debug logs, a public Postgres TCP proxy, and no app volume.
About Hosting Langflow
Langflow is a RAM-heavy UI + API. This template runs one Langflow replica on port 7860 (public HTTP) and a Railway Postgres plugin that is private only (no TCP proxy). Flows and uploads live on a volume at /app/langflow (LANGFLOW_CONFIG_DIR).
Expect 2–4 GB RAM and a few minutes on first boot while the image pulls and components load. Healthcheck timeout is 300s.
Why Deploy
Use this instead of :latest clones when you want a pin, private database, persistent flows, a generated secret, and a real healthcheck.
| This template | Typical marketplace clone | |
|---|---|---|
| Image | Pinned langflowai/langflow:1.12.0 | :latest |
| Postgres | Plugin + private DATABASE_URL (*.railway.internal) | Public TCP proxy |
| App volume | /app/langflow | None (flows die on restart) |
| Secret | LANGFLOW_SECRET_KEY=${{secret()}} | Missing or static |
| Logs | info | debug |
| Healthcheck | GET /health_check | Often missing |
Common Use Cases
- One-click Langflow sandbox after Flowise EOL
- Visual LLM / RAG flow builder with Postgres-backed state
- Team playground (turn off auto-login first — see below)
Dependencies for Langflow Hosting
- Railway Postgres plugin (private
DATABASE_URL) - Volume on Langflow at
/app/langflow - Public HTTP domain on Langflow only (port 7860)
Deployment Dependencies
| Service | Image / plugin | Notes |
|---|---|---|
| Langflow | langflowai/langflow:1.12.0 | Public HTTP, volume, /health_check |
| Postgres | Railway Postgres (postgres-ssl:18) | Private network only |
No API keys are required to boot the editor. Add provider keys (OpenAI, Anthropic, …) later in the Langflow UI as global variables.
What you get
- Image:
langflowai/langflow:1.12.0(not:latest) - Database:
LANGFLOW_DATABASE_URL=${{Postgres.DATABASE_URL}}which is alreadypostgres.railway.internal(not a public TCP URL) - Volume:
/app/langflow→LANGFLOW_CONFIG_DIR(flows, file uploads, local cache). The start commandchmods the mount so Langflow can writesecret_keyand uploads.RAILWAY_RUN_UID=0is set so that chmod works on Railway volumes. - Secret:
LANGFLOW_SECRET_KEY=${{secret()}}generated on deploy - Healthcheck:
GET /health_check(300s timeout) - Logs:
LANGFLOW_LOG_LEVEL=info/LOG_LEVEL=info(not debug)
How to log in
LANGFLOW_AUTO_LOGIN=true is enabled for first-run DX. Open the public Langflow URL and you are in — no signup form.
That is convenient for a personal sandbox. For anything shared:
- Set
LANGFLOW_AUTO_LOGIN=false - Set
LANGFLOW_SUPERUSERand a strongLANGFLOW_SUPERUSER_PASSWORD - Redeploy, then sign in with that user
Keep LANGFLOW_SECRET_KEY as the generated value. Rotating it invalidates sessions.
Variables
Generated (do not paste a dummy)
| Key | Source |
|---|---|
LANGFLOW_SECRET_KEY | ${{secret()}} |
Wired for you
| Key | Value |
|---|---|
LANGFLOW_DATABASE_URL | ${{Postgres.DATABASE_URL}} (private network) |
LANGFLOW_CONFIG_DIR | /app/langflow (the volume mount) |
LANGFLOW_PORT / PORT | 7860 |
LANGFLOW_HOST | 0.0.0.0 |
LANGFLOW_AUTO_LOGIN | true |
LANGFLOW_LOG_LEVEL / LOG_LEVEL | info |
LANGFLOW_OPEN_BROWSER | false |
LANGFLOW_WORKERS | 1 |
Optional later: OPENAI_API_KEY and other provider secrets. Leave them empty here — do not bake keys into the template.
Postgres stays private. Do not add a TCP proxy on 5432 unless you know you need external psql.
Volume and ports
- Volume on Langflow:
/app/langflow(flows + uploads) - HTTP on Langflow only: port 7860
- Postgres: private
5432only
Railway Postgres already persists on its own volume.
Ops notes
- First deploy is slow: large image + component load. Wait for
/health_check200. - Do not scale Langflow replicas against this volume; one replica only.
- Disable auto-login before sharing the public URL.
- Upstream: langflow-ai/langflow · docs
Template Content
