How to Host a discord bot🤖 24/7 in a Ubuntu Server

How to Host a discord bot🤖 24/7 in a Ubuntu Server

Raghav MrituanjayaRaghav Mrituanjaya
1 min read
AD PLACEHOLDER

Hello, In this post we will be seeing how to host a discord.py bot 24/7 on a ubuntu server. This post assumes that you have already coded your discord bot  

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 the supervisor sudo apt-get install supervisor

3. 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 Points To Note

  • Please change the name where I have mentioned your project or project
  • Also please change the following according to your name
    • directory
    • stderr_logfile
    • stdout_logfile
    • user

P.S:- Vultr(use this link to get a $100 credit) is a good hosting choice if you're looking for one

AD PLACEHOLDER
Pythonlinuxnodejsdevops

Subscribe to our Newsletter

AD PLACEHOLDER
Loading...
Loading...

Follow Us