Skip to main content
Version: 4.1

WISECP

The HiTechCloud WISECP module lets WISECP create and manage HiTechCloud hosting accounts. It uses the same HiTechAdmin API as the WHMCS module.

What it does from WISECP:

  • Create an account on the plan you chose for the product, and add the order's domain to it
  • Suspend and unsuspend the account
  • Terminate the account (running it again on an account that is already gone counts as success)
  • Change package: moves the account to the plan of the new product on upgrade or downgrade
  • Change password
  • Single sign-on: a "Login" button in the client area and the admin order page opens the account's panel with a one-time link. Administrators can also sign in to HiTechAdmin with a one-time ticket, so the server password never reaches the browser.
  • Usage: shows the account's disk usage in MB. Bandwidth is not measured by the HiTechAdmin API, so WISECP shows the product's bandwidth limit with nothing used.

HiTechCloud

Enable API​

Enable API access under HiTechAdmin > API, or from the terminal:

hitechcloudcli config update api on

We recommend a separate administrator account for WISECP. Create it under HiTechAdmin > HiTechAdmin Settings, or from the terminal:

hitechcloudcli admin new USERNAME_HERE PASSWORD_HERE

Allow the WISECP server​

WISECP talks to HiTechAdmin on port 2087. Open that port for the WISECP server's IP address under HiTechAdmin > Firewall, or from the terminal:

csf -a WISECP_IP_HERE

or with UFW:

ufw allow from WISECP_IP_HERE

Create plans​

Under HiTechAdmin > Plans, create the hosting plans you will sell. Each WISECP product is tied to one of them by name.

WISECP

Install the module​

On the WISECP server, copy the module into WISECP's server modules directory:

cd /tmp
git clone https://hitechcloud.org
cp -r hitechcloud-wisecp-module/coremio/modules/Servers/HiTechCloud /path/to/wisecp/coremio/modules/Servers/

The module needs PHP 7.4 or later with the curl extension, which WISECP already requires.

Add the server​

In the WISECP admin area, add a new server under the hosting server settings:

  • Module / panel type: HiTechCloud
  • Hostname: the HiTechCloud server's hostname (or its IP address)
  • Username / Password: the HiTechAdmin administrator account created above
  • Port: 2087. Tick the SSL option if HiTechAdmin has a TLS certificate.

Click Test Connection. The module signs in to the HiTechAdmin API and reads the plan list. If the test fails, the error from HiTechAdmin is shown.

NOTE

If HiTechAdmin uses a self-signed certificate, the connection test fails certificate verification. Give HiTechAdmin a real certificate. If you can't, add define('HITECHCLOUD_WISECP_VERIFY_TLS', false); to WISECP's configuration so it runs before the module loads.

Create products​

Create a hosting product, choose the HiTechCloud server (or server group), and pick the HiTechCloud plan from the drop-down on the product's module settings. If the plan is left empty, the product's name is used as the plan name. That is the same rule the WHMCS module follows, so the names must match exactly.

Test​

Place a test order and activate it. The account should appear under HiTechAdmin > Users with the domain added, and the client area should show a Login button that opens the panel.

Troubleshooting​

  • WISECP's module log records each API request and response. Passwords and sign-in tickets are replaced with ***.
  • On the HiTechCloud server, the API log is /var/log/hitechcloud/admin/api.log.
  • "Account ... was created, but adding ... failed": the account exists but the panel refused the domain. A common cause is that the domain is already on the server. Fix the domain in the panel, then set the service active in WISECP. Retrying the activation would fail, because the username is now taken.
  • "The panel returned a sign-in link without a hostname": set the panel hostname under HiTechAdmin > Settings > General.