Deploy AstrBot
AI chatbot and agent platform for Telegram, Discord, Slack, QQ and more
Just deployed
/AstrBot/data
Deploy and Host AstrBot on Railway
AstrBot is an open-source AI agent and chatbot platform. It connects large language models to chat apps such as Telegram, Discord, Slack, QQ, WeChat Work, Lark and DingTalk, and you manage everything from one web dashboard: model providers, personas, plugins, knowledge bases, MCP tools, scheduled tasks and chat history.
About Hosting AstrBot
This template runs AstrBot v4.29.4 as one service. It's built from our GitHub repo, which pins the official soulter/astrbot image by version and digest. A Railway volume at /AstrBot/data holds the config, SQLite databases, plugins and knowledge bases, so they survive redeploys. The dashboard is locked from the first boot: Railway generates ASTRBOT_DASHBOARD_INITIAL_PASSWORD, and your first sign-in (user astrbot) makes you choose your own username and password. The only prompt is your LLM API key. On the first boot it's added as the default model, so the dashboard's built-in chat works at once.
Common Use Cases
- A personal AI assistant you can reach from Telegram, Discord or Slack
- A team or community bot with personas, a knowledge base and plugins
- An agent that calls MCP tools and runs scheduled tasks from chat
Dependencies for AstrBot Hosting
- An API key for an OpenAI-compatible LLM endpoint (OpenAI, DeepSeek, OpenRouter, Groq, a self-hosted Ollama or vLLM, and others)
- A bot token for each chat platform you want to connect (added later in the dashboard)
Deployment Dependencies
- AstrBot source and releases: https://github.com/AstrBotDevs/AstrBot (release v4.29.4)
- AstrBot documentation: https://docs.astrbot.app/en/
- Railway template repo: https://github.com/aalfath/astrbot-railway-template
- OpenAI API keys: https://platform.openai.com/api-keys
Implementation Details
Services: one service, AstrBot, which serves the web dashboard and the bot on Railway's PORT. Health check /api/stat/versions, restart on failure, volume at /AstrBot/data.
Variables:
LLM_API_KEY(required): your provider's API key. It's stored as a reference ($LLM_API_KEY) in AstrBot's config, so the key itself is never written to the volume. To rotate it, change the variable and redeploy.LLM_BASE_URL(defaulthttps://api.openai.com/v1): any OpenAI-compatible endpoint, for examplehttps://api.deepseek.com/v1orhttps://openrouter.ai/api/v1.LLM_MODEL(defaultgpt-4.1-mini): the model name at that endpoint.ASTRBOT_DASHBOARD_INITIAL_PASSWORD(generated): the first dashboard password, used only on an empty volume.
The three LLM_* values are read on the first boot only, to create the default model. After that, add or change models in the dashboard under Providers.
After deploy:
- Open the service's Railway URL and sign in as
astrbotwith the value ofASTRBOT_DASHBOARD_INITIAL_PASSWORD(Variables tab). - Choose your own username and password.
- Try the model in the dashboard's Chat page, then add a bot under Platforms (Telegram, Discord, Slack and others). Some platforms (QQ OneBot, WeChat bridges) need an extra TCP port or a separate bridge service. Those aren't included here.
Left out: upstream's optional Shipyard code sandbox needs Docker-in-Docker, so it isn't included, and the agent's sandboxed code execution stays off. The dashboard's in-app updater isn't used either: updates come from the template repo.
Memory: about 0.36 GB at idle, so it runs on a 0.5 GB plan. Large knowledge bases and many plugins need 1 GB or more.
Updates: when we bump the pinned AstrBot version in the template repo, Railway shows an "update available" notice on your project, and you choose when to apply it. Your data stays on the volume. Read the repo's CHANGELOG.md first.
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 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
LLM_API_KEY
API key for your LLM provider (OpenAI: platform.openai.com/api-keys, or DeepSeek, OpenRouter, Groq...). Becomes the default chat model on first boot.

