Deploy Langflow | Visual AI Workflow Builder with Postgres and a Real Volume
Self-host Langflow on Railway — flows, Postgres & files that persist.
Just deployed
/var/lib/postgresql/data
langflowai/langflow:1.11.0
Just deployed
/app/langflow
Deploy and Host Langflow on Railway
Langflow is a visual builder for LLM workflows — you assemble prompts, models, retrievers and tools on a canvas and expose the result as an API. This template deploys it with PostgreSQL, a persistent volume, and authentication switched on.
About Hosting Langflow
Langflow splits its state across two places. Flows, users and API keys go into PostgreSQL. Uploaded files, cached component metadata and the local config live on disk under the config directory. A container filesystem is wiped on every redeploy, so without a volume those disappear — and since the flows themselves survive in Postgres, the instance looks intact right up until a flow references a file that is no longer there.
Common Use Cases
- Prototyping RAG and agent pipelines without writing glue code
- Exposing a finished flow as an HTTP endpoint for another service to call
- A shared canvas where non-engineers can inspect and adjust a pipeline
Dependencies for Langflow Hosting
langflowai/langflow:1.11.0— pinned to an exact release rather thanlatest- PostgreSQL 18, provisioned here and reached over the private network
Deployment Dependencies
Implementation Details
Three things are set deliberately, and each one corresponds to a way this deployment fails otherwise.
A volume on the config directory. LANGFLOW_CONFIG_DIR points at a mounted volume, so uploaded files and cached components survive a redeploy. The existing Langflow template on Railway attaches no volume at all, and runs langflowai/langflow:latest — an unpinned tag that can change your instance during an unrelated redeploy.
Authentication on, with generated credentials. LANGFLOW_AUTO_LOGIN=false means the instance asks for a login instead of handing the canvas to anyone who finds the URL. That setting alone is not enough: without credentials Langflow refuses to start at all, and the container restart-loops with
ValueError: Username and password must be set
so LANGFLOW_SUPERUSER and a generated LANGFLOW_SUPERUSER_PASSWORD ship with it. Read the password from the service variables after deploying.
Root at runtime. The image runs as a non-root user and a freshly mounted Railway volume is owned by root, so RAILWAY_RUN_UID=0 is set — Railway's documented remedy.
After deploying, /health_check should report {"status":"ok","chat":"ok","db":"ok"}.
Getting Started
Open the generated domain and sign in as admin with the password from the service variables. Build a flow on the canvas, then use API in the flow menu to call it from your own code.
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
langflowai/langflow:1.11.0
langflowai/langflow:1.11.0