> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.clientexec.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Adding a Pterodactyl Server and Products

[Pterodactyl](https://pterodactyl.io/) is an open-source game server management panel built with PHP, React, and Go.

#### Supported Features

| Create | Suspend | Unsuspend | Terminate | **Change Package** | **Change Password** | **Client Area Link** |
| ---- |
| Yes | Yes | Yes | Yes | No | No | Yes |

#### Get Started 

Login to your Clientexec admin and navigate to **Settings > Products > Servers > Add Server**, and fill in the forms:

| Field Name | Description |
| ---- |
| Server Name | Friendly name, How you will see it inside ClientExec. |
| Hostname | Input the hostname of your Pterodactyl server. |
| Plugin | Pterodactyl.  (note: if you are on our hosted version and do not see this listed please refresh) |
| API Key | Your Pterodactyl API Key |
| Location Custom Field | The custom field name for the location custom field you will use (see below) |
| Username Custom Field | The custom field name for the username custom field you will use (see below) |
| Server Hostname Custom Field | The custom field name for the server hostname custom field you will use (see below) \* This will be available in CE 6.7.0 |

Click save changes, and then navigate back to the server and click **Test Connection** to ensure the API Key is working.

#### Configuring Custom fields

Once you have set up a server, you will need to set up the three custom fields. To do so, log into your Clientexec Admin Area and navigate to **Settings > Products > Custom Fields** > **Add Custom Field**.

Setup three custom fields:

###### Location:

**Field Name**: The name you set for the Locations Custom Field while setting up the server.
**Field Type**: Drop Down
**Options**: A comma-separated list of locations you have configured in Pterodactyl, such as: Location 1(1), Location 2(2).  The number in brackets should be the ID of each location.
**Is Required**: Yes
**Include in Signup**: Yes

###### Username:

**Field Name**: The name you set for the Username Custom Field while setting up the server.
**Field Type**: Text Field
**Is Required**: Yes
**Include in Signup**: Yes

###### Server Hostname: \* This will be available in CE 6.7.0 - do not add for earlier versions.

**Field Name**: The name you set for the Server Hostname Custom Field while setting up the server.
**Field Type**: Text Field
**Is Required**: Yes
**Include in Signup**: Yes

Go back and add these to your Server settings.

#### Creating Products

Navigate to **Settings > Products > Products**.

Create a new Product Group for your Game Servers, and make sure the type is Hosting. Add the custom fields you created to the product group.

Create a new product under your product group, and make sure you tick "**Hide hosting custom fields**".

Once you save changes, navigate to the **Advanced & Plugin Settings** tab and select your Pterodactyl server. Fill in the fields options for your server (these can be adjusted by your clients using Addons (see next section.)).

#### Creating Addons (\* This is available starting from CE 6.7.0, do not use for earlier versions.)

Using Addons, you can now sell or offer different upgrades and server settings to your clients.

For example, for a Minecraft Server, here is how you would set up an addon to allow your clients to select their 'Egg' (Server Type).

Go to **Settings** > **Products** > **Addons** and then click the **Add Product Addon** button.

1. Name the Addon. In our example we used 'Minecraft Server Type'
2. Select the Product Group that you added your Game Server too.

![](https://storage.crisp.chat/users/helpdesk/website/895a2775afb3f800/screenshot-2023-08-15-at-07-07_h0x9fw.png)

3. Go to the Advance Settings Tab.
4. In the Plugin Variable dropdown select Custom Variable.
5. In the input box put Egg ID.

![](https://storage.crisp.chat/users/helpdesk/website/895a2775afb3f800/screenshot-2023-08-15-at-07-10_p5luf2.png)

6. Click Save.
7.  Now go back to the new Addon you just created.
8. Scroll down and you can add the names and, if applicable, the prices for your various 'Eggs' that you are including for your clients to select. If there is no cost for the 'Egg' put 0.00 under the terms (such as 1 Month). In the Plugin Value box include the Egg ID number from Pterodactyl. See the image below for how we set it up.

![](https://storage.crisp.chat/users/helpdesk/website/895a2775afb3f800/screenshot-2023-08-15-at-07-13_120ferl.png)

9. Save Changes.
10. Now go to Settings > Products > Products and select the Product you would like to add this Addon too.
11. In the Addons tab, select the new Addon you just created, for type select Drop-down menus, and then save.

![](https://storage.crisp.chat/users/helpdesk/website/895a2775afb3f800/screenshot-2023-08-15-at-07-16_s7ryww.png)

Now lets repeat creating an addon to allow your Clients to select how much memory they would like on the server.

Again, go to **Settings** > **Products** > **Addons** and then click the **Add Product Addon** button.

1. Name the Addon, for this example we will use the name 'Server Memory'
2. Select the Product Group that you added your Game Server too.
3. Go to the Advance Settings Tab.
4. In the Plugin Variable dropdown select Custom Variable.
5. In the input box put Memory (MB).

![](https://storage.crisp.chat/users/helpdesk/website/895a2775afb3f800/screenshot-2023-08-15-at-07-19_pqolvz.png)

6. Click Save.
7.  Now go back to the new Addon you just created.
8. Scroll down and you can add the names and prices for your different memory settings that you are including for your clients to select. For example you can add 1 GB as an option - in the Plugin Value box add the size in MB, so 1 GB would be 1024. You can add additional options for your client to upgrade to. See the image:

![](https://storage.crisp.chat/users/helpdesk/website/895a2775afb3f800/screenshot-2023-08-15-at-07-22_1xcsmd2.png)

9. Save Changes.
10. Now go to Settings > Products > Products and select the Product you would like to add this Addon too.
11. In the Addons tab, select the new Addon you just created, for type select Drop-down menus, and then save.

You can repeat the above steps creating Addons for (use full name including what is in brackets for the Variable name) **CPU Limit (%)**, **Disk Space (MB)**, **Swap (MB)**, **IO Weight**, **Databases**, **Backups**, **Allocations**, **Nest ID**

You can use this for other custom Variables that you may make on your Pterodactyl Server such as Player Slots.

