Skip to content

Deploy with pm2

Terminal window
bun install -g pm2

Port and password are CLI flags, so they go after --:

Terminal window
pm2 start --name kanna kanna -- --port 3210 --password changeme --no-open
pm2 save
pm2 startup

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 runs pm2 reload. It requires KANNA_REPO_DIR pointing 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.

Terminal window
pm2 logs kanna
Terminal window
pm2 stop kanna
pm2 restart kanna