Skip to content
Sign upLog in
← Back to Community

Hosting Red Discord bot on repl.it!

Profile icon
YellowBanana

Hosting Red discord bot on repl.it!

Some of you might be having a discord community! And when it comes to communities, it comes to discord bots, now a days many people want their own modmail or automod bot for discord!

Well there is a really great bot out there but hosting it is a headache. I always tried to host that bot for free in an easy way but at last, you will just give up.

Well, I have a way for you from which you can host red discord bot on repl.it for free!

In order to do this, simply head over to the home page and make a new Python REPL.

After you are done making the python repl, just make a new file called bot.sh and then put these values there:

python3.8 -m venv ~/redenv source ~/redenv/bin/activate python -m pip install -U pip setuptools wheel python -m pip install -U Red-DiscordBot redbot-setup

After you are done writing this, make another file called .replit and fill these values there:

run = "bash bot.sh"

Done with this, now smash the run button on top! Now go through the Initial setup process:

  • It will ask you for the instance name: Put any name for your bot.
  • Then it will ask for the data path, just say Yes.
  • After that It will ask you two options, one is JSON and another one is PostgreSQL, select JSON by typing 1.

Please note that the order of filling these values can change anytime, so please consider reading what's written and match it will the step provided above

Now when you are done with this simply again open your bot.sh file and remove everything and replace with this:

source ~/redenv/bin/activate redbot <your instance name>

Please change <your instance name> to the name you entered for the bot in Step 1.

Now smash the run button again, now the bot will ask you about the bot's token. To make this guide shorter and readable, please CLICK HERE for the instructions on how to obtain a discord bot token.

When you are done with the token, paste the token in the repl console, and then it will ask you for the prefix of the bot. Enter the desired prefix you want. Don't worry, we can change this later on!

Now you will see that your bot is starting. IF you haven't invited the bot yet, simply click on the link the console gives you for the bot to invite the bot to your server.

Now we are done with the discord bot, now we only need to work on the bot to make it 24/7. As redbot doesn't store any data in the repl, unfortunately, you can't make the keep-alive server! But hey wait! I am here for you.

Simply type this command to load the bot's modules.
[p]load admin alias audio bank cleanup customcom downloader economy filter general image mod modlog mutes permissions reports streams trivia warnings

This will load all the cogs for the bot. Replace [p] with the prefix you entered for the bot when running it.

After that type this command in the server or dms of the bot:

[p]repo add dualmoon https://github.com/dualmoon/Cogs.v3

After that, it will ask to agree that you are installing a third-party repo. Simply type I agree.

Then type the following commands:

[p]cog install dualmoon webthing [p]load webthing

Now when you will come to your repl you will see that the bot established a webserver in your repl.

Webserver pic

Now it's time to do the uptime robot thing! This is very easy!

Again to make this tutorial short, please CLICK HERE for a detailed guide on how to setup uptimerobot. Thank you for investing your time reading this tutorial, if you need any help, please Join this Server and contact YellowBanana to get the help! Peace Out :)

Voters
Profile icon
CaptenAntoni
Profile icon
AmirulAndalib
Profile icon
OxyFernando
Profile icon
Plum00
Profile icon
CobblepotCode
Profile icon
Zombiebro
Profile icon
GentleOtaku
Profile icon
IniOwO
Profile icon
PatrykIE
Profile icon
iamsami
Comments
hotnewtop
Profile icon
CodeLongAndPros

Lamo you're overwriting your venv...

Profile icon
YellowBanana

@CodeLongAndPros
Oh yeah imma remove one xD

Profile icon
Sparkzzzzz

Well I figured out a way to host redbot 24/7 on replit 24/7 for free with no errors!! Ik how long this took so if you are struggling to host redbot on replit just dm Sparkz#2964 on discord and ill be happy to help!

Profile icon
Angel2910

image

It always says this error, how i can fix it?

Profile icon
[deleted]

JUST FORK THIS AND READ READMED.md https://replit.com/@hexv/red-discordbot-replit?v=1

Profile icon
MEZBATHEKING

How to setup Owner id? It shows `Red [Info] ( No owners set for this bot ) so no one can load cogs!

Profile icon
HridaanSarvagya

I already hve a bot that I am hosting in my console, any way to set the bot backup as path (can't upload on repl) as I have to recode everything?

Profile icon
AFKBASE

@YellowBanana
I think I know why the bot is going offline every night, it's because replit does not store data meaning the instance and cogs will all be wiped every single night causing it to go offline. I hope you can figure out a way to store the data :)

Profile icon
xTurbo21

I guess this doesn't work anymore :')

Profile icon
Zombiebro

After 6-12 hours bot gets crash and it's never get start again any way to fix
IMG_20210515_154208

Profile icon
Link471

I also have this problem, and have not found a [email protected]

Profile icon
iamsami

I did all the steps and my bot went offline at night when I was sleeping (and this happened twice) and when I checked the uptime robot it said 100% uptime, and when I visited my repl web it showed this "exit status 127".
image

image

Profile icon
YellowBanana

I know about this error, i even contacted AllAwesome, he said our repls are not reliable to stay 24/7. For some reason idk why is this happening

@iamsami

Image

Profile icon
iamsami

So... Hosting red bot on replit is useless because my bot went down after probably 20 hours and was never online again.

Profile icon
Plum00

@iamsami
did you find any alternatives now? this is still the problem hosting it here in replit.

Profile icon
sammaslow8

I get this error

´Repl.it: Updating package configuration

--> python3 -m poetry add tqdm pymongo apsw babel yarl aiohttp appdirs distro aiohttp-json-rpc colorama asyncpg motor fuzzywuzzy uvloop markdown click packaging

[RuntimeError]
[tool.poetry] section not found in pyproject.toml
exit status 1

Repl.it: Package operation failed.´

Profile icon
YellowBanana

@sammaslow8
Hmmmm........Repl.it is auto updating packages. I don't know How do we lock them.

Profile icon
sammaslow8

@YellowBanana
Yep, sometimes with packages I am on the latest version but it changes it up to an older version.
Pretty wierd.

Profile icon
YellowBanana

@sammaslow8
Try recreating the repl.

Profile icon
sammaslow8

@YellowBanana
guess what I'm doing? Xd

Profile icon
AnshAg2007

Oh!Hi Banana! Hope You Remember me!