Cloee Docs
Paymenter ExtensionsBetterPterodactyl

Config Options & Environment Variables

Complete guide on configuring product options, resource limits, and environment variables for BetterPterodactyl in Paymenter.

Config Options allow your customers to tailor their servers during checkout (such as selecting RAM, choosing a server location, picking software versions, or adding backup slots) and upgrade those resources later from their client portal.

1. How Config Options Work in Paymenter

When you create a Config Option in Paymenter (Admin Area → Configuration → Config Options), the Environment Variable (env_variable) field determines which server setting or game egg variable is controlled on Pterodactyl.

Config Options have two levels:

Level 1: General Tab (The Parent Setting)

  • Name: The label shown to your customer (e.g. Server RAM, Location, Minecraft Version).
  • Environment Variable: The configuration key recognized by the extension (e.g. memory, location, MC_VERSION).
  • Type: The form control displayed to the customer:
    • Select: Dropdown menu (one choice from a list). Supports pricing and upgrades.
    • Radio: Radio button list (one choice from a list). Supports pricing and upgrades.
    • Slider: Visual stepped slider bar. Supports pricing and upgrades.
    • Checkbox: On/Off toggle. Supports pricing (maximum 1 child option).
    • Number: Numeric input field where the customer types a number.
    • Text: Freeform text box where the customer types text (e.g. license keys or server names).
  • Upgradable: (For Select, Radio, Slider) When checked, existing clients can upgrade or downgrade this resource later without losing their server.
  • Products: Select which product(s) offer this option.

Level 2: Options Tab (The Choices)

(Applies to Select, Radio, Slider, and Checkbox)

  • Name: What the customer sees on the button or dropdown (e.g. 4 GB RAM, Germany (Frankfurt)).
  • Environment Variable: The exact value sent to Pterodactyl (e.g. 4096, 1, paper.jar).
  • Pricing: Additional charge for this choice (Free, Recurring, or One-Time).

Note for Text & Number Types: When using Text or Number, no items are needed under the "Options" tab. The customer types their value directly during checkout, and Paymenter automatically sends their input to the parent's Environment Variable.

2. Complete Reference of Supported Variables

A. Server Hardware & Limits

Environment VariableDescriptionValue Format & UnitUpgradable?
memoryMaximum RAM allocated to the serverNumber in MiB (1024 = 1 GB, 2048 = 2 GB, 4096 = 4 GB). Set to 0 for unlimited.Yes
cpuCPU limitPercentage (100 = 1 core, 200 = 2 cores, 400 = 4 cores). Set to 0 for unlimited.Yes
diskDisk storage spaceNumber in MiB (5120 = 5 GB, 10240 = 10 GB, 51200 = 50 GB). Set to 0 for unlimited.Yes
swapSwap memory allocationNumber in MiB (512, 1024). Set to 0 to disable swap, -1 for unlimited swap.Yes
ioDisk Block I/O priority weightNumber between 10 and 1000 (Pterodactyl default is 500).Yes
cpu_pinningPin container to specific host CPU threadsComma-separated list or ranges (e.g. 0, 0,1, 0,2-4,6). Leave empty for default.Yes

B. Feature Limits & Addons

Environment VariableDescriptionValue FormatUpgradable?
databasesNumber of allowed MySQL/MariaDB databasesWhole number (0, 1, 2, 5).Yes
backupsNumber of allowed server backup slotsWhole number (0, 1, 3, 5).Yes
additional_allocationsExtra ports allocated beyond the primary portWhole number (0, 1, 2, 4).Yes
splitsAllowed sub-server splits (ServerSplitter addon)Whole number (0, 1, 2).Yes
reverse_proxiesAllowed reverse proxies (ReverseProxy addon)Whole number (0, 1).Yes

C. Server Deployment & Location

Environment VariableDescriptionValue FormatWhere to Find It in Pterodactyl
location (or location_ids)Target datacenter locationNumeric Location ID (1, 2), or multiple comma-separated IDs (1,2).Pterodactyl Admin → Locations (see ID column)
nodeForces deployment onto one specific nodeNumeric Node ID (1, 2). Leave empty for automatic node balancing.Pterodactyl Admin → Nodes (see ID column)

D. Nest & Egg Software Settings

Environment VariableDescriptionValue FormatNotes
egg_idSelects which Egg to useNumeric Egg ID (1, 2, 3).Allows clients to switch server types (Paper, Forge, Purpur, Bedrock). Upgradable!
nest_idSelects Nest ID (Pterodactyl 1.x)Numeric Nest ID (1, 2).Used on Pterodactyl 1.x installations.
startupCustom startup command overrideCommand string (e.g. java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}).Overrides the egg's default startup command.
skip_scriptsSkip running the egg's install script1 (skip install scripts) or 0 (run scripts).Useful for instant setups without running initial bash scripts.
dedicated_ipRequire a dedicated IP address1 (dedicated unshared IP) or 0 (shared IP).Server allocation will be placed on an unshared IP address.
oom_killerLinux Out-Of-Memory killer1 (enable OOM killer) or 0 (disable OOM killer).When enabled, processes exceeding memory limits are terminated by the host OS.
start_on_completionAuto-start server upon creation1 (auto-boot) or 0 (leave offline).Automatically starts server container after installation completes.

E. Server Naming

Environment VariableDescriptionValue Format
servername (or server_name)Custom display name for the serverText string (e.g. My Survival World, Community Discord Bot).

F. Port Array Schemes

Environment VariableDescriptionValue FormatExample
port_arrayMap specific ports to egg variablesValid JSON string with SERVER_PORT{"SERVER_PORT": 25565, "RCON_PORT": 25575}

G. Dynamic Egg Environment Variables (Game Settings)

Every egg in Pterodactyl defines custom environment variables. Any of these variables can be set as the Environment Variable in Paymenter!

To find the exact variable names for your egg:

  1. In Pterodactyl Admin, go to Nests → Eggs → Click on your Egg.
  2. Scroll to the Variables section.
  3. Look at the Environment Variable column (e.g., MC_VERSION, SERVER_JARFILE, BEDROCK_VERSION, FIVEM_LICENSE).

Common Egg Variables

  • Minecraft (Paper / Spigot / Purpur / Vanilla):
    • SERVER_JARFILE: Name of the jar file (e.g. server.jar, paper.jar, purpur.jar).
    • MC_VERSION: Minecraft version (e.g. latest, 1.20.4, 1.19.4, 1.16.5).
    • BUILD_NUMBER: Software build number (e.g. latest).
  • Minecraft Bedrock:
    • BEDROCK_VERSION: Bedrock version (e.g. latest, 1.20.50.03).
  • FiveM:
    • FIVEM_LICENSE: FiveM server license key from Cfx.re Keymaster.
    • SERVER_HOSTNAME: FiveM server display name.
  • Rust:
    • RUST_BRANCH: Game branch (release, staging).
    • SERVER_SEED: World generation seed number.
    • WORLD_SIZE: Map size in meters (e.g. 3000, 4000).
  • Source Engine (CS2 / TF2 / GMod):
    • SRCDS_MAP: Default starting map (e.g. de_dust2).
    • SRCDS_TOKEN: Steam Game Server Login Token (GSLT).
  • Discord Bots (NodeJS / Python):
    • BOT_JS_FILE: Main executable script (e.g. index.js, main.py).
    • AUTO_UPDATE: 0 (off) or 1 (on).
    • GIT_ADDRESS: Git repository clone URL.

3. Step-by-Step Creation Examples

Example 1: RAM / Memory Dropdown (With Pricing & Upgrades)

Create a dropdown where customers choose their RAM allocation and can upgrade it anytime.

  1. Navigate to Admin Area → Configuration → Config Options and click Create.
  2. General Tab:
    • Name: Server RAM
    • Description: Select how much memory your server needs.
    • Environment Variable: memory
    • Type: Select (or Slider)
    • Upgradable: Checked (allows clients to upgrade later!)
    • Products: Select your game server product(s).
  3. Options Tab:
    • Click Add Option:
      • Name: 2 GB RAM
      • Environment Variable: 2048
      • Pricing: Base price (e.g., Free / $0.00)
    • Click Add Option:
      • Name: 4 GB RAM
      • Environment Variable: 4096
      • Pricing: Recurring (e.g., +$4.00 / month)
    • Click Add Option:
      • Name: 8 GB RAM
      • Environment Variable: 8192
      • Pricing: Recurring (e.g., +$12.00 / month)
  4. Click Create to save.

Example 2: Server Location Selector (Datacenter / City)

Allow clients to pick which datacenter hosts their server.

  1. Check your Location IDs in Pterodactyl Admin → Locations (e.g. Frankfurt is 1, New York is 2).
  2. In Paymenter, go to Config Options → Create.
  3. General Tab:
    • Name: Server Location
    • Description: Choose the location closest to your players.
    • Environment Variable: location
    • Type: Select (or Radio)
    • Products: Select your product(s).
  4. Options Tab:
    • Click Add Option:
      • Name: Frankfurt, Germany
      • Environment Variable: 1
    • Click Add Option:
      • Name: New York, USA
      • Environment Variable: 2
  5. Click Create to save.

Example 3: Extra Backups Addon

Sell optional backup slots to clients.

  1. Go to Config Options → Create.
  2. General Tab:
    • Name: Backup Slots
    • Description: Automated server backup snapshots.
    • Environment Variable: backups
    • Type: Select
    • Upgradable: Checked
    • Products: Select your product(s).
  3. Options Tab:
    • Option 1: Name: 1 Backup (Included), Environment Variable: 1, Price: Free.
    • Option 2: Name: 3 Backups, Environment Variable: 3, Price: +$1.00 / month.
    • Option 3: Name: 5 Backups, Environment Variable: 5, Price: +$2.50 / month.
  4. Click Create to save.

Example 4: Dedicated IP (Checkbox Option)

Add a simple one-click checkbox for a dedicated IP address.

  1. Go to Config Options → Create.
  2. General Tab:
    • Name: Dedicated IP
    • Description: Assign an exclusive, dedicated IP to your server.
    • Environment Variable: dedicated_ip
    • Type: Checkbox
    • Products: Select your product(s).
  3. Options Tab:
    • Click Add Option (Checkbox supports 1 child option):
      • Name: Dedicated IP Address
      • Environment Variable: 1
      • Pricing: Recurring +$3.00 / month.
  4. Click Create to save.

Example 5: FiveM License Key (Text Input)

Collect a customer's license key during order checkout.

  1. Go to Config Options → Create.
  2. General Tab:
    • Name: FiveM License Key
    • Description: Enter your key from keymaster.fivem.net.
    • Environment Variable: FIVEM_LICENSE
    • Type: Text
    • Products: Select your FiveM product(s).
  3. (No entries needed under the Options tab — customers type their key directly into a text field at checkout).
  4. Click Create to save.

Example 6: Custom Server Name (Text Input)

Allow customers to give their server a custom name upon order.

  1. Go to Config Options → Create.
  2. General Tab:
    • Name: Server Name
    • Description: Enter a custom name for your server.
    • Environment Variable: servername
    • Type: Text
    • Products: Select your product(s).
  3. Click Create to save.

4. Quick Rule-of-Thumb Checklist

  1. Exact Spelling:
    • Resource variables must be exact lowercase: memory, cpu, disk, swap, io, databases, backups, additional_allocations, location, node, egg_id.
    • Egg variables must match the exact case defined in your Pterodactyl egg (usually uppercase: MC_VERSION, SERVER_JARFILE, FIVEM_LICENSE).
  2. Correct Units:
    • RAM (memory), Disk (disk), and Swap (swap) are in MiB (1024 = 1 GB).
    • CPU (cpu) is in Percentage (100 = 1 thread/core).
    • Toggles (dedicated_ip, skip_scripts, oom_killer, start_on_completion) use 1 for Yes and 0 for No.
  3. Enable Upgrades:
    • Always check the Upgradable box for hardware limits (memory, cpu, disk, backups, additional_allocations) so customers can upgrade their plans without needing manual support tickets.

On this page