Deploy AstrBot IM Agent Hub
AI agent chatbot for Telegram, Discord, Slack, QQ with a secured WebUI
AstrBot
Just deployed
Deploy and Host AstrBot on Railway
AstrBot is an open source AI agent and chatbot framework. It connects large language models to messaging platforms such as Telegram, Discord, Slack, QQ, WeCom and Lark, and manages everything from one WebUI: providers, personas, plugins, knowledge bases, MCP tools, scheduled tasks and conversation history.
About Hosting AstrBot
Hosting AstrBot is a single container. This template uses the official soulter/astrbot:v4.29.4 image with a Railway volume mounted at /AstrBot/data, the same layout as the upstream Docker Compose file. That volume holds the configuration file, the SQLite databases, installed plugins and their Python packages, so everything survives redeploys. PORT and DASHBOARD_PORT are pinned to 6185 so Railway's healthcheck reaches /api/stat/start-time on the right port. The WebUI is protected from the first boot: Railway generates ASTRBOT_DASHBOARD_INITIAL_PASSWORD, AstrBot uses it as the first password for the astrbot user, and then requires you to pick your own username and password. There is no fixed default login and no open setup page.
Common Use Cases
- Team or community chatbot: one bot answering in Telegram, Discord, Slack or QQ groups
- Personal AI assistant: personas, long term memory and scheduled tasks across your chat apps
- Knowledge base bot: upload documents and let the bot answer from them
- Agent with tools: MCP servers, web search and plugins from the AstrBot plugin market
- Multi model routing: OpenAI compatible, Anthropic, Gemini and local model providers side by side
Dependencies for AstrBot Hosting
- Railway volume at
/AstrBot/data(included) - LLM provider API key: optional at boot, add it in the WebUI
- Messaging platform credentials: optional at boot, add them in the WebUI
- No database service required: AstrBot stores data in SQLite on the volume
Deployment Dependencies
Implementation Details
The image command is python main.py, so no custom start command is needed. Key variables:
PORT=6185
DASHBOARD_PORT=6185
DASHBOARD_HOST=0.0.0.0
ASTRBOT_DASHBOARD_INITIAL_PASSWORD=${{secret(29)}}Aa1
First steps after deploy
- Wait for the deployment to turn healthy.
- Open your Railway domain and sign in as
astrbotwith the generatedASTRBOT_DASHBOARD_INITIAL_PASSWORDfrom the service variables. - Choose your own username and password when AstrBot asks. The variable is not used again after that.
- Add an LLM provider under Providers, then connect a platform under Platforms.
- For webhook based platforms, enable unified webhook mode and set
callback_api_baseto your Railway domain.
Good to know
- The agent sandbox (Shipyard) needs a Docker socket and is not available on Railway. Local code execution works but is unsandboxed, so it stays off by default.
- Only port 6185 is public. Use outbound adapters or unified webhook mode for platforms that would otherwise need their own port.
- Plugins run as code inside the container. Install only plugins you trust.
- Keep one replica. SQLite on a volume does not support more.
Why Deploy AstrBot 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 AstrBot on Railway, you get a pinned, health checked chatbot hub with persistent storage, a generated first boot password, managed SSL and a public domain ready for platform webhooks.
Template Content
AstrBot
soulter/astrbot:v4.29.4
