Deploy LangBot IM Bots + Plugin Runtime (Postgres)

LangBot for Telegram, Discord, Slack and more, with plugins and Postgres

Deploy LangBot IM Bots + Plugin Runtime (Postgres)

Just deployed

Just deployed

Just deployed

Deploy and Host LangBot on Railway

LangBot is an open source platform for running AI bots on instant messaging apps. Connect Telegram, Discord, Slack, Lark, DingTalk, WeCom, QQ, WeChat Official Accounts or LINE to models such as OpenAI, Anthropic, DeepSeek, Gemini, Ollama, Dify or n8n, and manage bots, pipelines, knowledge bases and plugins from one web UI.

About Hosting LangBot

This template runs the official upstream layout: the LangBot core (web UI, API, webhooks and IM adapters) and a separate Plugin Runtime that executes plugins, both from the pinned rockchin/langbot:v4.11.4 image. Data lives in a pgvector Postgres service instead of SQLite, and the runtime is reachable only over Railway's private network with a generated control token. The owner account is created automatically on first boot from the email you enter, so nobody else can claim your instance before you sign in.

Common Use Cases

  • Team assistant in chat: an LLM bot in Slack, Discord, Lark or Telegram groups
  • Customer support bot: answer questions from a knowledge base on WeCom, WeChat or LINE
  • Front end for agent platforms: put Dify, n8n, Coze or Langflow workflows behind IM bots
  • Multi platform bot hub: one place to manage many bots, models and pipelines
  • Plugin driven automations: extend bots with marketplace plugins and MCP tools

Dependencies for LangBot Hosting

  • Postgres with pgvector: included (migrations enable the vector extension)
  • Plugin Runtime: included, private only
  • Model provider key: added in the web UI after login, not needed to boot
  • IM platform credentials: bot tokens or app keys for the platforms you connect

Deployment Dependencies

Implementation Details

LangBot reads any SECTION__KEY environment variable as an override of its config.yaml, which this template uses for every setting:

LANGBOT_ADMIN_EMAIL=you@yourdomain.com
LANGBOT_ADMIN_PASSWORD=${{secret(24)}}
DATABASE__USE=postgresql
DATABASE__POSTGRESQL__URL=${{Postgres.DATABASE_URL}}
PLUGIN__RUNTIME_WS_URL=ws://${{Plugin Runtime.RAILWAY_PRIVATE_DOMAIN}}:5400/control/ws
LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN=${{Plugin Runtime.LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN}}
API__WEBHOOK_PREFIX=https://${{RAILWAY_PUBLIC_DOMAIN}}
BOX__ENABLED=false
MCP__STDIO__ENABLED=false

First steps after deploy: open the LangBot domain, sign in with LANGBOT_ADMIN_EMAIL and the generated LANGBOT_ADMIN_PASSWORD from the LangBot variables, change the password, add a model provider, then add a bot. Webhook callback URLs in the UI use your Railway domain. Keep SYSTEM__RECOVERY_KEY for the Forgot password flow.

The upstream Box sandbox is not included because it needs the host Docker socket. Shell and file agent tools and local stdio MCP servers are therefore off; HTTP and SSE MCP servers, skills, plugins and all IM adapters work. A Hobby plan is recommended for two Python services plus Postgres.

Why Deploy LangBot 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 LangBot 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

More templates in this category

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

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

shinyduo
309
View Template
Telegram Gateway
Multi-bot Telegram webhook gateway with WebSocket event streaming

INAPP
8