Back to Blog
Bots

The Best Way to Host Your Discord Bot 24/7 (Free)

January 20, 2025
6 min read

The Problem with Discord Bot Hosting

Most developers start by running their Discord bot on their laptop or desktop. This works fine for testing, but it means your bot goes offline whenever you close the lid or restart your computer.

The obvious solution is cloud hosting — but most cloud services are either expensive, complicated, or both. Enzonic Cloud solves this with a free tier that's genuinely generous enough for most bots.

What Your Bot Needs

Most Discord bots are surprisingly lightweight:

Bot TypeRAM NeededCPU Needed
Simple command bot256–512 MB25–50%
Music bot (without audio)256–512 MB25–50%
Music bot (with audio)512 MB – 1 GB75–100%
Large multi-server bot1–2 GB100–200%

Enzonic Cloud's free tier gives you 3 GB RAM and 250% CPU — more than enough for most bots.

Hosting a Discord.js (Node.js) Bot

Step 1: Prepare Your Bot

Make sure your bot has a package.json with a start script:

{
  "scripts": {
    "start": "node index.js"
  }
}

Store your bot token as an environment variable, not hardcoded:

const token = process.env.DISCORD_TOKEN;

Step 2: Create the Server

In Enzonic Cloud:

  1. Click Create Server
  2. Select Web & Apps > Node.js
  3. Set RAM to 512 MB (you can increase later)
  4. Choose your preferred location

Step 3: Upload Your Code

Use the Pterodactyl file manager to upload your bot files, or connect via SFTP for larger projects.

Step 4: Set Environment Variables

In the Pterodactyl panel, go to Startup and add your environment variables including your Discord token.

Step 5: Start Your Bot

Click Start in the control panel. Your bot is now running 24/7.

Hosting a Python Bot (discord.py)

The process is nearly identical. Select Web & Apps > Python when creating your server, then upload your bot code.

Make sure your requirements.txt includes all dependencies:

discord.py>=2.3.0
python-dotenv

Keeping Your Bot Online

Enzonic Cloud runs on reliable infrastructure with 99.9% uptime. If your bot crashes, the server will restart automatically (you can configure auto-restart in Pterodactyl).

Scaling Up

If your bot grows and needs more resources, you can upgrade seamlessly. RAM starts at $1/GB per month — a 1 GB bot costs just $1/month extra beyond the free tier.

Start hosting your bot for free →

Ready to get started?

Deploy your first server free — no credit card required.

Create free account