New to CraftNodes? Use code WELCOME10 at checkout for 10% off your first month.

Back to Blog

May 13, 2026

How to Host a Python Discord Bot 24/7 Without a PC

Learn how to keep your Python Discord bot running 24/7 without leaving your PC on. CraftNodes makes it easy with Pterodactyl panel hosting from $1.99/mo.


The Problem with Running Bots Locally

Running a Discord bot on your own computer means it goes offline when you close your laptop or restart Windows. A 24/7 bot needs a server that stays on always.

Step 1: Prepare Your Bot Code

Make sure your bot runs from a single entry point (e.g., bot.py) and that your requirements.txt file lists all dependencies. Remove any local file paths that won't work on a remote server.

Step 2: Order a CraftNodes Bot Plan

Go to CraftNodes, pick a Discord Bot Hosting plan, and complete checkout. Your server is ready in under 60 seconds.

Step 3: Upload Your Files

Use the Pterodactyl file manager or SFTP to upload your bot files to the server. Place everything in the root directory of your server.

Step 4: Set Your Bot Token

Set your bot token as an environment variable in the Pterodactyl Startup tab. Never hardcode tokens in your code.

Step 5: Start and Monitor

Click Start in the Pterodactyl panel. Your bot is now running 24/7. The console shows real-time output, and the server restarts automatically if it crashes.


All posts

CraftNodes Blog