Black Friday Black Friday SALE: 40% off every resource until December 1. Shop the sale

Advanced Pterodactyl

Install and set up Advanced Pterodactyl for Paymenter on Pterodactyl v1 or v2: API keys, products, name templates, customer tabs, Auto Login, user sync, audit log and automatic stock.

Advanced Pterodactyl | Full Panel in Paymenter

Requirements

  • Paymenter v1.x.
  • Pterodactyl v1 or Pterodactyl v2. You pick the version in the settings.
  • An Application API key, and a Client API key for the customer tabs.

Installation

Step 1: Upload the extension

Extract the zip and upload the BetterPterodactyl folder to the server extensions of Paymenter. The folder name must stay BetterPterodactyl.

/var/www/paymenter/extensions/Servers/BetterPterodactyl/

Make sure the web server user owns the files:

chown -R www-data:www-data /var/www/paymenter/extensions/Servers/BetterPterodactyl

Step 2: Add the server in Paymenter

Admin Panel → Servers → New server → Server: BetterPterodactyl

Fill in the panel URL, pick the Pterodactyl Version and paste the API keys from the next section.

Pterodactyl v1 and v2

VersionWhat changes
Pterodactyl v1Products use a Nest and an egg from that nest. Auto Login needs the SSO plugin, see Auto Login.
Pterodactyl v2Nests are gone. Products use an optional Tag: with a tag only eggs with that tag are listed, without one every egg is. Auto Login uses the Advanced Pterodactyl SSO extension that is in the download.

Everything else works the same on both versions. Existing installs keep using Pterodactyl v1 until you change the setting.

API keys

Application API key

  1. Pterodactyl v1: go to Admin → Application API. Pterodactyl v2: go to Admin → API Keys.
  2. Create a key with read and write access to everything.
  3. Paste it into Application API Key in Paymenter.

Client API key

  1. Sign in to the panel as a root admin and go to Account → API Credentials.
  2. Create a key and paste it into Client API Key in Paymenter.

The client key powers the customer tabs: the live overview, the console, files, backups and the rest. A root admin key can reach every server; customers only ever see their own.

Setting up a product

Create a product, pick this server under Server and fill in the fields:

FieldWhat it does
Location(s) and NodeWhere the server is installed. With a node set, the server always goes to that node.
Nest (v1) or Tag (v2)The group the eggs come from.
Default EggThe egg new servers use.
Allow Customer Egg SelectionCustomers pick an egg from the nest or tag during checkout.
Allow Customer Location SelectionCustomers pick a location during checkout, from the locations of the product or from every location when none are set. Not used when a node is set.
Server Name TemplateOverrides the global name template for this product.
Server Description TemplateOverrides the global description template for this product.
Memory, swap, disk, CPU, IO, databases, backups, allocationsThe resources of the server.
Port Array and Port rangesAssign ports to egg variables, or limit the ports that are used.

Server names and descriptions

When the customer does not pick a name, Advanced Pterodactyl uses the name template of the product, then the global one, and otherwise Product #ID. The description template works the same way. Placeholders:

PlaceholderExample
{username}Jane Doe
{first_name} and {last_name}Jane, Doe
{email}jane@example.com
{user_id}42
{product_name}Minecraft 4 GB
{category}Game servers
{service_id} or {id}1337
{username} {product_name} #{service_id}

Customer tabs

On the service page, customers get one Server view with a navigation bar for every section. On smaller screens the bar shows icons, so it always stays on one line. Next to Open Panel and Auto Login there is a Password button to show the panel password once or generate a new one.

Every section can be turned on or off in the server settings, and most have a separate switch that allows changes. With only the section on, customers can look but not change anything.

SectionWhat customers can doSetting
OverviewStatus, IP and port, live CPU, memory, disk and network usage, and start, restart and stop buttons.Always on
ConsoleThe live console. Commands and power buttons can be turned off separately.Enable Live Console
FilesBrowse, edit, upload, rename, copy, compress, extract, chmod and delete files.Enable File Browser
DatabasesCreate databases, rotate passwords and delete them.Enable Databases Tab
SchedulesCreate and run schedules and their tasks.Enable Schedules Tab
UsersInvite subusers and set their permissions.Enable Users Tab
BackupsCreate, download, lock, restore and delete backups.Enable Backups Tab
NetworkAdd allocations, set notes and the primary allocation.Enable Network Tab
StartupChange the startup variables the egg marks as editable.Enable Startup Tab
SettingsRename the server, switch docker image and reinstall.Enable Settings Tab
ActivityThe activity log of the server.Enable Activity Tab

Auto Login

Auto Login signs customers in to the panel with one click, without a password. It needs a secret that Paymenter and the panel share.

Pterodactyl v2

  1. Install the Advanced Pterodactyl SSO extension from the Pterodactyl v2 SSO folder of the download. See Advanced Pterodactyl SSO.
  2. Put the same secret in the extension and in SSO Secret Key in Paymenter. Leave SSO Endpoint Path on /sso.

Pterodactyl v1

Run these commands on your Pterodactyl server, not in Paymenter:

cd /var/www/pterodactyl
composer require builtbyotte/pterodactyl-sso
php artisan vendor:publish --tag=sso
php artisan sso:generate

Copy the generated key into SSO Secret Key in Paymenter.

Passwords and security alerts

The panel password is stored encrypted in Paymenter. Customers can show it once or generate a new one with the Password button. With Security Email Alerts on, customers get an email when someone uses Auto Login, shows the password or generates a new one.

User sync

With Sync User Details on, a change of email address or name in Paymenter is sent to the Pterodactyl user of that customer right away. The username stays the same.

Audit log

With Audit Log on, every action a customer takes through Advanced Pterodactyl is saved in Admin → Audits of Paymenter, with the service, the customer and the details: power actions, files, databases, schedules, subusers, backups, allocations, startup changes, renames, reinstalls, Auto Login and password actions. File contents and variable values are never stored.

Console commands go straight from the browser to Wings, so they are not in the audit log. They are in the activity log of Pterodactyl.

Automatic stock

With Enable Automatic Stock Calculation on, the stock of every product is calculated from the free resources of its nodes, minus the buffer you set. It needs the Paymenter cron job:

* * * * * php /var/www/paymenter/artisan schedule:run >> /dev/null 2>&1

You can also run it by hand:

php artisan betterpterodactyl:update-stock

Troubleshooting

ProblemSolution
"The route api/application/nests could not be found"The panel runs Pterodactyl v2. Set Pterodactyl Version to Pterodactyl v2.
No eggs in the productOn v1, pick a nest first. On v2, check that the tag has eggs, or leave the tag empty.
"No nodes satisfying the requirements"No node has enough free memory or disk in the chosen locations. On Pterodactyl v2 the over-allocation is a percentage, so -1 does not mean unlimited there.
Auto Login returns HTTP 404The SSO plugin or extension is not installed, or the SSO Endpoint Path is wrong.
Auto Login returns HTTP 403The secrets are not the same, or the customer is a root admin while admin logins are off.
"Console connection blocked"Add your Paymenter URL to allowed_origins in /etc/pterodactyl/config.yml on every node and restart Wings.
The extension does not show upThe folder must be called BetterPterodactyl and sit in extensions/Servers.

Need help?

Visit builtbyotte.com/help. We reply to every message within 24 hours.