Python

Free Python Discord bot hosting.

Upload your project, name your entry file, press start. discord.py, Pycord, Hikari, or anything else on pip, online around the clock.

Libraries

Libraries that run here

discord.py

The library most Python Discord tutorials are written against, and the one to pick if you are following a guide.

Pycord

A fork of discord.py that moved faster on application commands. Familiar if you have used discord.py before.

Hikari

A lighter, more explicit take on the same problem. Worth a look if you would rather assemble the pieces yourself.

Deploying

Getting it running

  1. 1

    Upload your project

    Drag the folder into the file manager or push it over SFTP. There is no need to bring a virtual environment — your server is already isolated from everyone else.

  2. 2

    requirements.txt does the rest

    Your requirements are installed on deploy, before the bot starts. If a package is missing, it is because it is not in that file.

  3. 3

    Point us at your entry file

    Usually main.py or bot.py. Your token goes into an environment variable and is read with os.environ, so it stays out of your source.

Memory

What actually fits in 256 MB

A discord.py or Pycord bot serving a few hundred guilds fits inside 256 MB without much thought. Python carries a larger baseline than Node does — the interpreter and your imports cost something before your bot has done anything at all — but the headroom above that is usually the part that matters.

Where it gets tight is anything holding a large dataset in memory: a scraped cache, a pandas frame, an in-memory index. Those belong in a file or a small local database, and you have 512 MB of disk to put one in. A music bot will not fit at all — transcoding audio needs more of both memory and CPU than a free tier has.

FAQ

Questions

Do I need a virtual environment?

No. Your server is already isolated, so there is nothing to keep separate from. List your packages in requirements.txt and they are installed for you on deploy.

discord.py or Pycord?

Either works here. discord.py is what most guides are written against, which makes it the easier place to start. Pycord is a fork that moved faster on application commands, and the two are similar enough that moving between them is rarely painful.

Can I use a database?

A local one, yes. SQLite lives in a file alongside your code and fits comfortably in 512 MB of disk for anything a typical bot stores. You can also connect out to a database you host elsewhere.

Will 256 MB run a discord.py bot?

For a few hundred guilds, yes. Watch what you keep in memory rather than what you import — a cache you grow yourself will reach the limit long before the library does.

Free tools for Discord bots