How to deploy a Discord bot for free
A step-by-step guide to running a Discord bot on Deplexo's free tier, where it stays online and never sleeps.
Prerequisites
- A Discord bot (discord.js, discord.py, or any library)
- Bot token from the Discord Developer Portal
- Code in a GitHub repo
Step 1: Prepare your repo
Push your bot code to GitHub. The repo needs a package.json (Node.js) or requirements.txt (Python) at the root, plus a start script or entry point.
Step 2: Add deplexo.yaml
For a Node.js bot:
version: 1 type: worker build: framework: auto run: command: node bot.js
For a Python bot:
version: 1 type: worker build: framework: auto run: command: python bot.py
Port is required even if your bot doesn't serve HTTP.
Step 3: Create a Deplexo account
Go to deplexo.com/loginand sign up with email or GitHub. You don't need a credit card.
Step 4: Connect and deploy
Connect your GitHub repo and Deplexo will detect the framework. Click deploy, and the build logs stream in as it runs.
Step 5: Add your bot token
Open the Env Vars tab and add BOT_TOKEN (or DISCORD_TOKEN, or whatever name your bot reads). Redeploy so the bot picks up the new variable.
Why not serverless?
Discord bots need a persistent WebSocket connection to the Discord gateway. Serverless functions (Lambda, Vercel, Cloudflare Workers) can't hold a connection open that long. Deplexo runs persistent containers, so your bot stays connected.
See the Discord bot use case for more details.
What if I need more resources?
The free tier's 128 MB of RAM is enough for most bots. If yours does heavier work, like image processing or serving many guilds, Starter ($5/mo) gives you 512 MB.
See pricing plans for details.