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
- SSH into your server using putty or any tool that you like
run this code to install supervisor
sudo apt-get install supervisor
Then Run This command to make a new config
sudo nano /etc/supervisor/conf.d/yourproject.conf
-
Then type the following
then run the following commands
sudo supervisorctl restart all
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
the place where I have mentioned your project or project please change it to your desired name
-
Also please change the following to according to your name
- directory
- stderr_logfile
- stdout_logfile
- user
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
Discussion (2)
Was that disclaimer supposed to have a link??
Also few typos. . .
I'm sorry will modify it