Creating Automated Provisioning with Pterodactyl and WHMCS Integration

Published on

Manual server provisioning doesn't scale. Here's how to connect Pterodactyl and WHMCS so customer servers provision automatically on payment.

Written by Jochem, Infrastructure Engineer at Space-Node, 5-10 years experience in game server hosting, VPS infrastructure, and 24/7 streaming solutions. Read author bio →

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:

  1. Create a new server with specified resources
  2. Create a user account
  3. Return credentials to WHMCS
  4. 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:

  1. Go to Configuration → System Settings → Server
  2. Add New Server: Pterodactyl type
  3. 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.

Build your automated reseller operation on Space-Node

Jochem

About the Author

Jochem, Infrastructure Engineer at Space-Node, expert in game server hosting, VPS infrastructure, and 24/7 streaming solutions with 5-10 years experience.

Since 2023
500+ servers hosted
4.8/5 avg rating

I specialize in Minecraft, FiveM, Rust, and 24/7 streaming infrastructure, operating enterprise-grade AMD Ryzen 9 hardware in Netherlands datacenters.

View my full bio and credentials →

Start Your MC Server Now Today

Join content creators worldwide who trust our Minecraft infrastructure. Setup is instant and support is always available. Start from €0.90/mo (Dirt) or €2.70/mo (Coal) and go live in minutes.

Creating Automated Provisioning with Pterodactyl and WHMCS Integration