Plesk is a web hosting control panel available for both Windows and Linux.


Table of Contents

About Plesk

Plesk is a popular and widely used web hosting control panel. Learn more about Plesk on their website at https://www.plesk.com.


Plesk Onyx is supported. Just select "Use Latest Version (Recommended)" when adding your server within the module.

Supported Features

CreateCancelSuspendUnsuspendManagementConfig Options

Installing Plesk

To install the Plesk module, visit [Settings] > [Company] > [Modules] > Available, and click the "Install" button for Plesk.

A message will be displayed, indicating that the module was successfully installed. Then click the "Add Server" button.

Enter the details for your Plesk server.

Field NameDescriptionBlesta Version
Server LabelEnter a label for this Plesk server, it can be anything you like.
Host NameEnter the host name for your Plesk server, e.g. "dev-plesk.domain.com". This is included in service creation emails.4.8.0
IP AddressEnter the IP Address for your Plesk server, i.e. "192.40.226.69". This is where you login.
PortEnter the port for Plesk, the default secure port is 8443.
UsernameEnter your Plesk username. This is the username you would log into Plesk with.
PasswordEnter your Plesk password. This is the password you would log into Plesk with.
Reseller AccountCheck this option if you are using a Plesk reseller account.
Plesk Panel Version

Select the version of Plesk you are using, this enables Blesta to connect via the correct API.
Blesta supports the following versions (For Onyx, select "Use Latest Version"): 

  • Use Latest Version (Recommended)
  • Parallels Plesk Panel 12.5
  • Parallels Plesk Panel 12.0
  • Parallels Plesk Panel 11.5
  • Parallels Plesk Panel 11.1
  • Parallels Plesk Panel 11.0
  • Parallels Plesk Panel 10.4
  • Parallels Plesk Panel 10.3
  • Parallels Plesk Panel 10.2
  • Parallels Plesk Panel 10.1
  • Parallels Plesk Panel 10.0

Name ServersEnter the name servers that should be used for this server. These will be available to the package welcome email to the client.4.8.0

After filling out these options, click "Add Server" to add your Plesk server.

Server Groups

Server groups are useful for categorizing Plesk servers. When creating a Package, a specific server, or a server group may be selected for provisioning. Blesta will automatically select a Plesk server to provision with when a server group is chosen.

To add a server group, from the Plesk overview at  [Settings] > [Company] > [Modules] > Plesk, click "Add Server Group", then enter the details.

OptionDetails
Group Name

Enter the name for this server group.

Add OrderChoose how servers in this group will be selected for provisioning. Currently, first non-full server is the only add order.
Assigned ServersSelect servers under "Available Servers" and click to move them to the left column to add them to the group.

Creating Packages

Packages define the pricing, welcome email, module and more. Packages can be assigned to Package Groups, and added to Order Forms. To create a Package, visit [Packages] > Browse, and click the "Create Package" button.

Creating a Package consists of several sections:

Basic

The Basic section consists of the following options:

Field NameDescription
Package NameEnter the name of this Package, it will be visible wherever services are listed and on any order forms.
Status"Active" is the default, "Inactive", and "Restricted" are also available.
Quantity AvailableIf this Package has a limited quantity available, enter the quantity, or leave it as "Unlimited".
DescriptionEnter a Description for this Package. HTML is allowed, and descriptions appear on order forms.
Configurable OptionsSelect the Configurable Option Group you created previously, to make those options available for this package.
ModuleSelect "Plesk" for the module.

Module Options

The Module Options section consists of the following options, which are specific to Plesk:

Field NameDescription
Server GroupSelect "Any" if you wish to specify a specific server, or select the Server Group to provision from. Selecting a group means that accounts will be provisioned from the group. Selecting a group is recommended.
ServerIf "Any" is selected above, select the server this package will use to provision accounts.
Account TypeSelect the appropriate account type, i.e. "Standard" for standard hosting accounts.
Plesk Service PlanSelect the Plesk Package to use when configuring accounts. These values are pulled from "Plans" created in Plesk and specify resources for the plan.

Pricing

Field NameDescription
TermEnter the term for the desired pricing option. For example, if you wish to create a 3 month pricing option, enter 3 here.
PeriodSelect the period for this pricing option. "Day", "Week", "Month", "Year", and "One time" are options. The client will be invoiced every "term period", for example every 3 months if 3 is entered for term, and Month is selected for period.
CurrencySelect the currency this pricing option is available for.
PriceEnter the price for this pricing option.
Setup FeeIf there is a setup fee, enter it here.
Cancellation FeeIf there is a fee to cancel early, enter it here.

Click the "Add Additional Price" to add more pricing options. It's common for people to create 1 Month, 3 Month, 6 Month, and 1 Year price options. There are many possible combinations.

Welcome Email

The "Tags" section describes tags that may be used in the welcome email. The welcome email content is inserted into the "Service Creation" email template under [Settings] > [Company] > [Emails] > Service Creation. Only details unique to this service should be entered into the welcome email section for the package.

Sample Email

This sample email could be used in the Package Welcome Email section to help you get started. Be sure to enter content for your welcome email in both the HTML and Text sections.

Your Plesk account is now active, details below:

Domain: {service.plesk_domain}
Username: {service.plesk_username}
Password: {service.plesk_password}

To log into Plesk please visit https://{module.host_name}:8443.
Please update your name servers as soon as possible to the following:

{% for name_server in module.name_servers %}
Name server: {name_server}{% endfor %}


Thank you for your business!

When creating or editing a package that uses this module, the following tags will be available:

TagsDescriptionNotes
{module.ip_address}The IP address of the server that the service was provisioned one.g. "127.0.0.1"

{module.host_name}

The hostname of the server that the service was provisioned on

This option is available in version 2.9.0 and greater of the Plesk module.


e.g. "plesk01.mydomain.com"
{module.port}The port number to connect on

Default is "8443"

{package.type}The package meta typeEither "standard" or "reseller"
{package.plan}The package meta service plan ID as used in Pleske.g. "1"
{package.reseller_plan}The package meta reseller plan ID as used in Pleske.g. "1"; This is only available if the type is "reseller"
{service.plesk_username}The service field for the Plesk account username
{service.plesk_password}The service field for the Plesk account password
{service.plesk_domain}The service field for the Plesk domaine.g. "domain.com"
{service.plesk_webspace_id}The service field for the Plesk subscription (webspace) servicee.g. "1"

Displaying Name Servers in the Welcome Email

The {module.name_servers} tag must be iterated over to display the name servers. Email tag usage is elaborated upon on the Customizing Emails page.

Consider an example where the module has two name servers set, named "ns1.domain.com" and "ns2.domain.com". The following can be added to the email template to output the name servers:

{% for name_server in module.name_servers %}
Name server: {name_server}{% endfor %}

The welcome email will display this as:

Name server: ns1.domain.com
Name server: ns2.domain.com

Group Membership

If this is the first Package you are creating with this module, select the "Create a New Group" option, and enter a Group name. If you are adding a subsequent Package and wish for it to be part of the same group, select "Select from Available Groups", and move the group from the right to the left of the multi-select box.

When finished, click "Create Package" to create this package.

Final Steps

The only thing left to do is to add this Package Group to an order form so clients may place orders for your Plesk servers. See Creating an Order Form for more details.

Common Issues

Are you running Blesta on a Plesk server that you are provisioning accounts to? If so, you must enable Apache graceful restart in Plesk.

If you are running Blesta on a Plesk server that you are provisioning accounts to you must enable Apache graceful restart in Plesk. This is necessary because after provisioning an account in Plesk, Plesk will restart Apache thereby killing the API connection. Blesta will never receive the response from Plesk that the account has been provisioned.

From https://kb.plesk.com/en/112020:

Symptoms

By default, Plesk does not use Apache graceful restart for applying new settings. As result Apache will be restarted every time you change hosting settings through the Plesk GUI. This can lead to unwanted interruptions of sites operation.

Resolution

To enable graceful restart, you should add the parameter "restart_apache_gracefully" with a "true" value to the "misc" table of the "psa" database. For that:

  1. Log in to the Plesk database:

    mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa


  2. Apply the following SQL query:

    mysql> INSERT INTO misc VALUES ('restart_apache_gracefully', 'true');


Symptoms

When there is an issue interacting with the Plesk API, the module log under Tools > Logs > Module Log sometimes includes errors.

1018 - Unable to create hosting. IP address does not exist in client's pool.

This error usually indicates that the IP address is set as "dedicated" instead of shared. To check and update this in Plesk visit Tools and Settings > IP Addresses. Then, click on the IP address and change the type to "shared".