
Deploy Botpress — Self-Hosted Open-Source Chatbot Builder
Self-host Botpress: visual chatbot builder with NLU & RAG. BYO LLM.
Botpress
Just deployed
/botpress/data
Just deployed
/var/lib/postgresql/data
Deploy and Host Botpress on Railway

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
| Service | Purpose |
|---|---|
| Botpress Server | The 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 |
| Redis | Session 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
- Click Deploy on Railway — Botpress, PostgreSQL, and Redis build automatically (~4–5 minutes)
- Database and Redis credentials are wired automatically via Railway reference variables
- Set
EXTERNAL_URLto your Railway public domain (required for the chat widget and webhooks) - Open your Railway URL and create your admin account in the Botpress dashboard
- 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
| Variable | Required | Description |
|---|---|---|
EXTERNAL_URL | ✅ Required | Your Railway public domain — required for the chat widget and channel webhooks |
DATABASE_URL | ✅ Auto-injected | PostgreSQL connection string via Railway reference variable |
REDIS_URL | ✅ Auto-injected | Redis connection URI via Railway reference variable |
BP_PRODUCTION | Recommended | Set true to run Botpress in production mode |
CLUSTER_ENABLED | Optional | Enable Redis-backed clustering for horizontal scaling |
PRO_ENABLED | Optional | Toggle Botpress Pro features if licensed |
BP_ADMIN_EMAIL / BP_ADMIN_PASSWORD | Recommended | Seed the initial admin account |
PORT | Auto-set | Railway injects the port automatically |
Set
EXTERNAL_URLto 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 Cloud | Dialogflow | Rasa | |
|---|---|---|---|---|
| Monthly cost | ~$10–20 flat + LLM | Up to $189/mo | Pay-per-request | Self-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
- Botpress GitHub Repository — source and releases
- Botpress Documentation — flow builder and self-hosting guides
- Botpress v12 Repository — the self-hosted server edition
- Railway Documentation — deployment and variables
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
