Deploy with pm2
Install
Section titled “Install”bun install -g pm2Port and password are CLI flags, so they go after --:
pm2 start --name kanna kanna -- --port 3210 --password changeme --no-openpm2 savepm2 startupIn-app self-update under pm2
Section titled “In-app self-update under pm2”Two strategies, and the default is the one you want for a normal npm install.
supervisor(default). The self-update button installs the new version from npm and exits; pm2 restarts the process on the new code. Nothing to configure — this is what runs unless you say otherwise.KANNA_RELOADER=pm2. For running Kanna from a git checkout rather than the npm package: it pulls, rebuilds, and runspm2 reload. It requiresKANNA_REPO_DIRpointing at that checkout and throws at startup without it — the failure is loud, not silent.
Kanna does not sniff for pm2. Setting neither variable is correct under pm2.
pm2 logs kannaStop / restart
Section titled “Stop / restart”pm2 stop kannapm2 restart kanna