I’m making a discord bot and looking to run it 24/7. Is Cloudflare a good place to do this?

It’s a small bot in just a few servers. Can I run it 24:7 on cloud flare? And what would it cost?
11 Replies
SuperHelpflare
Feedback
Feedback has been submitted! Thank you :)
Chaika
Chaika2d ago
For a bot with slash commands/interactions, sure you can run it on Cloudflare, they work well. For a gateway/websocket bot, largely not a good idea/makes more sense to run it elsewhere.
Green
GreenOP21h ago
Is it possible to keep a bot running 24/7 on the workers free plan?
Chaika
Chaika20h ago
Slash commands/interactions bot, or a gateway/websocket connected bot?
Green
GreenOP20h ago
Slash commands
Chaika
Chaika20h ago
Slash commands setup via outgoing websockets/HTTP invoke your app with a single request with each usage of them. Workers free gets 100k requests/day (so 100k invocations) https://discord.com/developers/docs/tutorials/hosting-on-cloudflare-workers
Green
GreenOP20h ago
So will it just stay up as long as that limit isn't reached? i don't think it will hit that limit, but what happens if it does?
Chaika
Chaika20h ago
Worker would respond with errors and interactions/command executions would fail. https://developers.cloudflare.com/workers/platform/pricing/
Green
GreenOP20h ago
When i try to build, it gets stuck at the deploy step. While it's stuck, the bot works. However, after about half an hour, it will quit, and the build fails. The log has no messages after the bot logs in
No description
Chaika
Chaika19h ago
lol, you're running the bot inside of the build container it's supposed to be used to just make a worker and then deploy it to the edge What kind of setup are you using? using discord.js?
Green
GreenOP19h ago
Yea discord.js

Did you find this page helpful?