Docs · Discord bots

Run your Discord bot 24/7 (Node.js or Python)

Upload your bot, set the main file, keep your token safe in a .env file and fix the most common startup errors.

1. Upload your code

Open Files in the panel and upload your project, or use SFTP for many files.

  • Node.js: upload your files and package.json, but not the node_modules folder. Packages are installed on start.
  • Python: upload your files and a requirements.txt with your packages.

2. Set the main file

In the Startup tab, set the main file, like index.js or bot.py. Check the Node.js or Python version there too.

3. Keep your token safe

Never paste your bot token into your code. Create a file named .env next to your code:

DISCORD_TOKEN=your-token-here

Read it with dotenv (Node.js) or python-dotenv (Python). If a token ever leaks, reset it in the Discord Developer Portal right away.

4. Start and read the logs

Press Start and watch the Console until your bot logs in.

Common errors

  • “Used disallowed intents”: turn on the intents your bot uses (like Message Content) in the Developer Portal → your app → Bot.
  • “An invalid token was provided”: the token is wrong or was reset. Copy a new one into .env.
  • “Cannot find module” / “ModuleNotFoundError”: the package is missing from package.json or requirements.txt.
  • The bot keeps restarting: read the first red error in the console; that’s the real cause.

Still stuck?

Open a ticket with your service name and the console error, and a real person helps you.