Skip to content
Kravn Hosting

FR/EN

  • The offer
  • Guide
  • FAQ
  • FR/EN
Discord Panel login Sign up
  1. Home
  2. Guides
  3. Deploy a Discord bot from GitHub

Deploy a Discord bot from GitHub

If your code is on GitHub, you no longer need to upload your files by hand. You paste your repository link in the panel, and every restart pulls the latest version of your bot.

Link your repository

  1. In the panel, open your bot, then the Startup tab.
  2. Paste your repository link in GitHub repository (GIT_REPO), for example https://github.com/you/my-bot. Only https links are accepted.
  3. Private repository: paste a GitHub token in GitHub token (GIT_TOKEN). Public repository: leave it empty.
  4. For a branch other than the default one, enter it in Git branch (GIT_BRANCH).
  5. Click Restart. The console shows the deployed version, for example [Kravn] Updated to a1b2c3d: fix ping command.

Keep your Discord token safe

Never put your bot's token on GitHub. Add .env to your .gitignore, create a .env file on the server in the Files tab, then read it in your code.

DISCORD_TOKEN=your-token

In Node.js, with dotenv:

require('dotenv').config();
client.login(process.env.DISCORD_TOKEN);

In Python, with python-dotenv:

from dotenv import load_dotenv
import os

load_dotenv()
bot.run(os.environ["DISCORD_TOKEN"])

Remember to add dotenv to your package.json, or python-dotenv to your requirements.txt. The .env on the server is kept at every update.

Even simpler: paste your token in Startup > Discord bot token. Your bot receives it as TOKEN, DISCORD_TOKEN and BOT_TOKEN, with no .env file.

Update your bot

  1. Send your changes to GitHub with git push.
  2. Click Restart in the panel.

Dependencies are reinstalled only if package.json, package-lock.json or requirements.txt changed. To keep the current version with no update on start, turn off Auto update (AUTO_UPDATE).

Good to know

  • Your .env, node_modules, .venv, your databases and your logs are kept at every update.
  • If GitHub doesn't respond, your bot starts with the version it already has, and the console says so.
  • If you uploaded your bot by hand before, some files in the repository may have the same name. Nothing is replaced: the console tells you which files to delete.
  • The GitHub token is visible in the panel to you and to subusers who have access to the Startup tab.

Create my account

Going further

  • Free Discord bot hosting
  • Ready-made Discord bots
  • Frequently asked questions
  • A question? Come to our Discord.
Kravn Hosting

Free and secure hosting for your Discord bot, online 24/7.

Join the Discord

Kravn

  • The offer
  • Panel login
  • Create an account
  • Status
  • Discord

Guides

  • Free bot hosting
  • Python Discord bot
  • discord.js bot (Node.js)
  • Deploy from GitHub
  • Ready-made bots
  • Web dashboard
  • All guides

Legal

  • Legal notice
  • Terms of use
  • Privacy

© 2026 Kravn Hosting · Free service.