So I made a discord bot, and I’m trying to make it so it stays online all day, and all night. I installed pm2 but when I log off my computer the bot goes back offline. Is there any way to make the bot online 24/7 without needing to have your computer on all day?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hi there @edugutierrez2007,

Yes indeed, you will have to use pm2 in order to configure your application so that it runs 24/7.

Note that after installing pm2 you need to do some configuration in order to make it work. You can follow the steps here on how to configure your pm2 and your application:


by Brennen Bearnes
Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. Node.js applications can be run at the command line but this guide focuses on running them as a service using PM2, so that they will automatically restart on reboot or failure, and can safely be used in a production environment.
Submit an Answer