# App Templates Tool

# About App Templates Tool

The App Templates tool allows you to manage ready-to-use application templates that clients can install directly on their virtual machines.

Templates are created in the Applications tab and grouped in the Groups tab, which can later be assigned to products.
This feature provides a simple way to manage templates and organize groups, ensuring clients can deploy preconfigured applications on their VPS with ease.

# Management

The App Templates section in the admin area consists of two main parts: Applications and Groups.
You can create templates under the Applications tab and gather them into groups under the Groups tab.
For clients to install applications on their VPS, the product must include an Application Group and allow App Templates in the client area.

# Applications

Read the guide carefully as it explains the key functions of the App Templates feature.
You can hide the information panel after reading by clicking the “Hide” button.

App Templates Tool: Configuration Guide panel in the Vultr VPS Applications page with the Hide menu arrow

Switch between Applications, ISO Images, Operating Systems, and Snapshots using the available tabs.
Keep in mind that the applications section differs per module. The following example comes from the Vultr VPS module.

App Templates Tool: Vultr VPS Applications page with the Applications, ISO Images, Operating Systems and Snapshots tabs

Use the refresh button to download and update the list of templates from your connected platform.

App Templates Tool: Applications list with the refresh button that loads templates from the connected platform

Once the templates are loaded, you can use the action buttons to edit, duplicate, or delete them.
Mass action buttons are also available for bulk operations.

App Templates Tool: Applications list with the edit, duplicate and delete action buttons highlighted in a row

# Groups

After preparing your templates, group them to make them available to clients through selected products.
Go to App Templates → Groups and click on Create.

App Templates Tool: Groups page with the list of application groups and the Create button

When creating a group, provide:

  • Name
  • Description
  • Templates to include
App Templates Tool: Create Group dialog with Name, Description and Items fields and the Confirm button

You can edit or delete groups individually or use mass actions to manage several at once.

App Templates Tool: Groups list with all rows selected, the mass Delete button and the edit and delete icons

To make templates available for installation, go to the product’s module settings and select the desired groups under App Templates Configuration → Default Application Group.
Also, ensure that the App Templates option is enabled under Client Area Features.

App Templates Tool: product module settings with the Default Application Group field in App Templates Configuration
App Templates Tool: product module settings with the App Templates switch enabled in Client Area Features

# Advanced Configuration

The App Templates feature supports detailed configuration, including manual application addition, user-data scripting, and advanced variables.
The examples below illustrate these options.

# Adding Applications Manually

  1. You can manually add a single application instead of importing all templates at once.
  2. Navigate to App Templates → Applications and click on Create.
App Templates Tool: Applications list with the Create button highlighted for adding an application manually
  1. List the supported applications provided by your virtualization platform’s API.
    Each platform has different API endpoints to retrieve application data.
    In the case of Vultr, the command to access the list can be found in the official documentation (opens new window).
    Make sure to include your API Key, the request looks like this:

    curl "https://api.vultr.com/v2/applications" \   
    -X GET \   
    -H "Authorization: Bearer ${VULTR_API_KEY}"   
    

    Example result:

    {
    "applications": [
    {
    "id": 1,
    "name": "LEMP",
    "short_name": "lemp",
    "deploy_name": "LEMP on CentOS 6 x64",
    "type": "one-click",
    "vendor": "vultr",
    "image_id": ""
    }
    
  2. Enter the application details such as Name, Description, Status, and optionally assign an icon.
    We recommend using the name or deploy_name from the API response for easier reference.

    App Templates Tool: Create App dialog with the Name field highlighted, plus Description, Status and Image fields
  3. Edit your new application and open the Setting Details section.
    Create entries based on the API output - each entry corresponds to a parameter used when deploying the application.

App Templates Tool: Edit application page with the Setting Details table, the Create button and edit icon highlighted

For example, if the API returns:

"id": 1,   
"image_id": "",   
"user_data": ""   

then create fields such as id, image_id, and optionally user_data if supported.

App Templates Tool: Edit Setting dialog with the Name and Default Value fields highlighted for the id parameter

Each field includes:

  • Name – the parameter name (same as in the API)
  • Default Value – the API’s value or your preferred default
  • Visibility – whether the client can modify the value
  • Validation – optional Laravel validation rule (opens new window), e.g. required
App Templates Tool: Edit application page with the Setting Details table of deployment parameters highlighted

# Including Cloud-Init / User-Data Scripts

If the selected application or system image supports user-data or cloud-init scripts, the user_data field will appear automatically.
This field lets you execute initialization tasks such as writing configuration files or running commands on first boot.

App Templates Tool: Edit application page for GitLab with the edit icon next to the user_data setting highlighted

Example:

#cloud-config
write_files:
 - path: /etc/motd
   content: |
     Welcome to your server, {$client.email}!

runcmd:
 - apt update
 - apt install nginx -y
App Templates Tool: Edit Setting dialog for user_data with a cloud-init script, required validation and Visibility

If Visibility is enabled, the client can modify the script before deployment. Otherwise, it will execute silently on creation.

App Templates Tool: WHMCS client area Install dialog with an editable User Data script field and the Confirm button

# How To Use Variables

You can use merge fields (variables) to dynamically insert values into script content or configuration fields.
Supported variables depend on the module and provisioning context. Examples include:

  • {$service.id} - the WHMCS service ID
  • {$client.email} - client’s email address
  • {$password} - the generated password for the instance
  • {$hostname} - server hostname
  • {$domain} - domain name of the service

Variables can be used in any editable text field, for example:

write_files:
 - path: /etc/motd
   content: |
     Welcome to {$hostname} managed by {$client.email}!