3.8 KiB
3.8 KiB
Pterodactyl Panel Deployment Guide
This guide will help you deploy the OC Bot using Pterodactyl Panel.
Compatible with:
- Pterodactyl Panel v1.13.0+
- Wings v1.12.3+
What is an Egg?
A Pterodactyl "egg" is a JSON configuration file that defines how your application should be installed, configured, and run within a Pterodactyl Panel server.
Installation Steps
1. Import the Egg into Pterodactyl
- Log in to your Pterodactyl Panel as an administrator
- Navigate to Admin Panel → Nests & Eggs → Nests
- Click on an existing nest (e.g., "Discord" or create a new one)
- Click Import Egg
- Copy the contents of
egg-oc-bot.jsonand paste it into the import field - Click Import
2. Create a New Server
- Go to Servers → Create New Server
- Select the nest containing the OC Bot egg
- Select the OC Bot egg
- Configure the following settings:
Environment Variables (Required)
These are configurable in the Pterodactyl Panel:
-
Discord Bot Token - Get from Discord Developer Portal
- Create a new application
- Add a Bot
- Enable "Message Content Intent"
- Copy the token
-
Database Host - MariaDB/MySQL server address
- Default:
localhost - Use container IP if running in Docker:
host.docker.internalor the service name
- Default:
-
Database User - Database username
- Default:
root
- Default:
-
Database Password - Database password
- Leave empty if no password set
-
Database Name - Database name
- Default:
rp_bot
- Default:
3. Database Setup
Before starting the bot, ensure your MariaDB database is set up:
CREATE DATABASE rp_bot;
The bot will automatically create the necessary tables on first run.
4. Start the Server
- Click the Create Server button
- Go to your new server's console
- Click Start to launch the bot
- You should see "started" in the console when ready
5. Configure Discord
- Go to Discord Developer Portal
- Select your application
- Go to OAuth2 → URL Generator
- Select scopes:
bot - Select permissions:
- Send Messages
- Manage Messages
- Manage Webhooks
- Read Message History
- Embed Links
- Copy the generated URL
- Open the URL in your browser and add the bot to your server
Environment Variables Explained
| Variable | Purpose | Example |
|---|---|---|
DISCORD_TOKEN |
Bot authentication token | MTk4NjIyNDgzNDU4Njc4Ng... |
DB_HOST |
Database server address | localhost or mariadb |
DB_USER |
Database username | root |
DB_PASSWORD |
Database password | mypassword |
DB_NAME |
Database name | rp_bot |
STARTUP_CMD |
Command to start the bot | python bot.py |
Troubleshooting
Bot won't start
- Check Discord token is correct
- Ensure "Message Content Intent" is enabled in Developer Portal
- Check logs for database connection errors
Database connection error
- Verify database is running and accessible
- Check credentials are correct
- Ensure database exists:
SHOW DATABASES;
Webhook errors
- Ensure bot has "Manage Webhooks" permission
- Check Discord token has necessary scopes
File Structure in Panel
server/
├── bot.py
├── database.py
├── requirements.txt
├── .env (auto-generated from variables)
├── README.md
├── SETUP.md
└── cogs/
├── __init__.py
├── oc.py
├── help.py
├── utils.py
└── config.py
Updating the Bot
- Upload new files via the file manager
- Restart the server
- Changes take effect immediately
Support
For issues or questions, refer to SETUP.md or consult the Pterodactyl Documentation.
Coded by Ball Studios 🎨