How to Host a Python Bot for Free
A Python bot can run on free hosting when its dependencies and memory use fit the plan. consolex1’s free allocation is 256 MB RAM and 512 MB storage, with no database or automated backups included.
The consolex1 custom egg
The Python Universal egg is developed by the consolex1 hosting provider. Its source code is public on GitHub.
1. Verify the bot locally
Run the bot with the same Python version and dependencies you plan to deploy. Confirm it handles disconnects and reports startup errors clearly.
2. Record dependencies and startup file
Add a requirements.txt file and identify the bot’s entry point, such as bot.py. Avoid including virtual environments or cache folders in the upload.
3. Keep secrets out of the code
Read the Discord token and other credentials from environment variables. Store them in the private instance settings and never commit them to a repository.
4. Select Python Universal and launch
Create an instance through the consolex1 Discord onboarding flow, choose the Python Universal egg and select Python 3.9, 3.10, 3.11, 3.12, 3.13 or 3.14 in the Startup tab. Set the main file (for example bot.py) and start the server. Python 3.9 is no longer maintained upstream and is provided for compatibility only.
5. Let the egg install dependencies
Python Universal creates a .venv automatically and recreates it if you change Python versions. It uses uv to install dependencies detected from requirements.txt, pyproject.toml or uv.lock. Optional settings support git pull on startup and extra pip packages.
6. Check limits and persistence
Verify the bot comes online and monitor memory use. Free hosting has limited resources and no automated backups, so keep source code and important state backed up separately.