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.