Free discord.py bot hosting
Run discord.py 2.x, py-cord, nextcord or disnake bots in a dedicated Python 3 Linux container. Install packages from requirements.txt, store secrets in environment variables, and connect to built-in SQLite or MySQL — starting at $0 with no credit card.
Why Python Discord bots run great on HOKAS
A typical discord.py 2.x bot idles around 45–85 MB of RAM, fitting comfortably inside the 256 MB HOKAS Free Plan. Every server runs in an isolated container with outbound WebSocket access to Discord — no Flask keep-alive hacks or external uptime pingers needed.
Whether you organize commands with Cogs, hybrid app_commands, SQLAlchemy, aiosqlite or aiomysql, you get full terminal access to install dependencies and inspect tracebacks in real time.
Included developer tools for Python bots
- Automatic dependency installation via pip install -r requirements.txt.
- Encrypted Environment Variables panel for DISCORD_TOKEN, API keys and database URLs.
- Built-in MySQL server + persistent container disk for SQLite (.db) and JSON files.
- One-click GitHub repository deploy plus browser file manager and web terminal.
- No ads: extend free-plan uptime via a quick human verification, or run 24/7 from $1/month.
Quickstart: discord.py 2.x slash commands on HOKAS
Create bot.py and requirements.txt in your server root, set DISCORD_TOKEN in Environment Variables, and configure your startup command.
Startup command: pip install -U -r requirements.txt && python3 -u bot.py import os
import discord
from discord import app_commands
from discord.ext import commands
intents = discord.Intents.default()
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.event
async def on_ready():
await bot.tree.sync()
print(f'Logged in as {bot.user} (ID: {bot.user.id})')
@bot.tree.command(name='ping', description='Check bot latency')
async def ping(interaction: discord.Interaction):
await interaction.response.send_message(f'Pong! {round(bot.latency * 1000)}ms')
bot.run(os.environ['DISCORD_TOKEN'])
Startup command: pip install -r requirements.txt discord.py>=2.4.0
aiomysql>=0.2.0
aiohttp>=3.10.0
Python Discord library compatibility on HOKAS
| Python Library | Idle Memory | Slash Commands | Recommended Plan |
|---|---|---|---|
| discord.py 2.x | 45 – 85 MB | discord.app_commands | Free (256 MB) or Starter ($1/mo 24/7) |
| py-cord 2.x | 50 – 90 MB | Native @bot.slash_command | Free (256 MB) or Starter ($1/mo 24/7) |
| disnake / nextcord | 50 – 95 MB | Built-in interaction decorators | Free (256 MB) or Starter ($1/mo 24/7) |
| hikari + lightbulb | 40 – 80 MB | Async REST & Gateway | Free (256 MB) or Starter ($1/mo 24/7) |
| AI / Pillow / FFmpeg Python bot | 300 MB – 1.2 GB | Heavy image/API tasks | Starter ($1/mo, 1 GB) or Standard ($2/mo, 2 GB) |
Host your discord.py bot in four steps
- Create an accountRegister free on HOKAS — no credit card required.
- Provision a Python serverSelect Python and choose the Free Plan or $1/mo Starter plan.
- Upload bot.py & requirements.txtUse the file manager or link your GitHub repository, and set DISCORD_TOKEN.
- Start with unbuffered logsRun python3 -u bot.py so print() and logging output appear instantly in the live console.
Plans and pricing
| Plan | vCPU | RAM | Disk | Price |
|---|---|---|---|---|
| Free | 0.3 | 256 MB | 512 MB | Free forever |
| Starter | 1 | 1 GB | 5 GB | $1 /month |
| Standard | 2 | 2 GB | 8 GB | $2 /month |
Billed monthly or yearly. The yearly price is ten times the monthly price. Bandwidth is unmetered on every plan. See all plans
Frequently asked questions
Is 256 MB RAM enough for a discord.py bot?
Yes. Standard discord.py, py-cord and disnake bots typically use 45–90 MB of RAM, leaving plenty of headroom on the 256 MB Free Plan.
Why should I pass the -u flag to python3?
Running python3 -u bot.py (or setting PYTHONUNBUFFERED=1) disables stdout buffering so your print statements and errors stream to the HOKAS live console immediately.
Can my discord.py bot use SQLite or MySQL?
Both. Container disk files persist across restarts for SQLite/aiosqlite, and every HOKAS plan includes managed MySQL databases for multi-cog production bots.
Does HOKAS require a Flask keep_alive.py web server?
No. Replit-style keep_alive Flask hacks are unnecessary on HOKAS because your Python process runs natively as a persistent container workload.
Ready to deploy?
Create a free account, set up your server and have your project running in minutes. No credit card needed.