Skip to main content

Run as a Service (Linux)

To ensure Planka runs persistently across reboots, we use PM2, a process manager for Node.js applications.

Step-by-Step Instructions

  1. Install PM2 Globally
sudo npm install pm2@latest -g
  1. Navigate to the Planka Directory
cd /var/www/planka
  1. Start Planka with PM2
pm2 start --name "planka" "npm run db:init && npm start --prod"

This registers Planka as a PM2 process named planka.

  1. Configure PM2 to Launch on Boot
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u planka --hp /home/planka
  1. Save the Current PM2 Process List
pm2 save

Now Planka will automatically start after system reboots.