So I currently have a Discord Bot (JAVASCRIPT) running in my private GitHub repository. I’m trying to find a way I can use my droplet to run that GitHub repository 24/7 so my Discord Bot is running 24/7.

The reason I want to use the GitHub repository is that I want to continuously update the bot through GitHub as well.

Please, if you know anyway, that will help me so much. Thank you

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

Hello @Traid,

I could suggest starting with this tutorial here on how to build a Discord Bot with Node.js:

https://www.digitalocean.com/community/tutorials/how-to-build-a-discord-bot-with-node-js

Then to make your application run 24/7 you can follow the steps here on how to use PM2 to set up a Node.js Production Environment On An Ubuntu VPS:

https://www.digitalocean.com/community/tutorials/how-to-use-pm2-to-setup-a-node-js-production-environment-on-an-ubuntu-vps

Hope that this helps!
Regards,
Bobby

by Jim Cassidy
Use these instructions to setup an Ubuntu server to run Node.js applications, including apps based on Express, Geddy, or Sails. This will help you avoid some security mistakes and will provide some surprising benefits.
  • Hello!

    Thank you for helping out. I followed all the directions but towards the end it talks about hosting a server. I wanted to host files on my local computer (or git repository if that’s possible) so it will do everything the pm2 server would do but just for a Discord Bot.

    All the best,
    Traid

    • Hello,

      Yes, using git is definitely recommended. You could push your project from your PC to GitHub, and then pull the project on your server with the git clone command.

      Regards,
      Bobby

Submit an Answer