Railway

Deploy Flowise AI Agent Builder

Flowise 3.1.3 with Postgres 17, basic auth on, flows and keys persist

Deploy Flowise AI Agent Builder

Just deployed

/root/.flowise

Just deployed

/var/lib/postgresql/data

Deploy and Host Flowise on Railway

Flowise is the open-source drag-and-drop builder for LLM applications: assemble chatflows, RAG pipelines, and multi-agent systems on a visual canvas, then serve each one as an API endpoint or embeddable chat widget. This template deploys Flowise 3.1.3 with a dedicated PostgreSQL 17 database on a persistent volume.

About Hosting Flowise

Flowise defaults to SQLite in ~/.flowise, and it stores three separate things: the flows themselves, encrypted API credentials for every provider you connect, and uploaded documents. Deployments that leave the default in place put all three on ephemeral container disk, so a redeploy silently discards every chatflow and every saved OpenAI or Anthropic key.

This template runs Flowise against PostgreSQL 17 over Railway's private network, so flows, chat history, and credentials live in a real database on a volume. FLOWISE_SECRETKEY_OVERWRITE is generated once at deploy and pinned — that key encrypts stored provider credentials, and if it changes, every saved credential becomes undecryptable. API keys and secrets are configured for database storage rather than local files, which is what keeps them consistent when the container is replaced.

A volume is also mounted at /root/.flowise for uploaded document blobs used by RAG flows. The UI is protected by basic auth with an admin username and a generated password, so the instance is not left open to the internet on first boot — a common oversight in self-hosted Flowise deployments. Telemetry is disabled.

Why Deploy Flowise 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 Flowise 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.

  • Flows survive redeploys — Postgres on a volume instead of SQLite on ephemeral disk.
  • Provider credentials keep working — the encryption key is generated once and never rotates underneath you.
  • Locked down on arrival — basic auth enabled with a generated password, not an open instance.
  • Uploads persist — a volume at /root/.flowise holds RAG document storage.
  • Current release — Flowise 3.1.3, not a stale pinned tag.

Common Use Cases

  • RAG chatbots over your own documents — ingest PDFs or a knowledge base and serve grounded answers.
  • Internal AI tools — build a support triage or research assistant without writing orchestration code.
  • Prototype to API — design a chain visually, then call it from your app as a REST endpoint.

Dependencies for Flowise Hosting

  • A PostgreSQL 17 service with a volume mounted at /var/lib/postgresql/data (included in this template).
  • A volume mounted at /root/.flowise for document storage (included in this template).
  • API keys for whichever model providers you intend to use, added from inside the Flowise UI.

Deployment Dependencies

Implementation Details

Two services on Railway's private network:

ServiceImageVolumePublic
flowiseflowiseai/flowise:3.1.3/root/.flowiseyes
postgrespostgres:17.10-trixie/var/lib/postgresql/datano

Check that the app is serving:

curl https:///api/v1/ping

Open your public domain and sign in with username admin and the generated FLOWISE_PASSWORD from the service variables. Build a chatflow on the canvas, then call it:

curl -X POST https:///api/v1/prediction/ \
  -H "Content-Type: application/json" \
  -d '{"question": "What does this document say about pricing?"}'

Change FLOWISE_PASSWORD to something of your own after the first login. Do not change FLOWISE_SECRETKEY_OVERWRITE — rotating it invalidates every stored provider credential.


Template Content

More templates in this category

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

okisdev
113
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
1
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
51