Deployment
Deployment
Section titled “Deployment”For long-running deployments, use PM2 as a process supervisor. It daemonizes mikan, restarts on crash, and survives reboots.
# 1. Install mikan and pm2npm i -g @geminixiang/mikan pm2
# 2. Start the sandbox container/image dependency you plan to usedocker pull ghcr.io/geminixiang/mikan-sandbox:latest
# 3. Grab the ecosystem file, edit args + env tokens, then startcurl -O https://raw.githubusercontent.com/geminixiang/mikan/main/deploy/pm2/ecosystem.config.cjspm2 start ecosystem.config.cjspm2 savepm2 startup # run the printed command to enable boot autostartUpgrade flow:
npm i -g @geminixiang/mikan && pm2 reload mikanpm2 reload sends SIGTERM and waits up to kill_timeout (60s in the shipped config) before SIGKILL. mikan’s internal graceful shutdown drains in-flight LLM turns within that window, so reloads do not interrupt active conversations.
See ../deploy/pm2/ecosystem.config.cjs for all tunables.