Railway

Deploy Botpress — Self-Hosted Open-Source Chatbot Builder

Self-host Botpress: visual chatbot builder with NLU & RAG. BYO LLM.

Deploy Botpress — Self-Hosted Open-Source Chatbot Builder

Just deployed

/botpress/data

/var/lib/postgresql/data

Deploy and Host Botpress on Railway

Botpress visual chatbot builder

Botpress is the open-source chatbot platform — "the WordPress of conversational AI" — with a visual flow builder, a built-in NLU engine, RAG knowledge bases, and multi-channel connectors for web chat, Telegram, Slack, Microsoft Teams, and more. This template deploys the self-hostable open-source Botpress server with PostgreSQL and Redis, giving you full control over your bot logic, data, and infrastructure — no per-message platform fees and no vendor lock-in.

Botpress Cloud runs up to $189/month for higher tiers, and hosted chatbot SaaS bills per conversation. Self-hosted Botpress on Railway costs flat compute (~$10–20/month) plus your own LLM tokens — your conversations, knowledge bases, and user data stay on infrastructure you own.


What This Template Deploys

ServicePurpose
Botpress ServerThe open-source chatbot engine — visual flow builder, NLU, knowledge base, and admin dashboard
PostgreSQL 12+Persistent storage for bots, flows, conversations, and NLU training data
RedisSession state, caching, and message queue for the bot runtime

All services connect over Railway's private network with credentials injected automatically. Botpress needs Node.js, PostgreSQL, and Redis to run in production — this template wires all three together so you skip the multi-service setup.


About Hosting Botpress

Botpress is a Node.js platform backed by PostgreSQL and Redis. Running it in production means a persistent server, a database, a Redis instance, and a public HTTPS endpoint for the chat widget and channel webhooks. The official self-host path is Docker plus manual database and Redis wiring; this template does that on Railway with nothing to configure by hand.

Which Botpress this is: this template deploys the self-hosted open-source Botpress server — the edition you run on your own infrastructure with full data ownership. Botpress also offers a separate cloud product with additional managed features; the self-hosted open edition is MIT/AGPL-licensed at its core and is what you deploy here. Some of the newest cloud-only features aren't in the self-hosted edition — self-host for control, data ownership, and cost, not for cloud parity.

Typical cost: ~$10–20/month on Railway for Botpress, PostgreSQL, and Redis, plus your own LLM API usage (BYOLLM — OpenAI, Anthropic, Gemini, or local models). No per-conversation platform fees.


Deploy in Under 5 Minutes

  1. Click Deploy on Railway — Botpress, PostgreSQL, and Redis build automatically (~4–5 minutes)
  2. Database and Redis credentials are wired automatically via Railway reference variables
  3. Set EXTERNAL_URL to your Railway public domain (required for the chat widget and webhooks)
  4. Open your Railway URL and create your admin account in the Botpress dashboard
  5. Build a bot from a template or from scratch, add your LLM API key, and publish to a channel

No Docker Compose. No manual database setup. No Redis wiring.


Common Use Cases

  • Self-hosted AI customer support bot — build a support assistant with a knowledge base trained on your docs, with RAG grounding responses in your own content to reduce hallucinations
  • Visual chatbot builder for your team — design conversation flows with drag-and-drop branching, conditions, and variables without writing bot logic from scratch
  • Multi-channel deployment — publish one bot to web chat, Telegram, Slack, and Microsoft Teams from a single Botpress instance
  • Lead generation and qualification — build conversational flows that greet visitors, ask qualifying questions, and capture structured data into your CRM via API calls
  • Bring-your-own-LLM agent (data control) — route to OpenAI, Anthropic, Gemini, or local models while keeping conversations and training data on your own infrastructure
  • Internal helpdesk and FAQ automation — deploy an employee-facing bot over your policies and documentation to answer common internal questions

Configuration

VariableRequiredDescription
EXTERNAL_URL✅ RequiredYour Railway public domain — required for the chat widget and channel webhooks
DATABASE_URL✅ Auto-injectedPostgreSQL connection string via Railway reference variable
REDIS_URL✅ Auto-injectedRedis connection URI via Railway reference variable
BP_PRODUCTIONRecommendedSet true to run Botpress in production mode
CLUSTER_ENABLEDOptionalEnable Redis-backed clustering for horizontal scaling
PRO_ENABLEDOptionalToggle Botpress Pro features if licensed
BP_ADMIN_EMAIL / BP_ADMIN_PASSWORDRecommendedSeed the initial admin account
PORTAuto-setRailway injects the port automatically

Set EXTERNAL_URL to your Railway domain, or the chat widget and channel webhooks generate wrong URLs and fail. Add your LLM provider API key in the bot's settings after deploy. Verify exact variable names against the Botpress version this template deploys before publishing.


Botpress vs. Chatbot Platforms

Botpress (Railway)Botpress CloudDialogflowRasa
Monthly cost~$10–20 flat + LLMUp to $189/moPay-per-requestSelf-hosted
Self-hosted / own data✅ Yes❌ Cloud❌ Google Cloud✅ Yes
Visual flow builder✅ Yes✅ Yes✅ Yes❌ Code/YAML
BYO LLM (OpenAI/Anthropic)✅ Yes✅ Yes⚠️ Google models⚠️ Integrate
RAG knowledge base✅ Built-in✅ Built-in⚠️ Add-on⚠️ Build it
Multi-channel connectors✅ Yes✅ Yes✅ Yes⚠️ Manual
No-code accessible⚠️ Semi-technical✅ Yes✅ Yes❌ Developer
Open source✅ Core (MIT/AGPL)❌ SaaS❌ No✅ Yes

Dependencies for Botpress Hosting

  • Railway account — allocate enough RAM for Node.js + Postgres + Redis (~$10–20/month)
  • An LLM API key (OpenAI, Anthropic, Gemini) or a local model endpoint for AI responses
  • Basic JavaScript familiarity helps for custom code nodes and advanced flows

Deployment Dependencies

Implementation Details

This template deploys the self-hosted Botpress server with PostgreSQL and Redis over Railway's private network, credentials wired via reference variables. Botpress runs on Node.js and requires both PostgreSQL (bots, flows, conversations, NLU data) and Redis (sessions, caching, queue) — both provisioned automatically here.

Set EXTERNAL_URL to your Railway domain so the embeddable chat widget and channel webhooks resolve correctly. Botpress supports BYOLLM — add your OpenAI, Anthropic, or Gemini key in the bot settings, and use RAG knowledge bases to ground responses in your own documents. For higher load, enable CLUSTER_ENABLED for Redis-backed horizontal scaling. Bot data persists in PostgreSQL across redeploys.


Frequently Asked Questions

Is this the same as Botpress Cloud? No — this template deploys the self-hosted open-source Botpress server, which you run on your own infrastructure with full data ownership. Botpress Cloud is a separate managed product with some additional cloud-only features. Self-host for control, data privacy, and flat cost; choose Cloud if you want fully managed hosting and the newest managed features.

How much does self-hosting save versus Botpress Cloud or SaaS? Botpress Cloud runs up to $189/month on higher tiers, and hosted chatbot SaaS bills per conversation. Self-hosted Botpress on Railway is ~$10–20/month flat plus your own LLM tokens (BYOLLM). For higher-volume deployments, self-hosting amortizes quickly versus per-conversation pricing.

Do I need to know how to code? Botpress is semi-technical. The visual flow builder handles most bot design with drag-and-drop branching, but custom code nodes, advanced integrations, and self-hosted deployment reward JavaScript familiarity. Non-technical users can build basic bots; developers unlock the full power.

Which LLMs can I use? Botpress supports bring-your-own-LLM — OpenAI, Anthropic Claude, Google Gemini, and local/ open-source models. Add your provider key in the bot settings; you control model choice and token costs rather than paying a bundled per-message rate.

Do I lose my bots and conversations if Railway redeploys? No. All bots, flows, conversations, and NLU training data are stored in the Railway-managed PostgreSQL database. Redeploys, updates, and restarts don't affect your data.

Can I reduce AI hallucinations? Yes. Botpress's knowledge base uses RAG to ground responses in your uploaded documents, and you can build deterministic scripted flows for predictable queries while reserving generative responses for open-ended questions — a hybrid approach that improves accuracy.


Why Deploy and Host Botpress 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 Botpress on Railway, you get an open-source visual chatbot platform — flow builder, NLU, RAG knowledge bases, and multi-channel connectors — backed by PostgreSQL and Redis at ~$10–20/month flat, with bring-your-own-LLM control and full ownership of your conversation data.


Template Content

More templates in this category

View Template
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY

Agampreet Singh
295
View Template
Cobalt Tools [Updated Jul ’26]
Cobalt Tools [Jul ’26] (Media Downloader, Converter & Automation) Self Host

shinyduo
231
View Template
Telegram Gateway
Multi-bot Telegram webhook gateway with real-time WebSocket event streaming

INAPP
4