BotHosterJoin early access

Python runtime

Host a discord.py bot
without living in a terminal.

A deployment path for Python bot makers who want the code in GitHub, the token outside it, and the startup evidence close at hand.

Production shape

A clean Python environment, rebuilt from the repository.

The goal is a repeatable release whose dependencies, command, and failures are easy to explain.

01 / 03

Reproducible installs

Declare every production package in requirements.txt or your chosen Python project file so the remote environment can be rebuilt consistently.

requirements.txt or pyproject.toml

02 / 03

Explicit entry point

Make the command that starts the bot unambiguous. A host should not have to guess between bot.py, main.py, app.py, or a package module.

python -m your_bot

03 / 03

Tracebacks you can read

Import errors, syntax failures, missing variables, and Discord login errors should remain visible instead of becoming a mysterious offline badge.

traceback + exit status

Deploy checklist

Make the local project portable.

A bot that works inside only one developer environment is not ready for reliable hosting.

  1. Create an isolated local environment

    Use a virtual environment so the dependency list reflects the bot project rather than every Python package installed on your computer.

  2. Pin or constrain production dependencies

    Record discord.py and every package the bot imports. A deployment can only install dependencies that the repository declares.

  3. Move the token into an environment variable

    Read DISCORD_TOKEN from the environment, fail clearly when it is missing, and keep .env files outside Git.

  4. Verify intents and startup output

    Run the exact production command, confirm on_ready completes, and test the event or command paths the bot actually needs.

Discord-specific

Intents belong in both code and the Developer Portal.

discord.py requires intents when the client is created. Choose the smallest set that supports the bot's features; member, presence, and message-content access may require additional configuration or approval.

The discord.py intents primer explains both sides of the configuration. Discord's official getting-started guide also warns that bot tokens should never be shared or committed to version control.

Prefer a clear startup failure over silently passing an empty token or setting. A one-line configuration error is easier to fix than a process that never connects.

Questions

discord.py hosting FAQ

Do I upload my Python virtual environment?

No. Commit the dependency declaration, not the local virtual-environment folder. The deployment environment should create a clean environment and install the declared packages.

Why does Python say a module is missing after deployment?

The package may not be declared, its import name may differ from its package name, or the deployment may use a different Python version than your computer.

Why is my discord.py bot online but not reading messages?

Check the intents passed to discord.Client or commands.Bot and the matching toggles in the Developer Portal. Prefix commands that read message content generally require the message-content intent.

Next step

Python code in Git. Bot process online.

Join BotHoster early access and help refine a clearer deployment flow for discord.py projects.