How to start nodebb server automatically on system restart EC2 Ubuntu install?

When I am start the nodebb serve using ./nodebb start command it starts successfully and running smothly, but when I restart the EC2 instance the nodebb server not restarting automatically. Can any one help me to solve my problem.

./nodebb generally does not restart the server on the system reboot, you can use third-party modules for it, like pm2.
Following is the steps to do after installing the nodebb successfully.

  • stop nodebb server ./nodebb stop
  • install pm2 module globally npm i pm2 -g
  • install pm2 log rotate module (optional but bets practice) pm2 install pm2-logrotate
  • start nodebb app using pm2 start pm2 start app.js
  • run pm2 startup command pm2 startup
  • the above pm2 startup command will prompt you a command to execute in the console, copy & past the command it into the console with sudo permission.
  • finally save the pm2 startup pm2 save

I think it will solve your problem.

Log in to reply