Deploy Mochi AI Chatbot
Self-hosted AI chatbot for Discord, Telegram, Slack and your website
Just deployed
/var/lib/postgresql/data
am-young-fun/mochi:latest
Just deployed
Deploy and Host Mochi AI Chatbot on Railway
Mochi is an open source AI chatbot you run yourself. Give it a name, a personality and your own documents, then connect it to Discord, Telegram, Slack, QQ, LINE or a chat window on your website. It remembers the people it talks to, and a web dashboard shows exactly what it remembers and lets you make it forget.
More details: https://www.mochichatbot.com
About Hosting Mochi AI Chatbot
This template deploys Mochi from its prebuilt Docker image together with a PostgreSQL database, so bots, memory, knowledge files and settings survive every redeploy without a volume. Railway gives it a public HTTPS address, which the website chat widget and the dashboard use. During deploy you can paste a Flatkey API key (new Flatkey accounts get $1 in free credit), or leave it empty and add it later in the dashboard. After the first deploy, open your Railway URL with /dashboard at the end, copy the one-time setup code from the service logs, and choose an admin password. Mochi needs one instance only.
Common Use Cases
- An AI companion or character for your Discord server or Telegram group, with memory of each member
- A support bot that answers customer questions from your FAQ, documents or web pages, on your site or in LINE
- A website chat widget with an animated character, in any of the languages your visitors use
Dependencies for Mochi AI Chatbot Hosting
- PostgreSQL (included in this template) for memory, knowledge bases and settings
- A Flatkey API key for the AI models (https://flatkey.ai)
Deployment Dependencies
- Mochi on GitHub: https://github.com/AM-young-fun/Mochi-ai-chatbot
- Setup guide and video tutorial: https://www.mochichatbot.com
- Get a Flatkey key: https://flatkey.ai
Implementation Details
Mochi runs the public image ghcr.io/am-young-fun/mochi:latest and reads its database from DATABASE_URL, which points at the template's PostgreSQL service. Each bot can use a different model for chat, images, memory and web search, and has its own daily token budget. Backups of a bot's memory, knowledge and settings can be downloaded and imported from the dashboard.
Why Deploy Mochi AI Chatbot 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 Mochi AI Chatbot 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
am-young-fun/mochi:latest
ghcr.io/am-young-fun/mochi:latestFLATKEY_API_KEY
Must-have key so to ensure API. Check more details at https://mochichatbot.com To get your key, visit https://console.flatkey.ai
