Overview
The Netlen Cloud module provisions and manages NetlenVM virtual servers from WISECP.
It talks to the Netlen panel's API v2 (https://{host}/v2, Bearer auth).
WISECP v3.1.9+ PHP 8.1+ API v2
Features
Lifecycle
- Create (package & custom-spec) — Idempotency-Key = WISECP order id
- Suspend / Unsuspend (stop / start)
- Terminate
- Package upgrade (prorated)
- Import existing servers (
list_vps)
Client-area management
- Power: Start / Stop / Reboot
- Console (VNC) — brokered one-time viewer link
- OS reinstall (OS selectable)
- Change root password
- Snapshots & Backups (list / create / restore / delete)
- Firewall rules (list / add / delete)
- IP addresses (buy / release / rDNS)
- Live metrics (CPU / RAM / Disk)
Requirements
- WISECP v3.1.9 or newer
- PHP 8.1 – 8.4
- ionCube Loader v14+ (matching the server's PHP version)
- PHP extensions: cURL + OpenSSL (JSON is bundled in 8.x)
- Outbound HTTPS to
api.netlen.com.tr:443 - A Netlen API v2 key (Bearer token)
- Your WISECP server's public IP allowlisted for the API key
Installation
- Copy the module into your WISECP install:
coremio/modules/Servers/NetlenCloud/
- WISECP admin → Servers → add a server:
- Module: NetlenCloud
- Hostname:
api.netlen.com.tr(host only — nohttps://, no/v2) - Secure: on (https)
- Access Hash: your Netlen API v2 token
- IP Address / Username: WISECP requires these fields but the module does not use them.
Enter any placeholder (e.g. IP =
api.netlen.com.tr, Username =netlen).
- Click Test Connection (calls
GET /v2/billing/balance). - In the Netlen panel, allowlist this WISECP server's IP for the API key.
- Create a product using the NetlenCloud module and fill in the fields below.
Product configuration
Under the product's Module Settings:
| Field | Description |
|---|---|
| Plan ID | Netlen package/plan id (GET /v2/plans). Leave empty for a custom-spec product. |
| Location ID | Netlen location id (GET /v2/locations). |
| OS Version ID | Default OS version id (GET /v2/operating-systems). |
| IPv6 Count | Number of IPv6 addresses at creation (default 1). |
Extra IPv4 (Configurable Option)
Add a Configurable Option named exactly Extra IPv4 (quantity type).
At provisioning the module reads the chosen quantity and buys that many IPv4 addresses via
POST /v2/servers/{id}/ips (each billed to the reseller balance).
Customers can also buy/release IPs one-by-one from the IP Addresses page after ordering.
Operating System (Configurable Option)
The product's OS Version ID is the default OS. To let customers pick an OS
at order time — the same way as Extra IPv4 — add a Configurable Option
(dropdown) named exactly Operating System.
- Each option's value must be the Netlen os_version_id. You can find these ids in
the product's OS Version ID dropdown under Module Settings, shown as
(#id). - At create the module reads this choice (
Operating System), then falls back to the product default. - The Reinstall page already lists OSes live from the API — nothing extra needed there.
Backup / Snapshot (sell as a paid addon)
Backups and snapshots are billable on the Netlen side (a monthly protection fee is charged to the reseller balance). To offer them to end customers for a fee, use a WISECP Product Addon.
- Add a recurring Configurable Option to the product at your own price, named
exactly
Backup(same idea as Extra IPv4). - Set product Module Settings → Backup / Snapshot billing to addon.
- In that mode the customer cannot use the Snapshot/Backup pages until they buy the Backup addon (buttons hidden, actions rejected). Buying it unlocks them.
- WISECP bills the end customer for the addon; Netlen charges the reseller → your margin.
- Module addon hooks:
addon_create/addon_unsuspendenable,addon_suspend/addon_cancelleddisable. - In free mode (default) Snapshot/Backup are always available (the reseller absorbs the cost).
Client area
On the service detail page the customer sees:
- Home: status + CPU/RAM/Disk charts + spec + IP list
- Start / Stop / Reboot (by status)
- Console (VNC)
- Reinstall — OS selection + optional new password
- Change Password
- Snapshots / Backups — create, restore, delete
- Firewall — add/delete rules
- IP Addresses — buy, release, rDNS
Admin area
On the service tab (order-detail.php) the admin sees:
- Power buttons (Start / Stop / Reboot)
- The server id (entity id)
- An admin-only new password field (reset password)
- Status and IP overview
API endpoints
| Operation | Endpoint |
|---|---|
| Create | POST /v2/servers |
| Suspend / Unsuspend | POST /v2/servers/{id}/actions/stop · start |
| Terminate | DELETE /v2/servers/{id} |
| Upgrade package | POST /v2/servers/{id}/actions/upgrade |
| Reinstall | POST /v2/servers/{id}/actions/reinstall |
| Reset password | POST /v2/servers/{id}/actions/reset_password |
| Console (VNC) | GET /v2/servers/{id}/console |
| Snapshots | GET/POST /v2/servers/{id}/snapshots · restore · delete |
| Backups | GET/POST /v2/servers/{id}/backups · restore · delete |
| Firewall | GET · POST/PATCH/DELETE /v2/servers/{id}/firewall/rules |
| IPs | GET · POST · DELETE · PUT /v2/servers/{id}/ips |
| Metrics | GET /v2/servers/{id}/metrics |
| Catalog | GET /v2/plans · /locations · /operating-systems |
| Test Connection | GET /v2/billing/balance |
Security
- Bearer auth: token only in the
Authorizationheader; never in URLs or logs. - IP allowlist: the API key is restricted to the WISECP server's IP.
- Password policy: min 8 chars with upper, lower, digit and symbol.
- Idempotency: create is keyed by order id; retries never double-provision.
- Errors are mapped to customer-safe messages; full detail goes to the WISECP module log (
save_log).
Troubleshooting
| Symptom | Fix |
|---|---|
| Test Connection fails | Enter Hostname as host only (api.netlen.com.tr); check the Access Hash and the IP allowlist. |
| "API authentication failed" | The Access Hash (Bearer token) is wrong or expired. |
| "IP not allowlisted" | Add the WISECP server's IP to the API key in the Netlen panel. |
| Create "balance insufficient" | The reseller Netlen balance is too low. |
| Extra IP did not arrive | Check the module log; if balance/limit is exceeded the IP purchase stops (the server still provisions). |
Support
API documentation: https://api.netlen.com.tr/v2/docs
Reseller panel: https://panel.netlen.com → Reseller → API