Host a Discord bot 24/7 for $2.00 a month

Free bot hosting sleeps, restarts, and runs out of hours. How to keep a Discord bot online 24/7 on a $2.00/mo VPS.

Codature team1 min read

Codature

The problem with free bot hosting

Free tiers are great for learning, but they're a poor home for a bot people depend on. Apps go to sleep when idle, free hours run out mid-month, shared IPs get rate-limited by Discord, and you rarely control the runtime or the restart behavior.

A VPS fixes all of that. Your bot gets its own server, its own dedicated IPv4, and runs until you stop it.

How small can you go?

Most Discord bots are tiny. A bot written in Python (discord.py) or JavaScript (discord.js) serving a few servers typically uses well under a gigabyte of RAM, so the Nano plan, 1 vCPU and 1 GB of RAM for $2.00/mo, is enough for most.

Step up to Micro (2 GB for $3.00/mo) if you run several bots on one box, add a database like PostgreSQL or Redis, or your bot handles music or image processing.

A simple setup that stays up

Once you deploy, the usual setup takes a few minutes:

  • Install your runtime (Python or Node.js) and clone your bot's code
  • Store your bot token in an environment file, never in the code
  • Run it under systemd or pm2 so it restarts automatically after a crash or reboot
  • Lock down SSH with keys and a firewall, since you have full root

Why pay instead of using free hosting

At $3.00 a month, or $30.00 a year with 2 months free, a VPS costs less than a coffee and removes every limit that makes free hosting frustrating. You also get room to grow: run a dashboard, a web API, or a second bot on the same server.

Every Codature plan also includes upstream DDoS filtering, a free IPv6 /64, and 1 TB or more of bandwidth. Start on the Miami VPS page.