How to Host a Discord Bot for Free (Step by Step)

How-toBy discordbothostPublished Updated 3 min read

The short answer: Put your bot on a free bot host instead of your computer. Create the Discord app, upload your project, set BOT_TOKEN privately and press Start. On discordbothost, Free provides 256 MB RAM and 1 GB disk without idle sleep. Renew weekly and keep a separate copy of your code and data.

Before you start

  • A bot application from the Discord Developer Portal with its token (Bot → Reset Token). Treat it like a password.
  • If your bot reads message text, turn on Message Content Intent under Bot → Privileged Gateway Intents. Otherwise you'll get the disallowed intents error.
  • Your code runs locally with node index.js, python bot.py or java -jar bot.jar.

Step 1: Clean up the project

  • discord.js: a package.json with your dependencies and a start script. Don't upload node_modules.
  • discord.py: a requirements.txt (pip freeze > requirements.txt, then trim it).
  • JDA: build a single runnable "fat" jar (Gradle Shadow or the Maven Shade plugin).
  • Read the token from the environment, not a file: process.env.BOT_TOKEN or os.environ["BOT_TOKEN"]. Delete .env files and tokens from anything you upload or push.

Step 2: Create the free server

  1. Sign in to discordbothost with Discord, Google or email.
  2. Choose Free and a template: discord.js (Node.js 22/24), discord.py (Python 3.12/3.13) or JDA (Java 21).
  3. You get one bot with 256 MB RAM, 1 GB disk and 0.25 vCPU in its own container.

Step 3: Upload the code

Connect a public GitHub repository, or upload a zip, drag files into the file manager, or use SFTP for bigger projects. Zip uploads count against the 1 GB disk quota once unpacked, so leave out build output and caches.

Step 4: Set the token and start

Add BOT_TOKEN (or whatever name your code reads) under environment variables, then press Start. Watch the console: dependencies install and then your "logged in as…" line should appear. Live graphs show memory, so you can see whether 256 MB is enough.

Step 5: Keep it running

  • Renew weekly. Renew opens when the bot goes offline and starts it again. Reminder emails offer Upgrade to keep it running without renewals. Your files are kept until the deletion date shown on the bot page.
  • Crashes: Bots restart automatically after a crash. Repeated crashes pause restarts; check the console before starting again.
  • Keep a copy. Free includes manual backup slots when available; keep your code in Git.

When free stops being enough

Move up when the bot needs more than 256 MB, you want to skip weekly renewal, or you need private GitHub repositories and crash alerts. Public GitHub push-to-deploy is already included on Free. discordbothost Starter is $0.99/month for 512 MB with no renewal, backup slots when available and GitHub push-to-deploy. Compare other free plans in free Discord bot hosting compared.

Backups are available: manual on Free, daily and manual on paid plans.

Sources

Discord gateway docs on privileged intents (https://discord.com/developers/docs/events/gateway); https://render.com/docs/free; discordbothost plan limits from discordbothost's pricing page. Checked .

Questions

Can I host a Discord bot for free 24/7?

Yes. Use a free Discord bot host rather than your own PC. On discordbothost the free plan runs one bot in its own 256 MB container with no idle sleep. It goes offline after 7 days until you renew it; crashes and maintenance can also interrupt it.

Do I need a credit card to host a bot for free?

Not on discordbothost's free plan. Sign in with Discord, Google, GitHub or email and verify your email address.

Why not use Replit or Render for free?

Their free options are built for web apps that can sleep. A Discord bot keeps a gateway connection open, so sleeping takes it offline. Render's free tier excludes background workers.

  1. 1https://discord.com/developers/applications
  2. 2https://discord.com/developers/docs/events/gateway
  3. 3https://render.com/docs/free
  4. 4https://discordbothost.com/pricing/

Related

  • Why Does My Discord Bot Keep Going Offline?

    7 common reasons a Discord bot goes offline (PC sleep, sleeping free hosts, crashes, memory, bad token, intents, rate limits) and how to fix each.

    Updated · 4 min read
  • Render Discord Bot Hosting: Free Limits and Setup

    Can Render host a Discord bot? Choose a worker or HTTP service, understand free sleep limits, set build commands and move your bot safely.

    Updated · 4 min read
  • How to Keep a Discord Bot Online 24/7

    Keep a Discord bot online when your PC is off. Compare idle sleep, crash recovery, memory limits and free-plan renewal before choosing a host.

    Updated · 3 min read