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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
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:
Also, as a side note here is also a quick video on how to deploy Node.js with PM2, Nginx as a reverse proxy, and Cloudflare for SSL termination:
The solution to your problem is the Cloud. Cloud is just a remote computer which runs your bot 24/7. There are tons of services available for remote hosting. I will advise you to use heroku because it’s free and when you get some experience in cloud hosting, you can buy better dedicated VPS by spending some money.
man I don’t understand your way