Getting started
Your download link is in the client area once the order completes. Extract the zip and follow
INSTALL.txt — it has the current file paths for your WHMCS version.
With the module installed you're ready to configure servers and products.
Coming from Pterodactyl-WHMCS? Much of this will look familiar, but products cannot be switched across directly and the two modules need different API permissions. Set products up fresh and follow the steps below rather than reusing the old configuration.
Server configuration
Before you can create Pterodactyl servers, WHMCS needs a server record pointing at your panel.
Add the server in WHMCS
- Go to Setup → Products/Services → Servers and create a server.
- Set Hostname to your panel's hostname, for example
panel.pterobill.com. - Under Server Details, choose PteroBill as the module.
- Leave Username blank.
Create the Application API key
In your Pterodactyl panel, create an Application API key with the permissions shown below, then paste it into the Password field on the WHMCS server.
Application API permissions — read/write where PteroBill needs to create and modify servers.
PteroBill needs different permissions from Pterodactyl-WHMCS. Create a new key rather than reusing an existing one.
Optional: client area server controls
To give customers start, stop, reboot and reinstall buttons inside WHMCS, add an Account API key as well. It must be created by a Pterodactyl admin account to work.
- Put the Account API key in the Access Hash field.
- If your panel uses SSL, tick Secure for SSL Mode.
- Click Save Changes.
Product configuration
This is where the AutoAllocator gets set up, and where you stop activating servers by hand. Every field has a Help link beside it in WHMCS; options in blue text open a page with more detail.
The module settings page for a PteroBill product.
- Module Name
- Select PteroBill. If it isn't listed, re-check the steps in
INSTALL.txt. - Server Group
- The server group you created in server configuration. Without it the Location dropdown stays empty and nothing will deploy — set this first.
- Server Name
- The name the server is created with. Customers see it in the panel, so naming it after the product usually makes sense. They can rename it later.
- Location
- Populated from your panel. Pick the default location for this product.
- CPU Limit
- One core or thread counts as 100 — so
100for a single core,250for two and a half,0for unlimited. - Memory (MB)
- Maximum memory the server may consume.
0for unlimited. - Disk (MB)
- Maximum disk space the server may consume.
0for unlimited. - Swap (MB)
- Swap available when the server runs out of memory.
0disables swap,-1makes it unlimited. - IO Weight
- Disk access priority, between 10 and 1000. Leave it at
500to treat every server equally. Docker's block IO documentation explains the weighting in detail. - Create Allocations
- Not implemented yet. Once it lands, PteroBill will create allocations for you instead of you adding them by hand.
- Dedicated IP
- Assigns a genuinely dedicated IP — a feature Pterodactyl doesn't have. Assigned IPs are tracked so later servers don't land on them.
- Nest
- Populated from your panel. Choose the nest that contains this product's egg.
- Egg ID
- The egg ID from the panel. A WHMCS limitation keeps this a text field rather than a dropdown for now.
- Pack
- The pack ID from the panel.
- Database Limit
- How many databases the server may create.
0for none, blank for unlimited. - AutoAllocator Increment
- How far the allocator steps forward while searching for free ports. Defaults to
1.
Port arrays
The port array tells the allocator which ports this product needs. It must be valid JSON and it
must include SERVER_PORT, which becomes the primary allocation. Every other entry
is added as an additional allocation.
- Use
"NONE"to reserve a port without mapping it to anything. - Use an egg variable name, such as
"RCON_PORT", to reserve the port and override that egg variable. - Pass an array of numbers to reserve several ports under one key.
Examples
Ark {"SERVER_PORT": 7777, "NONE": 7778, "QUERY_PORT": 27015, "RCON_PORT": 27020}
Arma 3 {"SERVER_PORT": 2302, "NONE": [2303, 2304, 2306]}
CS:GO {"SERVER_PORT": 27015}
Rust {"SERVER_PORT": 27015, "RCON_PORT": 27016}
7D2D {"SERVER_PORT": 26900, "NONE": [26901, 26902]}
Mordhau {"SERVER_PORT": 15000, "QUERY_PORT": "15001", "BEACON_PORT": "15002"}
GTA: MTA {"SERVER_PORT": 22003, "SERVER_WEBPORT": 22005, "NONE": 22126}
If the exact ports in the array aren't available, the AutoAllocator keeps searching until it finds a set that is.
Template variables
PteroBill passes these into your client area product details template.
- serviceurl
- Direct link to the server in Pterodactyl, e.g.
https://panel.domain.com/server/abc123 - rebooturl
- Sends a reboot request to the server. Requires a client API key.
- reinstallurl
- Sends a reinstall request to the server.
- memory
- Memory allocated to the server, e.g.
1000 MB - disk
- Disk allocated to the server, e.g.
40 GB - cpu
- CPU allocated to the server, e.g.
150% - location
- Pterodactyl location name, e.g.
London - server_name
- Server name in Pterodactyl
- identifier
- Abbreviated server UUID, e.g.
aa4256fe - server_ip
- IP address of the primary allocation
- server_port
- Port number of the primary allocation
- server_allocations
- Array of every allocation assigned to the server
- oomkill_enabled
- True if oomkill is enabled for the server
- databases_limit
- Pterodactyl database limit for the server
- allocations_limit
- Pterodactyl allocations limit for the server
- backups_limit
- Pterodactyl backups limit for the server
- container_image
- Container image the server runs
- startup_command
- Startup command for the server
- container_env
- Array of the container's environment variables
- nest_name
- Name of the Pterodactyl nest
- nest_description
- Description of the Pterodactyl nest
- egg_name
- Name of the Pterodactyl egg
- egg_description
- Description of the Pterodactyl egg
- backups_list
- Array of the server's backups
Using them
For example, a button that opens the server in the panel:
<a href="{$serviceurl}" class="btn btn-success">Go to Panel</a>
Configurable options and custom fields
Use configurable options or custom fields to override these values while the customer is ordering — so they can pay for extra memory, a faster CPU or more backups.
- server_name
- Name the server is created with in Pterodactyl
- location_id
- Pterodactyl location ID
- port_array
- Overrides the product's port array
- memory
- Allocated memory
- swap
- Allocated swap
- io
- Disk IO weight
- cpu
- CPU shares
- disk
- Disk storage space
- dedicated_ip
- True for a dedicated IP
- egg_id
- Egg ID
- image
- Docker image
- startup
- Startup command
- databases
- Number of databases
- allocations
- Number of allocations
- backups
- Number of backups
- oom_disabled
- True to disable. Ignored by the Pterodactyl API on many versions.
- username
- Overrides the generated username
Stuck on a step?
Send us the logs from the admin widget, open a ticket, or ask in Discord — whichever is quicker for you.