Personal tools
Namespaces

Variants
Actions

Amazon Lightsail For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
(About Amazon Lightsail For WHMCS)
 
(74 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<meta name="keywords" content="amazon lightsail for whmcs, amazon lightsail configuration, whmcs amazon lightsail management, whmcs amazon lightsail installation, whmcs amazon lightsail common problems, about whmcs amazon lightsail, whmcs amazon lightsail documentation, whmcs amazon lightsail faq, whmcs amazon lightsail help, whmcs amazon lightsail guide, whmcs amazon lightsail wiki, whmcs amazon lightsail tutorial, whmcs amazon lightsail tips, whmcs amazon lightsail wiki, aws lightsail, aws, amazon aws"></meta>
+
<meta name="keywords" content="amazon lightsail for whmcs, amazon lightsail configuration, whmcs amazon lightsail management, whmcs amazon lightsail installation, whmcs amazon lightsail common problems, about whmcs amazon lightsail, whmcs amazon lightsail documentation, whmcs amazon lightsail faq, whmcs amazon lightsail help, whmcs amazon lightsail guide, whmcs amazon lightsail wiki, whmcs amazon lightsail tutorial, whmcs amazon lightsail tips, whmcs amazon lightsail wiki, aws lightsail"></meta>
 
<meta name="description" content="ModulesGarden Wiki Contains All The Information You Need About The Amazon Lightsail For WHMCS Module."></meta>
 
<meta name="description" content="ModulesGarden Wiki Contains All The Information You Need About The Amazon Lightsail For WHMCS Module."></meta>
  
Line 29: Line 29:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ View Attached Disk Details;
+
|style="padding: 0px 0px 0px 30px;"|✔ View Attached Disk Details
 
|}
 
|}
 
{|
 
{|
Line 44: Line 44:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Choose Platform
+
|style="padding: 0px 0px 0px 45px;"|✔ Choose Platform:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ Linux/Unix
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ Microsoft Windows
 
|}
 
|}
 
{|
 
{|
 
|style="padding: 0px 0px 0px 45px;"|✔ Choose Blueprint
 
|style="padding: 0px 0px 0px 45px;"|✔ Choose Blueprint
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Choose Snapshot
 
|}
 
|}
 
{|
 
{|
 
|style="padding: 0px 0px 0px 45px;"|✔ Choose Instance Plan
 
|style="padding: 0px 0px 0px 45px;"|✔ Choose Instance Plan
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Snapshots Limit
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Choose Email Template
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Tag Name
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Random Domain Prefix
 
|}
 
|}
 
{|
 
{|
 
|style="padding: 0px 0px 0px 45px;"|✔ Provide User Data Script
 
|style="padding: 0px 0px 0px 45px;"|✔ Provide User Data Script
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Provide Displayed Client Area Merge Fields Variables
 
|}
 
|}
 
{|
 
{|
Line 76: Line 100:
 
{|
 
{|
 
|style="padding: 0px 0px 0px 30px;"|✔ View Server Status And Details
 
|style="padding: 0px 0px 0px 30px;"|✔ View Server Status And Details
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ View Provided Merge Field Variables
 
|}
 
|}
 
{|
 
{|
Line 93: Line 120:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ View Usage Graphs Within Given Time Period
+
|style="padding: 0px 0px 0px 30px;"|✔ View Usage Graphs For Given Time Period
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ View/Create/Edit/Delete Firewall Rules
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ View/Create/Restore/Delete Snapshots
 
|}
 
|}
 
{|
 
{|
Line 101: Line 134:
 
{|
 
{|
 
|style="padding: 10px 0px 0px 30px;"|✔ Region
 
|style="padding: 10px 0px 0px 30px;"|✔ Region
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ Blueprint
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ Snapshot
 
|}
 
|}
 
{|
 
{|
Line 106: Line 145:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 10px 30px;"|✔ Blueprint
+
|style="padding: 0px 0px 0px 30px;"|✔ Static IP Address
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 30px;"|✔ Snapshots Limit
 
|}
 
|}
 
*'''Available Blueprints:'''
 
*'''Available Blueprints:'''
Line 189: Line 231:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports PHP 7.1 Up To PHP 7.3
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports PHP 8.1 Back To PHP 7.4
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS Template Six
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS Themes "Six" And "Twenty-One"
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS V7.7 And Later
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS V8.10 Back To WHMCS V8.6
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 30px;"|✔ Easy Module Upgrade To [https://www.modulesgarden.com/products/whmcs/amazon-lightsail#open-source-version Open Source Version]
+
|style="padding: 0px 0px 0px 30px;"|✔ Requires ionCube Loader V12 Or Later
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 30px;"|✔ Easy [https://www.docs.modulesgarden.com/How_To_Upgrade_WHMCS_Module Module Upgrade] To [https://www.modulesgarden.com/products/whmcs/amazon-lightsail#open-source-version Open Source Version]
 
|}
 
|}
  
Line 254: Line 299:
 
==Configuration of Server==
 
==Configuration of Server==
 
{|
 
{|
|style="padding: 10px 0px 15px 0px;"|'''Before you can go on, you must generate your Amazon Lightsail access details. You will need them to connect with the server successfully.'''<br/>
+
|style="padding: 10px 0px 15px 0px;"|'''Before you can continue, you must generate your Amazon Lightsail access details. You will need them to connect with the server successfully.'''<br/>
 
Underneath, you will find detailed instructions on where to find this information.
 
Underneath, you will find detailed instructions on where to find this information.
 
|}
 
|}
Line 276: Line 321:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''10. A modal with Access Key ID and Secret Access Key will appear, so copy it and keep safe. You may also download a suitable file with the details. '''<br/>
+
|style="padding: 0px 0px 15px 15px;"|'''10. A modal with Access Key ID and Secret Access Key will appear, so copy this information and keep it safe. You may also download a suitable file with these details. '''<br/>
Note that this is the only place where you can later on find the corresponding secret key, it will not be visible next to the Key ID in the panel.
+
'' '''Note:''' This is the only place where you can find the corresponding secret key later. It will not be visible next to the Key ID in the panel.
 
|}
 
|}
 
{|
 
{|
Line 283: Line 328:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''11. Now, log in to your WHMCS and proceed to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Servers' '' and press '' 'Add New Server'.''<br/>
+
|style="padding: 0px 0px 20px 15px;"|'''11. Now, log in to your WHMCS and proceed to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Servers' '' and press '' 'Add New Server'.''
 
+
'' '''Note:''' If you have WHMCS V7.8.X or later, we recommend using 'previous experience' of server configuration instead of the new wizard tool.''
+
 
|}
 
|}
 
{|
 
{|
Line 294: Line 337:
 
Now, provide the previously generated '' 'Access Key ID' '' and '' 'Secret Access Key'.'' Then, check the connection and if successful, save the changes.<br/>
 
Now, provide the previously generated '' 'Access Key ID' '' and '' 'Secret Access Key'.'' Then, check the connection and if successful, save the changes.<br/>
  
'' '''Important:''' If you are using '''WHMCS V7.8.X''', then a fatal error may occur when trying to save server settings without providing any hostname or IP address details, even if the module configuration does not require them. <br/> In this case, try to provide '''anything''' in the hostname field. For this reason, 'Test Connection' may sometimes not work either. Please note that this is a bug occurring in WHMCS, not the module itself.''
+
'' '''Important:''' If you are using '''WHMCS V7.8.X''', then a fatal error may occur when trying to save server settings without providing any hostname or IP address details, even if the module configuration does not require them. <br/> In this case, try to provide '''anything''' in the hostname field. For this reason, 'Test Connection' may sometimes not work. Please note that this is a bug that occurs in WHMCS, not the module itself.''
 
|}
 
|}
 
{|
 
{|
Line 300: Line 343:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''13. It is time to create a server group. To do so, click on '' 'Create Server Group' ''.'''
+
|style="padding: 0px 0px 20px 15px;"|'''13. Now, it is time to create a server group. To do so, click on '' 'Create Server Group' ''.'''
 
|}
 
|}
 
{|
 
{|
Line 312: Line 355:
 
|}
 
|}
  
==Configuration of Product==
+
==Configuration of Product==  
 
{|
 
{|
 
|style="padding: 10px 0px 15px 15px;"|'''15. In order to create and configure a product, go to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Products/Services'.'''''<br />
 
|style="padding: 10px 0px 15px 15px;"|'''15. In order to create and configure a product, go to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Products/Services'.'''''<br />
Line 345: Line 388:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:ALS_18.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_18.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''20. Now, you can start configuring the settings of the offered server.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''20. Now, you can start configuring the settings of the offered server.'''<br />
 +
<div id="tagname_20"></div>
 
Just like when creating a new virtual machine in your Lightsail panel, here also you can configure such options as:
 
Just like when creating a new virtual machine in your Lightsail panel, here also you can configure such options as:
 
* '''Region''' - Choose a geographical area with a set of Lightsail resources. The closer the instance is to your users, the less latency they will experience.
 
* '''Region''' - Choose a geographical area with a set of Lightsail resources. The closer the instance is to your users, the less latency they will experience.
Line 356: Line 400:
 
* '''Platform''' - Lightsail images are available on two platforms: '' 'Linux/Unix' '' or '' 'Windows' ''. Once you choose a platform, you can select a corresponding blueprint of the operating system.
 
* '''Platform''' - Lightsail images are available on two platforms: '' 'Linux/Unix' '' or '' 'Windows' ''. Once you choose a platform, you can select a corresponding blueprint of the operating system.
  
* '''Blueprint''' - select which base operating system (OS) with or without preinstalled application should be installed. You can select between an Ubuntu Server image with an application or development stack preinstalled, or a Windows OS with SQL Server 2016 Express preinstalled. Note that available options depend on the previously selected '' 'Platform' '' and some blueprints cannot be launched with certain Instance Plans.
+
* '''Snapshot''' - select which of the created system snapshots will be used to base the VM installation on. If you select '' 'None','' the following '' 'Blueprint' '' option will be used to base the installation.
  
* '''Instance Plan''' - Select resources available for the instance. Please note that the better the instance resources, the higher the monthly costs.  Moreover, some blueprints require more powerful resources. You can read more about Amazon Lightsail pricing [https://aws.amazon.com/lightsail/pricing/ here.]
+
* '''Blueprint''' - select which base operating system (OS) with or without a preinstalled application should be installed. You can select between an Ubuntu Server image with an application or development stack preinstalled, <br/> or a Windows OS with SQL Server 2016 Express preinstalled. Note that available options depend on the previously selected '' 'Platform' '' and some blueprints cannot be launched with certain Instance Plans.
  
* '''Tag Name''' - Define a tag name; this label will be assigned to Lightsail resources.
+
* '''Instance Plan''' - Select resources available for the instance. Please note that the better the instance resources, the higher the monthly costs.  Moreover, some blueprints require more powerful resources. <br/>You can read more about Amazon Lightsail pricing [https://aws.amazon.com/lightsail/pricing/ here.]
  
* '''Static IP Address''' - Decide whether to assign to an instance a static, fixed and public IP address. Note that this will be done a moment after instance creation during the next cron execution. You can find out more about Lightsail static IP addresses [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-create-static-ip here.]
+
* '''Snapshots Limit''' - Set a limit for a maximum number of taken manual snapshots that the client can have at a given time. Set -1 for unlimited. <br/> Please remember that Amazon takes fees for each snapshot - click [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-instance-snapshots-in-amazon-lightsail here] to find out more.
 +
 
 +
* '''Log API Requests''' - Enable to allow storing information on API requests in the '' 'Module Log' '' section in your WHMCS.
 +
 
 +
* '''Email Template''' - Choose an email template that will be used to send messages to clients after the successful creation of the instance.
 +
 
 +
* '''Tag Name''' - Define a tag name; this label will be assigned to Lightsail resources. 
 +
 
 +
* '''Static IP Address''' - Decide whether to assign to an instance a static, fixed, and public IP address. Note that his will be done a moment after instance creation during the next cron execution. <br/>You can find out more about Lightsail static IP addresses [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-create-static-ip here.]
 +
 
 +
* '''Auto Generate SSH Key''' - If you enable, SSH key pairs will be automatically generated if clients do not provide them during the instance creation.
  
 
* '''User Data''' - You can specify user data to configure an instance or to run a configuration script during launch. This field is optional.<br/> Tutorial on how to use this option can be found [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-configure-server-additional-data-shell-script here].  
 
* '''User Data''' - You can specify user data to configure an instance or to run a configuration script during launch. This field is optional.<br/> Tutorial on how to use this option can be found [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-configure-server-additional-data-shell-script here].  
  
* '''Log API Requests''' - Enable to allow storing information on API requests in the '' 'Module Log' '' section in your WHMCS.
+
* '''Client Area Section''' - Here you may provide the HTML code and display the content in the client area. Before using this option, please make sure that you are familiar with the instruction that can be found [[#Client Area Section |here]].
 +
 
 +
* '''Random Domain Prefix''' - Here you can provide the domain prefix that will be applied if the domain has not been provided.<br/> You may use WHMCS parameters e.g. {$hostname} or any other valid hostname characters (a-z, A-Z, 0-9,. and -)
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:ALS_19.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_19.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''21. Next, choose which client area features shall be available for your clients.
+
|style="padding: 0px 0px 20px 15px;"|'''21. Next, choose which client area features will be available for your clients.
 
|}
 
|}
 
{|
 
{|
Line 379: Line 435:
 
{|
 
{|
 
|style="padding: 0px 0px 15px 15px;"|'''22. At the end of the configuration process, you can decide whether you want to generate configurable options for the product.'''<br/>
 
|style="padding: 0px 0px 15px 15px;"|'''22. At the end of the configuration process, you can decide whether you want to generate configurable options for the product.'''<br/>
Configurable options can be used by your clients to select each virtual machine parameters individually during order placement.<br/>Otherwise, if configurable options are not defined, then the fixed parameters specified in the earlier configuration will be used instead.
+
Configurable options can be used by your clients to select each virtual machine parameters individually while placing an order.<br/>Otherwise, if configurable options are not defined, then the fixed parameters specified in the earlier configuration will be used instead.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:ALS_21.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_21.png]]
 
|}
 
|}
 
{|
 
{|
Line 388: Line 444:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:ALS_22.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_22.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 15px;"|Finally, when everything is set, do not forget to ''Save Changes''.
+
|style="padding: 0px 0px 30px 15px;"|Finally, when everything is set, do not forget to '' 'Save Changes' ''.
 
|}
 
|}
 
{|
 
{|
 +
===Client Area Section===
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|The '' 'Client Area Section' '' option gives you the possibility to provide the HTML code and display the content in the client area. <br/>Before using this option, please make sure that you are familiar with the following instruction. <br/>
 +
'''Important!''' If you come across some errors with displaying values in the client area, please check if you closed brackets '''{}'''. <br/><br/>
 +
1. ''The values that can be displayed in the client area:'' <br/>
 +
<pre>{$serviceid}, {$pid}, {$serverid}, {$domain}, {$username}, {$password}, {$producttype}, {$moduletype}, {$configoptionX}, {$server}, {$serverip}, {$serverhostname},
 +
{$serverusername},{$serverpassword}, {$serveraccesshash}, {$serversecure}, {$serverport}, {$bundles}, {$region}, {$zone}, {$platform}, {$snapshot}, {$blueprint}, {$snapshotsLimit},
 +
{$tagName}, {$userData}, {$emailTemplate}, {$userid}, {$orderid}, {$packageid}, {$server}, {$regdate}, {$domain}, {$paymentmethod},{$firstpaymentamount}, {$amount},
 +
{$billingcycle}, {$nextduedate}, {$nextinvoicedate}, {$termination_date}, {$completed_date}, {$domainstatus}, {$username}, {$password}, {$notes}, {$subscriptionid},
 +
{$promoid}, {$suspendreason}, {$overideautosuspend}, {$overidesuspenduntil}, {$dedicatedip}, {$assignedips}, {$ns1}, {$ns2}, {$diskusage}, {$disklimit}, {$bwusage},
 +
{$bwlimit}, {$lastupdate} </pre>
 +
 +
2. ''On/Off values that you can choose from:'' <br/>
 +
<pre>{$clientAreaHistory}, {$clientAreaMetric}, {$clientAreaShowDisk}, {$logApiRequests}, {$staticIpAddress}, {$clientAreafirewall}, {$clientAreasnapshots},
 +
{$autoGenerateSSHKey}, {$clientAreaServiceActions} </pre>
 +
 +
3. ''Access values provided in Arrays: '' <br/> <br/> Please make sure that the provided value complies with this pattern '''{$ arrayName . fieldName }''' for example: {$customfields.InstanceTags}, {$clientsdetails.city} <br/>
 +
* '''{$clientsdetails} ''': <br/>
 +
<pre>{.userid}, {.id}, {.uuid}, {.firstname}, {.lastname}, {.fullname}, {.companyname}, {.email}, {.address1}, {.address2}, {.city}, {.fullstate}, {.state},
 +
{.postcode}, {.countrycode}, {.country}, {.phonenumber}, {.tax_id}, {.password}, {.statecode}, {.countryname}, {.phonecc}, {.phonenumberformatted}, {.telephoneNumber},
 +
{.billingcid}, {.notes}, {.twofaenabled}, {.currency}, {.defaultgateway}, {.cctype}, {.cclastfour}, {.gatewayid}, {.securityqid}, {.securityqans}, {.groupid}, {.status},
 +
{.credit}, {.taxexempt}, {.latefeeoveride}, {.overideduenotices}, {.separateinvoices}, {.disableautocc}, {.emailoptout}, {.marketing_emails_opt_in}, {.overrideautoclose},
 +
{.allowSingleSignOn}, {.email_verified}, {.language}, {.isOptedInToMarketingEmails}, {.lastlogin} </pre>
 +
* '''{.email_preferences} ''': <br/>
 +
<pre>{.general}, {.invoice}, {.support}, {.product}, {.domain}, {.affiliate} </pre>
 +
* '''{$customfields} ''':<br/>
 +
<pre>{.InstanceId}, {.InstanceTags}, {.sshKey} </pre><br/>
 +
As an example, we provide:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_22_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"| As you can see, all data is available here:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:ALS1_22_2.png]]
 +
|}
 +
 
===SSH Keys===
 
===SSH Keys===
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|'''In the '' 'Custom Fields' '' tab you will find a '' 'SSH Public Key' '' field which is displayed to clients on the [[#Ordering|order form]] by default.'''<br/>
+
|style="padding: 10px 0px 15px 15px;"|'''In the '' 'Custom Fields' '' tab you will find an '' 'SSH Public Key' '' field which is displayed to clients on the [[#Ordering|order form]] by default.'''<br/>
  
 
'' Please be aware that this field can be left as '''optional''' for '''Linux/Unix''' as well as '''Windows''' platforms. <br/> Int that case the necessary keys will be generated by Amazon itself and will be displayed in the 'Connection Details' window.''
 
'' Please be aware that this field can be left as '''optional''' for '''Linux/Unix''' as well as '''Windows''' platforms. <br/> Int that case the necessary keys will be generated by Amazon itself and will be displayed in the 'Connection Details' window.''
Line 421: Line 516:
 
{|
 
{|
 
|style="padding: 10px 0px 15px 15px;"|''' Amazon Lightsail For WHMCS allows you to monitor and manage your customer server instance from the admin area of your WHMCS system.'''<br />
 
|style="padding: 10px 0px 15px 15px;"|''' Amazon Lightsail For WHMCS allows you to monitor and manage your customer server instance from the admin area of your WHMCS system.'''<br />
This includes the supervision of such features like:
+
This includes the supervision of such features as:
 
# Configurable options which enable you to view the chosen server details
 
# Configurable options which enable you to view the chosen server details
# Module commands to allow easy and quick management of the server<br/> '' '''Important:''' Currently ''Change Package'' command can be only used for enabling or disabling the '' 'Static IP Address' '' option. <br/>The change of the instance plan is currently not supported due to the complex nature of its [https://aws.amazon.com/premiumsupport/knowledge-center/change-lightsail-plan/ implementation.]
+
# Module commands to allow easy and quick management of the server<br/> '' '''Important:''' Since version 1.3.0 of the module the 'Change Package' command can be used for enabling or disabling the '' 'Static IP Address' '' option as well as changing the '' 'Instance Plan'.'' ''  <!--due to the complex nature of its [https://aws.amazon.com/premiumsupport/knowledge-center/change-lightsail-plan/ implementation.]-->
 
# Service actions, including: ''Start'', ''Stop'' and ''Reboot'' the server as well as display ''Connection Details'' for remote connection to the instance
 
# Service actions, including: ''Start'', ''Stop'' and ''Reboot'' the server as well as display ''Connection Details'' for remote connection to the instance
 
# Instance details that provide the current status, resources and options set
 
# Instance details that provide the current status, resources and options set
Line 435: Line 530:
 
==Ordering==
 
==Ordering==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|Owing to configurable options, you are able to offer a product which your clients can tailor according to their needs.<br />Additionally, you are able to set up pricing for each configurable option, which makes your offer even more competitive.<br/>
+
|style="padding: 10px 0px 15px 15px;"|Due to configurable options, you are able to offer a product which your clients can tailor to their needs.<br />Additionally, you are able to set up pricing for each configurable option, which makes your offer even more competitive.<br/>
  
At this moment cliens can also optionally provide their public [[#SSH Keys|SSH key]]. <br/>
+
At this moment clients can also optionally provide their public [[#SSH Keys|SSH key]]. <br/>
 
Please note that this key should be in one of the ''OpenSSH'' standard formats which are supported by API, e.g. ''ssh-rsa''.
 
Please note that this key should be in one of the ''OpenSSH'' standard formats which are supported by API, e.g. ''ssh-rsa''.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:ALS_25.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:ALS1_25.png]]
 
|}
 
|}
  
Line 448: Line 543:
 
|style="padding: 10px 0px 15px 15px;"|Client area interface of Amazon Lightsail should look like the one on the screen below.<br/>As you can see, the control panel contains useful details of a managed server.<br />
 
|style="padding: 10px 0px 15px 15px;"|Client area interface of Amazon Lightsail should look like the one on the screen below.<br/>As you can see, the control panel contains useful details of a managed server.<br />
 
The module allows your customers to easily start, stop and reboot their server instance through pressing the corresponding buttons.<br />
 
The module allows your customers to easily start, stop and reboot their server instance through pressing the corresponding buttons.<br />
Clients can also check the server status with its details, view assigned public and private IP addresses, view disk details as well as control the list of currently scheduled tasks.
+
Clients can also take instance snapshots, manage firewalls, check the server status with its details, view assigned public and private IP addresses. <br/>
 +
Moreover, it is easy to see disk details, access usage graphs, as well as control the list of currently scheduled tasks.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:ALS_26.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_26.png]]
 
|}
 
|}
 
{|
 
{|
Line 458: Line 554:
 
This data will vary depending on whether the instance is based on Linux/Unix or Windows as well as on whether the public SSH key was provided during the order. <br/>
 
This data will vary depending on whether the instance is based on Linux/Unix or Windows as well as on whether the public SSH key was provided during the order. <br/>
  
To connect to an instance on the '''Linux/Unix''' platform, clients can use an '''SSH''' client application such as PuTTY ([https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-set-up-putty-to-connect-using-ssh learn more]).<br/> Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, username, and private or associated public SSH key. <br/>
+
To connect to an instance on the '''Linux/Unix''' platform, clients can use an '''SSH''' client application. <!--([https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-set-up-putty-to-connect-using-ssh learn more])<br/> Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, username, and private or associated public SSH key. <br/>  --><br/>
 
+
Here is a short guide on how to connect with '''openSSH''':
 +
* Create a file (e.g. id_rsa) with SSH Private Key
 +
* Create a file with a .pub extension (e.g. id_rsa.pub), with the contents of the SSH Cert Key
 +
* Run the command:
 +
  ssh username@ip -i ida_rsa
 +
Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, username, and private or associated public SSH key.
 +
<br/>
 
For '''Windows'''-based instances, clients can also connect to their instance using an '''RDP''' client such as Remote Desktop Connection ([https://lightsail.aws.amazon.com/ls/docs/en_us/articles/connect-to-your-windows-based-instance-using-amazon-lightsail learn more]).<br/> Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, Windows username and generated password in its decoded or encoded form. <br/> If Windows password is encoded it can still be somehow decrypted using [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/use-non-default-key-with-windows-based-instance-in-lightsail this Amazon method.]
 
For '''Windows'''-based instances, clients can also connect to their instance using an '''RDP''' client such as Remote Desktop Connection ([https://lightsail.aws.amazon.com/ls/docs/en_us/articles/connect-to-your-windows-based-instance-using-amazon-lightsail learn more]).<br/> Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, Windows username and generated password in its decoded or encoded form. <br/> If Windows password is encoded it can still be somehow decrypted using [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/use-non-default-key-with-windows-based-instance-in-lightsail this Amazon method.]
 
|}
 
|}
Line 471: Line 573:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:ALS_28.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:ALS1_28.png]]
 
|}
 
|}
  
Line 480: Line 582:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:ALS_29.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:ALS1_29.png]]
 +
|}
 +
 
 +
===Firewall===
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|In the '' 'Firewall' '' section clients can manage their firewall settings to control which ports are open to the public.<br/>
 +
Note that when a Lightsail instance is created, some network ports are open by default so the instance can accept public network connections.<br/>
 +
 
 +
Clients can add here new rules, edit existing ones or delete them.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 25px;"|[[File:ALS1_30.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|When adding or editing an existing rule, clients manually control which ports and protocols (''TCP'' or ''UDP'') on their instances will accept connections. <br/> The selection of predefined application rules are also available so that protocol and port range fields will be automatically fulfilled.<br/>
 +
You can also find a complete list of port settings, application layer protocol types, and transport layer protocol types in [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-firewall-and-port-mappings-in-amazon-lightsail this Amazon documentation].
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:ALS_31.png]]
 +
|}
 +
 
 +
===Snapshots===
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|A snapshot is a point in time backup of the client's instance. <br/>
 +
In the snapshots section clients can create new snapshots of their instances, view previous snapshots or restore instance from a snapshot.<br/>
 +
The number of allowed snapshots the client can have taken at given time can be limited in the product's [[#Configuration_of_Product|module settings]] or by configurable options.<br>
 +
 
 +
Please note that Amazon also takes [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-instance-snapshots-in-amazon-lightsail additional fees] for each created snapshot.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_32.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|To create a new snapshot simply provide its name and press the '' 'Create' '' button. <br/>
 +
 
 +
Note that the name can contain from 2 to 200 characters which can be only alphanumeric, numbers, periods, dashes or underscores.<br/>
 +
If Windows is used for instance, it should be also stopped before creating a snapshot.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:ALS_33.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Once the snapshot is created, it can be restored using the following button.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:ALS1_34.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Before restoring a snapshot remember that all previous data on the disk will be lost.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:ALS_35.png]]
 +
|}
 +
 
 +
==Importing Existing VM==
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|In this section, you can find short instruction on how to connect one of your clients to your already existing virtual machine. <br/> Take the following steps to make sure that the process will be carried out properly. <br/>
 +
1. Firstly, manually create an order for your customer in WHMCS. Choose a client and in the summary, view click on the '' ' Add New Order' '' button. Next, select a '' 'Product/Service' '' and press '' 'Submit Order' ''. <br/> '''What is important, do not perform the '' 'Create' '' action.''' The status has to remain as '' 'Pending' ''. <br/> More info about placing orders can be found [https://docs.whmcs.com/Order_Management#Placing_an_Order here]<br/>
 +
2. Proceed to the newly created product's card in your admin area. Find the following field:
 +
*'''Instance ID'''
 +
Now, fill out the field with the ID of the machine that you wish to assign to this client.<br/> If you completed the required data, now change the status from '' 'Pending' '' to '' 'Active' '' and '' 'Save Changes' ''.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:Photo_AL.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|3. If the completed data is correct, after refreshing the page, you will see the attached virtual machine. <br/> '''Important!'''  Remember to manually add other missing parameters of the VM such as domains, credentials, IP Addresses, configurable options, SSH Key, billing cycle, etc. so they match the parameters of the attached VM.
 
|}
 
|}
  
 
=Tips=
 
=Tips=
 
{|
 
{|
|style="padding: 10px 0px 10px 15px;"|1. In case you need to generate any of the configurable options once again, you must delete the previously created ones.<br/> Only then will it be possible to generate a new configurable option. Read more about configurable options [https://www.docs.modulesgarden.com/General#How_To_Use_Configurable_Options here].
+
|style="padding: 10px 0px 10px 15px;"|1. If you need to generate any of the configurable options once again, you must delete the previously created ones.<br/> Only then will it be possible to generate a new configurable option. Read more about configurable options [https://www.docs.modulesgarden.com/General#How_To_Use_Configurable_Options here].
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 15px;"|2. When you upgrade WHMCS, please be aware that the module uses custom modified AWS files located in the main WHMCS '' 'vendor' '' directory, and their unmodified versions are also delivered by WHMCS itself. <br/>In this case, the WHMCS upgrade may overwrite these files to their default form so you may need to overwrite these files again with the files delivered with the module.  
+
|style="padding: 0px 0px 10px 15px;"|2. When you upgrade WHMCS, please be aware that the module uses custom modified AWS files located in the main WHMCS '' 'vendor' '' directory, and their unmodified versions are also delivered by WHMCS itself. <br/>In this case, the WHMCS upgrade may overwrite these files to their default form so you may need to overwrite these files again with the files delivered with the module.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|3. Names of snapshots created by clients will have added prefixes with instance domains visible only in your Amazon Lightsail panel.<br/>
 +
This is because Amazon requires snapshot names to be unique to each AWS Region in your Lightsail account, not just within a single instance.<br/>
 +
Otherwise, customers at WHMCS could often see the message that a particular snapshot name has already been taken up by someone else.<br/>
 +
For the domain prefix name, 55 characters from 255 previously available for the snapshot name have been reserved .
 +
|}
 +
==How To Use Language Overrides==
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|'''Incorporating language customizations - the module readily accommodates language overrides, allowing you to tailor the language files to your preferences.'''<br/> The language file english.php remains unencoded and can be modified to suit your needs. However, it's recommended to avoid altering the core file itself, and instead, leverage the capability of using overrides.<br/>
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Here's how to apply language overrides:
 +
* Navigate to the ''~/langs/'' directory located within the following ''yourWHMCS/modules/servers/moduleName/langs/'' path.
 +
* Within this directory, create a new file or duplicate the language file you intend to modify. For instance, if you wish to create an override for the English language, establish the following directory structure:
 +
  ''~/langs/overrides/english.php''.
 +
* Open the newly created override file to edit its contents.
 +
* At the beginning of the file, indicate the used code, for instance, you can use: '''<?php''' for PHP code.
 +
* Adapt the file content according to your requirements. You can either selectively modify specific variables or opt to revise the entire content of the language file.
 +
 
 +
For example:
 +
 
 +
'''Original ''yourWHMCS/modules/servers/moduleName/langs/english.php:'''''
 +
 
 +
  $_LANG['Search'] = 'Search';
 +
 
 +
'''Override ''yourWHMCS/modules/servers/moduleName/langs/overrides/english.php:''''' 
 +
 
 +
  $_LANG['Search'] = 'Look for';
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|By following these steps, you can seamlessly implement language customizations without altering the core language file, ensuring your changes will not be lost after every module update.<br/>
 +
 
 +
Remember that some of the modules have more than one language file, located under ''/addons'' and ''/servers'' paths. You may create the override files for both of them.<br/> Note that you do not need to paste all the original content of the lang file into the override file. Enter there only the lines that you wish to change, every other line will be fetched from the original module lang file.<br/> Consequently, the override lang file might include only one or just a few lines.
 
|}
 
|}
  
 
=Update Instructions=
 
=Update Instructions=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|Essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.<br/><br/>
+
|style="padding: 10px 0px 30px 15px;"|An essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.<br/>
Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!<br/>
+
Ensure successful completion of the module update by carefully following each step, thereby preventing data loss or any unforeseen issues.<br/> Additionally, you will find a current list of supplementary actions necessary for a smooth update process there.<br/><br/>
To take advantage of it, simply use the '''License Upgrade''' button located on the product's page and a discounted invoice will be generated automatically.<br/>
+
After the module update we '''strongly recommend''' to open one of the '''product's module settings''' tab to make sure that all upgrading processes have been completed successfully.
 
|}
 
|}
 +
=Upgrade Guide=
 +
{|
 +
|style="padding: 10px 0px 30px 15px;"|Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?<br/> There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment.<br/>
 +
 +
Opt for the [https://www.modulesgarden.com/products/whmcs/amazon-lightsail#open-source-version Open Source version] of your Amazon Lightsail For WHMCS module to unlock these benefits.<br/> Simply click on either the '''Get Source Code''' or '''Upgrade To Lifetime''' button found on the product's page in our client area to complete the one-step upgrade process, with a '''dedicated discount''' already applied.<br/>
 +
 +
Follow a [https://www.docs.modulesgarden.com/How_To_Upgrade_WHMCS_Module comprehensive guide] covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized.
 +
|}
 +
 
=Common Problems=
 
=Common Problems=
 
{|
 
{|
Line 505: Line 716:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 15px;"|3. If you are using '''WHMCS V7.8.X''', a fatal error may occur when trying to save server settings without providing any hostname or IP address details.<br/>Our module does not require this field to be filled out, but in that case, try to provide '''anything''' in the hostname field. Please note that this is a bug occurring in WHMCS, not the module itself.
+
|style="padding: 0px 0px 10px 15px;"|3. If you are using '''WHMCS V7.8.X''', a fatal error may occur when trying to save server settings without providing any hostname or IP address details.<br/>Our module does not require this field to be filled out, but in that case, try to provide '''anything''' in the hostname field. Please note that this is a bug that occurs in WHMCS, not in the module itself.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|4. Currently, issues have been observed when using the PuTTY client application to connect to an instance on the Linux/Unix platform. We recommend using OpenSSH for connection instead.
 +
|}

Latest revision as of 12:46, 26 April 2024

Contents

[edit] About Amazon Lightsail For WHMCS

Amazon Lightsail For WHMCS will enhance your AWS provisioning business by letting you provide and manage Amazon Lightsail instances straight from your WHMCS system.

Your clients will receive the chance to handle their machines remotely through start, stop, and reboot options as well as access flexible graphs on their server usage.
Moreover, the module allows you to adjust all product features, and supervise the status of each supplied machine at all times.

  • Admin Area Features:
✔ Create/Suspend/Unsuspend/Terminate Server
✔ Start/Stop/Reboot Server
✔ Toggle Static IP Address
✔ View Server Status And Details
✔ View Remote Connection Details
✔ View Assigned Public And Private IP Addresses
✔ View Attached Disk Details
✔ View Scheduled Tasks
✔ Configure Product Details:
✔ Choose Region
✔ Choose Availability Zone
✔ Choose Platform:
✔ Linux/Unix
✔ Microsoft Windows
✔ Choose Blueprint
✔ Choose Snapshot
✔ Choose Instance Plan
✔ Define Snapshots Limit
✔ Choose Email Template
✔ Define Tag Name
✔ Define Random Domain Prefix
✔ Provide User Data Script
✔ Provide Displayed Client Area Merge Fields Variables
✔ Toggle Static IP Address
✔ Toggle API Request Logging
✔ Choose Client Area Features
✔ Generate Configurable Options
✔ Run API Connection Test
  • Client Area Features:
✔ Start/Stop/Reboot Server
✔ View Server Status And Details
✔ View Provided Merge Field Variables
✔ View Remote Connection Details
✔ View Assigned Public And Private IP Addresses
✔ View Attached Disk Details
✔ View Scheduled Tasks
✔ View Tasks History
✔ View Usage Graphs For Given Time Period
✔ View/Create/Edit/Delete Firewall Rules
✔ View/Create/Restore/Delete Snapshots
✔ Provide SSH Key During Order
  • Configurable Options:
✔ Region
✔ Blueprint
✔ Snapshot
✔ Instance Plan
✔ Static IP Address
✔ Snapshots Limit
  • Available Blueprints:
✔ Linux/Unix Applications:
✔ Drupal
✔ GitLab CE
✔ Joomla
✔ LAMP (PHP 7)
✔ MEAN
✔ Magento
✔ Nginx
✔ Node.js
✔ Plesk Hosting Stack
✔ Redmine
✔ WordPress
✔ WordPress MultiSite
✔ Linux/Unix OS:
✔ Amazon Linux
✔ CentOS
✔ Debian
✔ FreeBSD
✔ openSUSE
✔ Ubuntu
✔ Microsoft Windows:
✔ SQL Server 2016 Express
✔ Windows Server 2012 R2
✔ Windows Server 2016
✔ Any Other Applications And OS When Available
  • General Info:
✔ Multi-Language Support
✔ Supports PHP 8.1 Back To PHP 7.4
✔ Supports WHMCS Themes "Six" And "Twenty-One"
✔ Supports WHMCS V8.10 Back To WHMCS V8.6
✔ Requires ionCube Loader V12 Or Later
✔ Easy Module Upgrade To Open Source Version

[edit] Installation and Configuration

This tutorial will show you how to successfully install and configure Amazon Lightsail For WHMCS smoothly.

We will guide you step by step through the whole process.

[edit] Installation

1. Log in to our client area and download the module.
ALS 1.png
2. Upload and extract the extension into the main WHMCS directory.

Extracted files in your WHMCS directory should look like this:

Note: The module uses modified AWS files provided by WHMCS in the 'vendor' folder. In order for the module to work properly, it is necessary to overwrite these files with the files from the module.
Please keep this in mind when installing a WHMCS update, because then you may also need to overwrite these files with the files from the module again.

ALS 2.png
3. When you install Amazon Lightsail For WHMCS for the first time, you have to rename the 'license_RENAME.php' file.

The file is located in '/yourWHMCS/modules/servers/AmazonLightsail/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

ALS 3.png
4. In order to configure your license key, you have to edit the previously renamed 'license.php' file.

Enter your license key between the quotation marks as presented on the following screen.
You can find your license key in our client area → 'My Products'.

ALS 4.png
5. Now, set up the 'storage' folder as recursively writable.

This folder is available at '/yourWHMCS/modules/servers/AmazonLightsail/'.

ALS 5.png
6. The last step is setting up the queue cron job.

It will be used to assign IP addresses to created machines as well as to obtain passwords for Windows OS.

php -q /yourWHMCS/modules/servers/AmazonLightsail/cron/cron.php queue

It is suggested to run the cron every 5 minutes.

[edit] Configuration of Server

Before you can continue, you must generate your Amazon Lightsail access details. You will need them to connect with the server successfully.

Underneath, you will find detailed instructions on where to find this information.

7. Firstly, log in to your Amazon AWS Management Console and find 'My Security Credentials' section under your account name dropdown.
ALS 6.png
8. There, move to the 'Access Keys (access key ID and secret access key) section.
ALS 7.png
9. If you do not have any active keys yet, then press the 'Create New Access Key' button to generate a new set of details.
ALS 8.png
10. A modal with Access Key ID and Secret Access Key will appear, so copy this information and keep it safe. You may also download a suitable file with these details.

Note: This is the only place where you can find the corresponding secret key later. It will not be visible next to the Key ID in the panel.

ALS 9.png
11. Now, log in to your WHMCS and proceed to 'Setup' 'Products/Services' 'Servers' and press 'Add New Server'.
ALS 10.png
12. Next, enter your server name and select 'Amazon Lightsail' from the 'Type' field.

Now, provide the previously generated 'Access Key ID' and 'Secret Access Key'. Then, check the connection and if successful, save the changes.

Important: If you are using WHMCS V7.8.X, then a fatal error may occur when trying to save server settings without providing any hostname or IP address details, even if the module configuration does not require them.
In this case, try to provide anything in the hostname field. For this reason, 'Test Connection' may sometimes not work. Please note that this is a bug that occurs in WHMCS, not the module itself.

ALS 11.png
13. Now, it is time to create a server group. To do so, click on 'Create Server Group' .
ALS 12.png
14. Enter a name, click on your previously created server, press 'Add' and afterward 'Save Changes' .
ALS 13.png

[edit] Configuration of Product

15. In order to create and configure a product, go to 'Setup' 'Products/Services' 'Products/Services'.

Click on 'Create a New Group'.

ALS 14.png
16. Enter your product group name and press 'Save Changes'.
ALS 15.png
17. Once you have added a product group, you can create a new product.

To do so, first click on 'Create a New Product'.

ALS 16.png
18. Afterward, choose your product type, enter your product name, choose module and the product group from the dropdown menus. Press 'Continue'.
ALS 17.png
19. Now, go to the 'Module Settings' section and choose your previously created server group from the dropdown menu.

The module should automatically save and reload the settings. If not, click on the 'Save Changes' option manually.

ALS1 18.png
20. Now, you can start configuring the settings of the offered server.

Just like when creating a new virtual machine in your Lightsail panel, here also you can configure such options as:

  • Region - Choose a geographical area with a set of Lightsail resources. The closer the instance is to your users, the less latency they will experience.
  • Availability Zone - Each AWS Region has up to six 'Availability Zones' . By launching instances in separate 'Availability Zones' , you can protect applications from the failure of a single location.
    To ensure that resources are distributed across the 'Availability Zones' for a region, they are independently mapped to identifiers for each account.
    For example, 'us-east-2a' might not be the same location as 'us-east-2a' for another account. Learn here more about 'Availability Zones' in Amazon Lightsail.
  • Platform - Lightsail images are available on two platforms: 'Linux/Unix' or 'Windows' . Once you choose a platform, you can select a corresponding blueprint of the operating system.
  • Snapshot - select which of the created system snapshots will be used to base the VM installation on. If you select 'None', the following 'Blueprint' option will be used to base the installation.
  • Blueprint - select which base operating system (OS) with or without a preinstalled application should be installed. You can select between an Ubuntu Server image with an application or development stack preinstalled,
    or a Windows OS with SQL Server 2016 Express preinstalled. Note that available options depend on the previously selected 'Platform' and some blueprints cannot be launched with certain Instance Plans.
  • Instance Plan - Select resources available for the instance. Please note that the better the instance resources, the higher the monthly costs. Moreover, some blueprints require more powerful resources.
    You can read more about Amazon Lightsail pricing here.
  • Snapshots Limit - Set a limit for a maximum number of taken manual snapshots that the client can have at a given time. Set -1 for unlimited.
    Please remember that Amazon takes fees for each snapshot - click here to find out more.
  • Log API Requests - Enable to allow storing information on API requests in the 'Module Log' section in your WHMCS.
  • Email Template - Choose an email template that will be used to send messages to clients after the successful creation of the instance.
  • Tag Name - Define a tag name; this label will be assigned to Lightsail resources.
  • Static IP Address - Decide whether to assign to an instance a static, fixed, and public IP address. Note that his will be done a moment after instance creation during the next cron execution.
    You can find out more about Lightsail static IP addresses here.
  • Auto Generate SSH Key - If you enable, SSH key pairs will be automatically generated if clients do not provide them during the instance creation.
  • User Data - You can specify user data to configure an instance or to run a configuration script during launch. This field is optional.
    Tutorial on how to use this option can be found here.
  • Client Area Section - Here you may provide the HTML code and display the content in the client area. Before using this option, please make sure that you are familiar with the instruction that can be found here.
  • Random Domain Prefix - Here you can provide the domain prefix that will be applied if the domain has not been provided.
    You may use WHMCS parameters e.g. {$hostname} or any other valid hostname characters (a-z, A-Z, 0-9,. and -)
ALS1 19.png
21. Next, choose which client area features will be available for your clients.
ALS 20.png
22. At the end of the configuration process, you can decide whether you want to generate configurable options for the product.

Configurable options can be used by your clients to select each virtual machine parameters individually while placing an order.
Otherwise, if configurable options are not defined, then the fixed parameters specified in the earlier configuration will be used instead.

ALS1 21.png
If you decide to use configurable options, press on the 'Create' button and select which options you want to generate.
Note that the configuration for disabled options will still be taken from the configuration of the main product.
More information about how to use configurable options can be found here or in the official WHMCS documentation.
ALS1 22.png
Finally, when everything is set, do not forget to 'Save Changes' .

[edit] Client Area Section

The 'Client Area Section' option gives you the possibility to provide the HTML code and display the content in the client area.
Before using this option, please make sure that you are familiar with the following instruction.

Important! If you come across some errors with displaying values in the client area, please check if you closed brackets {}.

1. The values that can be displayed in the client area:

{$serviceid}, {$pid}, {$serverid}, {$domain}, {$username}, {$password}, {$producttype}, {$moduletype}, {$configoptionX}, {$server}, {$serverip}, {$serverhostname}, 
{$serverusername},{$serverpassword}, {$serveraccesshash}, {$serversecure}, {$serverport}, {$bundles}, {$region}, {$zone}, {$platform}, {$snapshot}, {$blueprint}, {$snapshotsLimit}, 
{$tagName}, {$userData}, {$emailTemplate}, {$userid}, {$orderid}, {$packageid}, {$server}, {$regdate}, {$domain}, {$paymentmethod},{$firstpaymentamount}, {$amount}, 
{$billingcycle}, {$nextduedate}, {$nextinvoicedate}, {$termination_date}, {$completed_date}, {$domainstatus}, {$username}, {$password}, {$notes}, {$subscriptionid}, 
{$promoid}, {$suspendreason}, {$overideautosuspend}, {$overidesuspenduntil}, {$dedicatedip}, {$assignedips}, {$ns1}, {$ns2}, {$diskusage}, {$disklimit}, {$bwusage}, 
{$bwlimit}, {$lastupdate} 

2. On/Off values that you can choose from:

{$clientAreaHistory}, {$clientAreaMetric}, {$clientAreaShowDisk}, {$logApiRequests}, {$staticIpAddress}, {$clientAreafirewall}, {$clientAreasnapshots}, 
{$autoGenerateSSHKey}, {$clientAreaServiceActions} 

3. Access values provided in Arrays:

Please make sure that the provided value complies with this pattern {$ arrayName . fieldName } for example: {$customfields.InstanceTags}, {$clientsdetails.city}

  • {$clientsdetails} :
{.userid}, {.id}, {.uuid}, {.firstname}, {.lastname}, {.fullname}, {.companyname}, {.email}, {.address1}, {.address2}, {.city}, {.fullstate}, {.state}, 
{.postcode}, {.countrycode}, {.country}, {.phonenumber}, {.tax_id}, {.password}, {.statecode}, {.countryname}, {.phonecc}, {.phonenumberformatted}, {.telephoneNumber}, 
{.billingcid}, {.notes}, {.twofaenabled}, {.currency}, {.defaultgateway}, {.cctype}, {.cclastfour}, {.gatewayid}, {.securityqid}, {.securityqans}, {.groupid}, {.status}, 
{.credit}, {.taxexempt}, {.latefeeoveride}, {.overideduenotices}, {.separateinvoices}, {.disableautocc}, {.emailoptout}, {.marketing_emails_opt_in}, {.overrideautoclose}, 
{.allowSingleSignOn}, {.email_verified}, {.language}, {.isOptedInToMarketingEmails}, {.lastlogin} 
  • {.email_preferences} :
{.general}, {.invoice}, {.support}, {.product}, {.domain}, {.affiliate} 
  • {$customfields} :
{.InstanceId}, {.InstanceTags}, {.sshKey} 

As an example, we provide:

ALS1 22 1.png
As you can see, all data is available here:
ALS1 22 2.png

[edit] SSH Keys

In the 'Custom Fields' tab you will find an 'SSH Public Key' field which is displayed to clients on the order form by default.

Please be aware that this field can be left as optional for Linux/Unix as well as Windows platforms.
Int that case the necessary keys will be generated by Amazon itself and will be displayed in the 'Connection Details' window.

The following formats are supported:

  • OpenSSH public key format (the format in ~/.ssh/authorized_keys)
  • Base64 encoded DER format
  • SSH public key file format as specified in RFC4716
  • SSH private key file format must be PEM (for example, use ssh-keygen -m PEM to convert the OpenSSH key into the PEM format)

Create an RSA key. Amazon Lightsail does not accept DSA keys. The supported lengths are 1024, 2048, and 4096.

If you would like to limit the possibility of entering the key e.g. only to the 'ssh-rsa' format, you can use the regular expression in the validation field, such as:

#ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?# 

Remember that API allows such action only once, during the initial VM creation.

ALS 23.png

[edit] Management

[edit] Admin Area

Amazon Lightsail For WHMCS allows you to monitor and manage your customer server instance from the admin area of your WHMCS system.

This includes the supervision of such features as:

  1. Configurable options which enable you to view the chosen server details
  2. Module commands to allow easy and quick management of the server
    Important: Since version 1.3.0 of the module the 'Change Package' command can be used for enabling or disabling the 'Static IP Address' option as well as changing the 'Instance Plan'.
  3. Service actions, including: Start, Stop and Reboot the server as well as display Connection Details for remote connection to the instance
  4. Instance details that provide the current status, resources and options set
  5. Attached disk details
  6. List of scheduled tasks with their type, status and date
ALS 24.png

[edit] Ordering

Due to configurable options, you are able to offer a product which your clients can tailor to their needs.
Additionally, you are able to set up pricing for each configurable option, which makes your offer even more competitive.

At this moment clients can also optionally provide their public SSH key.
Please note that this key should be in one of the OpenSSH standard formats which are supported by API, e.g. ssh-rsa.

ALS1 25.png

[edit] Client Area

Client area interface of Amazon Lightsail should look like the one on the screen below.
As you can see, the control panel contains useful details of a managed server.

The module allows your customers to easily start, stop and reboot their server instance through pressing the corresponding buttons.
Clients can also take instance snapshots, manage firewalls, check the server status with its details, view assigned public and private IP addresses.
Moreover, it is easy to see disk details, access usage graphs, as well as control the list of currently scheduled tasks.

ALS1 26.png
If the clients want to connect to the instance, by clicking on the 'Connection Details' button, the data will be displayed, which will allow them to make a remote connection.

This data will vary depending on whether the instance is based on Linux/Unix or Windows as well as on whether the public SSH key was provided during the order.

To connect to an instance on the Linux/Unix platform, clients can use an SSH client application.
Here is a short guide on how to connect with openSSH:

  • Create a file (e.g. id_rsa) with SSH Private Key
  • Create a file with a .pub extension (e.g. id_rsa.pub), with the contents of the SSH Cert Key
  • Run the command:
 ssh username@ip -i ida_rsa 

Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, username, and private or associated public SSH key.
For Windows-based instances, clients can also connect to their instance using an RDP client such as Remote Desktop Connection (learn more).
Depending on the configuration of the instance, the popup window will display the instance IP address, connection protocol, Windows username and generated password in its decoded or encoded form.
If Windows password is encoded it can still be somehow decrypted using this Amazon method.

ALS 27.png

[edit] Task History

To access the history of a machine, simply press the 'Tasks History' button. Afterward, the customer can see all the actions performed on the instance, as well as their status.
ALS1 28.png

[edit] Usage Graphs

Through pressing the 'Usage Graphs' button, clients will be moved to the page where they can view generated graphs on CPU usage and network traffic as well as check vital statuses.

They can also switch the timeline of graphs by choosing a new one from the 'Edit' dropdown menu. Clients can pick between '1 hour', '6 hours' '1 day', '1 week' and '2 weeks'.

ALS1 29.png

[edit] Firewall

In the 'Firewall' section clients can manage their firewall settings to control which ports are open to the public.

Note that when a Lightsail instance is created, some network ports are open by default so the instance can accept public network connections.

Clients can add here new rules, edit existing ones or delete them.

ALS1 30.png
When adding or editing an existing rule, clients manually control which ports and protocols (TCP or UDP) on their instances will accept connections.
The selection of predefined application rules are also available so that protocol and port range fields will be automatically fulfilled.

You can also find a complete list of port settings, application layer protocol types, and transport layer protocol types in this Amazon documentation.

ALS 31.png

[edit] Snapshots

A snapshot is a point in time backup of the client's instance.

In the snapshots section clients can create new snapshots of their instances, view previous snapshots or restore instance from a snapshot.
The number of allowed snapshots the client can have taken at given time can be limited in the product's module settings or by configurable options.

Please note that Amazon also takes additional fees for each created snapshot.

ALS1 32.png
To create a new snapshot simply provide its name and press the 'Create' button.

Note that the name can contain from 2 to 200 characters which can be only alphanumeric, numbers, periods, dashes or underscores.
If Windows is used for instance, it should be also stopped before creating a snapshot.

ALS 33.png
Once the snapshot is created, it can be restored using the following button.
ALS1 34.png
Before restoring a snapshot remember that all previous data on the disk will be lost.
ALS 35.png

[edit] Importing Existing VM

In this section, you can find short instruction on how to connect one of your clients to your already existing virtual machine.
Take the following steps to make sure that the process will be carried out properly.

1. Firstly, manually create an order for your customer in WHMCS. Choose a client and in the summary, view click on the ' Add New Order' button. Next, select a 'Product/Service' and press 'Submit Order' .
What is important, do not perform the 'Create' action. The status has to remain as 'Pending' .
More info about placing orders can be found here
2. Proceed to the newly created product's card in your admin area. Find the following field:

  • Instance ID

Now, fill out the field with the ID of the machine that you wish to assign to this client.
If you completed the required data, now change the status from 'Pending' to 'Active' and 'Save Changes' .

Photo AL.png
3. If the completed data is correct, after refreshing the page, you will see the attached virtual machine.
Important! Remember to manually add other missing parameters of the VM such as domains, credentials, IP Addresses, configurable options, SSH Key, billing cycle, etc. so they match the parameters of the attached VM.

[edit] Tips

1. If you need to generate any of the configurable options once again, you must delete the previously created ones.
Only then will it be possible to generate a new configurable option. Read more about configurable options here.
2. When you upgrade WHMCS, please be aware that the module uses custom modified AWS files located in the main WHMCS 'vendor' directory, and their unmodified versions are also delivered by WHMCS itself.
In this case, the WHMCS upgrade may overwrite these files to their default form so you may need to overwrite these files again with the files delivered with the module.
3. Names of snapshots created by clients will have added prefixes with instance domains visible only in your Amazon Lightsail panel.

This is because Amazon requires snapshot names to be unique to each AWS Region in your Lightsail account, not just within a single instance.
Otherwise, customers at WHMCS could often see the message that a particular snapshot name has already been taken up by someone else.
For the domain prefix name, 55 characters from 255 previously available for the snapshot name have been reserved .

[edit] How To Use Language Overrides

Incorporating language customizations - the module readily accommodates language overrides, allowing you to tailor the language files to your preferences.
The language file english.php remains unencoded and can be modified to suit your needs. However, it's recommended to avoid altering the core file itself, and instead, leverage the capability of using overrides.
Here's how to apply language overrides:
  • Navigate to the ~/langs/ directory located within the following yourWHMCS/modules/servers/moduleName/langs/ path.
  • Within this directory, create a new file or duplicate the language file you intend to modify. For instance, if you wish to create an override for the English language, establish the following directory structure:
 ~/langs/overrides/english.php.
  • Open the newly created override file to edit its contents.
  • At the beginning of the file, indicate the used code, for instance, you can use: <?php for PHP code.
  • Adapt the file content according to your requirements. You can either selectively modify specific variables or opt to revise the entire content of the language file.

For example:

Original yourWHMCS/modules/servers/moduleName/langs/english.php:

 $_LANG['Search'] = 'Search';

Override yourWHMCS/modules/servers/moduleName/langs/overrides/english.php:

 $_LANG['Search'] = 'Look for';
By following these steps, you can seamlessly implement language customizations without altering the core language file, ensuring your changes will not be lost after every module update.

Remember that some of the modules have more than one language file, located under /addons and /servers paths. You may create the override files for both of them.
Note that you do not need to paste all the original content of the lang file into the override file. Enter there only the lines that you wish to change, every other line will be fetched from the original module lang file.
Consequently, the override lang file might include only one or just a few lines.

[edit] Update Instructions

An essential guidance through the process of updating the module is offered here.

Ensure successful completion of the module update by carefully following each step, thereby preventing data loss or any unforeseen issues.
Additionally, you will find a current list of supplementary actions necessary for a smooth update process there.

After the module update we strongly recommend to open one of the product's module settings tab to make sure that all upgrading processes have been completed successfully.

[edit] Upgrade Guide

Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?
There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment.

Opt for the Open Source version of your Amazon Lightsail For WHMCS module to unlock these benefits.
Simply click on either the Get Source Code or Upgrade To Lifetime button found on the product's page in our client area to complete the one-step upgrade process, with a dedicated discount already applied.

Follow a comprehensive guide covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized.

[edit] Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. If there is a problem with obtaining details in WHMCS for an already existing instance, make sure that the correct region is selected in the product configuration.
Otherwise, if the regions do not match, there can be a problem with fetching details of the instance.
3. If you are using WHMCS V7.8.X, a fatal error may occur when trying to save server settings without providing any hostname or IP address details.
Our module does not require this field to be filled out, but in that case, try to provide anything in the hostname field. Please note that this is a bug that occurs in WHMCS, not in the module itself.
4. Currently, issues have been observed when using the PuTTY client application to connect to an instance on the Linux/Unix platform. We recommend using OpenSSH for connection instead.
Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Amazon Lightsail For WHMCS