Pterodactyl
Sell game servers that run on Pterodactyl Panel.
When an order is activated, BAMCS creates the server on your panel: it picks a
node and a free port and creates the client's panel account. Clients can then
start, stop and reinstall their server from the BAMCS client area.
|
|
| Type |
Provisioning (service) module |
| Version |
1.0.0 |
Features
Automatic provisioning
- Create: when a service is activated, the server is created with the
product's nest, egg, resources and limits.
- Node and port: the module looks up the nodes in your chosen location,
picks the one with the most free allocations, then takes the first free
allocation on it.
- Panel account:
- A client who already has a Pterodactyl account, matched by email address,
gets the new server on that account.
- Otherwise a panel account is created with the client's name, and the
username and password are included in the welcome email.
- Suspend, unsuspend and terminate follow the service status in BAMCS. For
example, an overdue service is suspended on the panel and unsuspended once it
is paid.
- Upgrades and downgrades update the server's memory, swap, disk, CPU, IO and
feature limits. This happens both when the client upgrades and when staff
change the package.
- Safe to retry: each server is tagged with the BAMCS service it belongs to,
so a provisioning retry never creates a duplicate server.
- Failures: failed actions are retried automatically. If they still fail,
staff get an alert and can retry the action from the service page. The client
is told their setup is delayed.
Server inventory and capacity
- Several panels: add one or more Pterodactyl panels to the BAMCS server
inventory and group them into server groups.
- Server choice: new orders go to a server in the product's group that still
has room. Room is measured in maximum services and/or memory and disk
capacity.
- Clients choose the location: offer server groups as an order option to let
clients pick a location.
- Health check: every panel is checked hourly. A panel that stops responding
gets no new servers, and staff are alerted.
Client area
When Enable ClientArea Buttons is on for the product, the client's service
page shows a game server panel with:
- Live status: running, starting, stopping or offline.
- Start, Restart, Stop and Kill buttons.
- Reinstall, with a confirmation step.
- CPU, memory and disk usage, refreshed every 30 seconds.
- The server address (
ip:port) and the SFTP address.
- Open Panel, which opens the server on your Pterodactyl panel.
- Reset Panel Password, which sets a new panel password and shows it once.
Flexible product setup
- Panel lookups: locations, nests and eggs are loaded from your panel into
dropdowns in the product editor.
- Environment variables: egg variables use the egg's defaults. You can
override any of them per product.
- Per-order values: any product setting can be set per order with a custom
field or a configurable option. For example, let clients choose their memory
or name their server.
Requirements
-
Pterodactyl Panel 1.x, reachable from your BAMCS server over HTTPS.
-
An Application API key (ptla_…) with these permissions:
| Resource |
Access |
| Users |
Read & write |
| Servers |
Read & write |
| Locations |
Read |
| Nodes |
Read |
| Allocations |
Read |
| Nests |
Read |
| Eggs |
Read |
-
A Client API key (ptlc_…) from a panel administrator account. The
client-area controls (power, usage, reinstall) need it, because Pterodactyl
doesn't accept application keys on its client API.
-
Free allocations (IP/port pairs) on the nodes you deploy to.
-
The BAMCS queue worker and scheduler running. Provisioning runs in the
background, and the health check runs on the scheduler.
Installation
- In BAMCS, go to Modules → Marketplace and install Pterodactyl.
Alternatively, upload the module
.zip under Upload a module package.
- Under Installed Modules, click Activate.
Configuration
Step 1: Add your panel
Go to System → Server Inventory → Add Server:
| Field |
Value |
| Name |
Any name, for example "Pterodactyl EU". |
| Hostname |
Your panel URL, for example https://panel.example.com. Include the scheme. |
| Module |
Pterodactyl |
| Server Group |
The group this panel belongs to. Create one first with Add Server Group. |
| Username |
Not used. Leave empty. |
| API Key / Password |
Your Application API key (ptla_…). |
| Maximum Services |
Optional cap on the number of servers placed on this panel. |
| Memory Capacity (MB) / Disk Capacity (MB) |
Optional. Stops placing servers once the products' memory or disk would exceed this. |
Save the server, open it again with Edit, and fill in the Pterodactyl fields:
| Field |
Value |
| Node IDs |
A panel node ID to deploy to. Takes priority over Location ID; see Limitations. |
| Location ID |
A panel location. New servers go to the node in that location with the most free ports. |
| Client API Key |
Your Client API key (ptlc_…), used for the client-area controls. |
Click Test connection to check the URL and the application key.
Step 2: Module settings (optional)
Modules → Pterodactyl → Settings has a fallback API URL, API Key and
Client API Key. They are only used for services that aren't linked to a
server in the inventory. With the inventory set up as in Step 1, you can leave
them empty.
Step 3: Create a product
Go to System → Services Catalog and create or edit a product.
- On the Module Settings tab, choose Pterodactyl as the module and
select the Server Group.
- Set Auto Setup to control when the server is created:
- Payment: once the first invoice is paid.
- Invoice Created: as soon as the order's invoice exists.
- Manual: when staff activate the service.
- Fill in the Pterodactyl fields:
| Field |
Default |
Description |
| Server Name |
My Pterodactyl Server |
Name of the server on the panel. |
| Location ID |
– |
Location to deploy in. Used when the inventory server has no Node IDs or Location ID. |
| CPU Limit |
0 |
CPU limit in percent; 100 = one core. 0 = unlimited. |
| Memory Limit (MB) |
0 |
Memory in MB. 0 = unlimited. |
| Disk Space (MB) |
0 |
Disk in MB. 0 = unlimited. |
| Swap (MB) |
0 |
Swap in MB. 0 = disabled, -1 = unlimited. |
| IO Weight |
500 |
Block IO weight (10–1000) relative to other servers on the node. |
| Nest |
– |
The nest that holds the egg. |
| Egg |
– |
The egg (game or software) the server runs. |
| Environment Overrides |
– |
Egg variables to override, one KEY=value per line. |
| Database Limit |
0 |
Number of databases the client may create. |
| Allocation Limit |
0 |
Number of extra ports the client may add. |
| Backup Limit |
0 |
Number of backups the client may keep. |
| Enable ClientArea Buttons |
Off |
Shows the game server panel on the client's service page. |
Set Memory Limit (MB) and Disk Space (MB) even if you don't need the
limits themselves: they are what server capacity is measured with.
Per-order values
To let a value be chosen on each order, add a custom field or a
configurable option to the product, named variable|Label. For example:
memory_limit|Memory as a configurable option with the choices 2048|2 GB
and 4096|4 GB.
server_name|Server name as a custom field.
Values are applied in this order, and the last one wins:
- The product's module settings.
- Custom fields.
- Configurable options.
The variable names are server_name, cpu_limit, memory_limit,
disk_space, swap, io_weight, database_limit, allocation_limit and
backup_limit.
To let clients choose a location, add a configurable option named
server_group|Location whose choices are named <group id or name>|Label, for
example 2|Frankfurt. A server_group custom field holding a group ID or name
works too.
Welcome email
After a server is created, BAMCS sends the product's welcome email. Without a
custom welcome email, it sends the standard "service activated" email. Put
{{access_details}} in the template to include the panel URL, username,
password, IP and port.
Limitations
- One node per inventory server: if you enter several Node IDs, only the
first one is used. To spread servers over several nodes, leave Node IDs empty
and use a Location ID instead.
- One panel per server group: all panels in a server group must share the
same nest and egg IDs, because the product editor loads them from the group's
first panel.
- Existing panel accounts: a client whose email already has an account on
the panel keeps their existing password. The welcome email then has no
password in it, and the client can use Reset Panel Password if Enable
ClientArea Buttons is on.
- Package changes: upgrades and downgrades change resource and feature
limits only. A different nest, egg or startup setup on the new product is not
applied.
- Docker image and startup command: the egg's defaults are always used.
- Ports: one allocation is assigned at creation. Clients can add more up to
the Allocation Limit.
- Services that were never set up: cancelling such a service, or
terminating a server that was already deleted on the panel by hand, fails and
alerts staff. Close the service in BAMCS manually.
- No single sign-on: Open Panel takes the client to the panel's login
page.