← Back to Mochi

Deploy Mochi

Mochi is a small program that has to stay on, so your bots answer day and night. The easiest way is one click on Railway. If you'd rather use another host or your own machine, every option is below.

Other ways to run Mochi

Render

One click reads Mochi's render.yaml and creates the service with a 1 GB disk and HTTPS.

Good for: People who already use Render.

  • One click
  • Disk included
  • Paid Starter plan

Render's free plan sleeps and loses files on restart, so the blueprint uses the Starter plan.

Sealos

Launch the Mochi image from Sealos's App Launchpad: free domain, automatic HTTPS and a persistent volume.

Good for: Users in mainland China and anyone who prefers a point-and-click console.

  • Visual console
  • Free domain
  • Volume

Any VPS, one command

On a fresh Ubuntu or Debian server, one command installs Docker, Mochi and Caddy with a free HTTPS certificate. Both restart on their own.

Good for: Hetzner, Sakura VPS, ConoHa, DigitalOcean, Vultr or any server you rent.

  • Full control
  • Free HTTPS (Caddy)
  • Your own disk
curl -fsSL https://www.mochichatbot.com/install-vps.sh | sudo bash

Open TCP 80 and 443 in your firewall first. Add MOCHI_DOMAIN=bot.example.com after sudo to use your own domain.

Docker

One container on any machine that runs Docker. The image is public and multi-arch (amd64 and arm64).

Good for: A home server, a NAS, a Raspberry Pi or an existing Docker host.

  • amd64 + arm64
  • Public image
  • Volume for data
docker run -d --name mochi --restart unless-stopped -p 3000:3000 -v mochi-data:/app/data ghcr.io/am-young-fun/mochi:latest

Put HTTPS in front of port 3000 (Caddy, Cloudflare Tunnel, your reverse proxy) before sharing it.

Kubernetes (Helm)

A Helm chart with a persistent volume, health checks, an ingress with cert-manager and a generated admin token.

Good for: Teams already running Kubernetes, including Sealos clusters.

  • Helm chart
  • PVC + ingress
  • One replica
helm install mochi oci://ghcr.io/am-young-fun/charts/mochi --namespace mochi --create-namespace --set publicUrl=https://mochi.example.com --set ingress.host=mochi.example.com

Replace mochi.example.com with your domain. Keep one replica: two copies would fight over the same chat sessions.

Other container hosts

Zeabur, Fly.io, Koyeb, Northflank and any host that runs a container image work too. Use the image below.

Good for: Whatever host you already pay for.

  • Port 3000
  • Volume at /app/data
  • or DATABASE_URL
ghcr.io/am-young-fun/mochi:latest

Set PUBLIC_URL to the address the host gives you, and TRUST_PROXY=1 when it sits behind the host's proxy.

Your own computer

One line installs Mochi on macOS, Linux or Windows and opens the dashboard. Free, but bots only answer while it's on.

Good for: Trying Mochi out before putting her online.

  • Free
  • macOS, Windows, Linux
  • On while your computer is
curl -fsSL https://www.mochichatbot.com/install.sh | bash

What any host needs

  • A process that stays on (not serverless: Vercel, Netlify and Cloudflare Workers can't run it).
  • Somewhere to keep her memory: a disk at /app/data, or a Postgres database in DATABASE_URL.
  • Port 3000 open to the web, ideally behind HTTPS. LINE and the website widget need a public HTTPS address.

After it's running

Open /dashboard on your new address right away and choose your admin password (the first visitor sets it). Then bind your Flatkey key and connect your channels.