Discord bot hosting

How do I host a Discord bot from GitHub for free?

On FadeHost. Connect the repository once and every push redeploys the bot, which runs 24/7 on the free plan: 256 MB of RAM, 3 GB of disk, no credit card and nothing to renew.

The repository is the deployment. Connect it, put the token in an environment variable, press Deploy, and from then on every push to your branch installs, builds if needed and restarts the bot. Public or private repositories, any language the repository names.

Free
256 MB, always on, no card
Starter
1 GB, $2/mo or $20/yr
Standard
Two bots, 1.5 GB each, $3/mo or $30/yr
Pro
Four bots, 2 GB each, $6/mo or $60/yr

What happens on a deploy

  1. Clone the repository at the branch you chose, with an installation token for private ones.
  2. Install: npm, pnpm, yarn or bun for Node.js, pip into a kept virtual environment for Python, go build for Go, mvn or gradle for Java.
  3. Build, when the file your start command runs is not committed and there is a build script.
  4. Start, and restart if the process exits.

The live console shows every step; a failed step prints its error there and the crash doctor explains it.

Auto-deploy on push

Turn on auto-deploy and choose the GitHub App (one click, per repository) or a webhook. Pushes to the chosen branch redeploy; other branches are ignored. Pin a commit when you want a deploy to stay put while you keep pushing elsewhere.

Languages detected from the repository

package.json is Node.js (or Bun and Deno when their files say so), requirements.txt or pyproject.toml is Python, go.mod is Go, pom.xml or a Gradle build is Java 21, composer.json is PHP, a Gemfile is Ruby. Override the language or the start command on the bot's page whenever the guess is wrong.

Questions

Do private repositories work?

Yes. Connect GitHub and pick the repository: it takes a few seconds and there is nothing to paste. The FadeHost GitHub App reads it on every deploy, so there is no token to keep or renew.

Can I deploy a fork of someone else's bot?

Yes, as long as it runs from its repository: an install file, an entry point, and its secrets read from environment variables. Bots that expect a config file with the token in it need the token moved to an environment variable.

Where does the token go?

In the environment variables of the app, as BOT_TOKEN or whatever name your code reads, never in the repository. The panel masks the values and injects them when the bot starts.

How do I roll back a bad push?

Revert the commit and push, or set the bot to a pinned commit on its page and redeploy. Files under /data are untouched by either.

What does the free tier include?

One bot with 256 MB of RAM, always on, placed where there is room for it (a paid plan picks the region), with the live console, environment variables and redeploys on push. A second bot or more memory is the Starter plan at $2 a month.

Read on

Put your bot online now

One bot free, 24/7. No credit card, nothing to renew.

Deploy from GitHub free

Free, no credit card

Deploy from GitHub free