Creating Automated Provisioning with Pterodactyl and WHMCS Integration
Manual provisioning — receiving a payment notification, logging into your panel, creating a server, emailing credentials — is the bottleneck that keeps resellers small. At 20 customers, it is manageable. At 100, it consumes hours per week. Automation eliminates this entirely.
How the Integration Works
WHMCS ←→ Pterodactyl integration uses the Pterodactyl API. When WHMCS detects a paid invoice for a game server product, it calls the Pterodactyl API to:
- Create a new server with specified resources
- Create a user account
- Return credentials to WHMCS
- WHMCS sends the customer a welcome email with credentials
Installing the Pterodactyl Module
Download the official WHMCS-Pterodactyl Module from Pterodactyl's community GitHub repository.
# Place module files in WHMCS directory
modules/servers/pterodactyl/
In WHMCS Admin:
- Go to Configuration → System Settings → Server
- Add New Server: Pterodactyl type
- Enter your Pterodactyl panel URL and Application API key
Creating Products That Auto-Provision
WHMCS Product configuration:
Product Type: Server/VPS
Module: Pterodactyl
Server: [Your Pterodactyl server]
Module Settings:
Nest ID: [Minecraft eggs nest ID]
Egg ID: [Paper/Spigot egg ID]
Memory: 4096 (MB)
Disk: 10240 (MB)
CPU: 200 (%)
Startup: java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar server.jar
When a customer orders this product and pays, WHMCS calls Pterodactyl to create the exact server defined in these settings.
The Welcome Email Template
Customise the WHMCS email template for game server provisioning to include:
Subject: Your {Product Name} server is ready!
Hello {$client_name},
Your server is ready! Access it here:
Panel: https://panel.yourhosting.com
Username: {$service_username}
Password: {$service_password}
Server IP: {$service_dedicated_ip}:{$service_assigned_ports}
Need help? Contact us at support@yourhosting.com or join our Discord: discord.gg/yourserver
Enjoy!
YourBrand Team
Suspension and Cancellation Automation
WHMCS also handles automated suspension (on overdue invoice) and cancellation (on customer request):
- Overdue invoice (3 days): WHMCS suspends server via Pterodactyl API (server stopped, accessible but not running)
- Overdue invoice (14 days): WHMCS terminates server, data deleted
- Customer cancellation: Scheduled termination on billing cycle end
Zero manual action required for the entire server lifecycle.