Cover image for How to Host a discord bot 24/7 in a VPS server

How to Host a discord bot 24/7 in a VPS server

gogamic profile image Raghav Mrituanjaya Updated on ・1 min read

Hi Guys so today in this post we will be seeing how to host a discord.py bot 24/7 in a ubuntu server

disclaimer: I think you have already have a disocrd.py or discord.js bot if you don't have then please refer this

These are the simple steps to keep running your bot 24/7

  1. SSH into your server using putty or any tool that you like
  2. run this code to install supervisor

    sudo apt-get install supervisor

  3. Then Run This command to make a new config

    sudo nano /etc/supervisor/conf.d/yourproject.conf

  4. Then type the following

  5. then run the following commands

    sudo supervisorctl restart all

  6. That's it now you can see your bot online 24/7 and even if you restart your server your bot will restart and come online

Some important notes

  1. the place where I have mentioned your project or project please change it to your desired name

  2. Also please change the following to according to your name

    • directory
    • stderr_logfile
    • stdout_logfile
    • user
  3. If you are looking a cheap and best place to host your bot consider Digital Ocean here is a link to their website https://m.do.co/c/63a3ac211390

Do Support me on Patreon => https://www.patreon.com/gogamic

Posted on by:


markdown guide

Was that disclaimer supposed to have a link??
Also few typos. . .