- PHP 45.8%
- Go Template 41.9%
- CSS 7.3%
- JavaScript 5%
|
|
||
|---|---|---|
| modules/servers/ArkhostVPSAG | Bump version to 1.6 | |
| screenshots | README.md update with screenshots | |
| README.md | Bump version to 1.6 | |
WHMCS VPS Management Module - ArkHost VPSAG
A WHMCS server module for VPSAG/EVPS VPS management with multi-language support.
Note: VPSAG has rebranded to EVPS.net. The API remains unchanged at vpsag.com.
Originally based on andretunes/whmcs-module-vpsag. Current version has been substantially rewritten.
Features
- VPS provisioning and lifecycle management
- VPS control (start/stop/restart/shutdown)
- Backup management (create/restore/delete)
- Firewall configuration
- OS reinstallation with SSH key injection and post-install scripts
- Resource monitoring with graphs
- VNC console access
- Hostname and rDNS management
- ISO mounting
- 8 language support (English, Dutch, French, German, Italian, Portuguese, Russian, Spanish)
- Responsive client area design
Requirements
- WHMCS 8.9+
- PHP 7.4+
- VPSAG/EVPS reseller account with API access
Installation
- Upload the
ArkhostVPSAGfolder to/modules/servers/in your WHMCS installation - Navigate to Setup > Products/Services > Servers in WHMCS admin
- Add a new server with:
- Module: ArkhostVPSAG
- Hostname:
www.vpsag.com - Username: Your VPSAG API username
- Password: Your VPSAG API key
- Click Test Connection to verify credentials
Product Configuration
Creating a Product
- Go to Setup > Products/Services > Products/Services
- Create a new product or edit an existing one
- Under Module Settings tab:
- Module Name: ArkhostVPSAG
- Server Group: Select your VPSAG server group
Configurable Options
The module uses two primary configurable options that are dynamically populated from the VPSAG API:
| Option | Config Key | Description |
|---|---|---|
| Plan ID | configoption1 |
VPS plan - dropdown populated from /api/v1/plans showing plan names with prices |
| OS ID | configoption2 |
Operating system - dropdown populated from /api/v1/os/plan/{plan_id} based on selected plan |
| VNC Display Mode | configoption3 |
How VNC console is displayed: newtab (opens in new browser tab) or embedded (shows in a tab within the client area) |
Setting Up Configurable Options
You can override the default product options using WHMCS Configurable Options:
- Go to Setup > Products/Services > Configurable Options
- Create a new group and link it to your VPSAG product(s)
- Add options with these exact names:
planid|Plan- To allow customers to select different plansosid|Operating System- To allow customers to select their OS during order
Option format: {api_id}|{display_name}
The numeric ID before the pipe is the API ID from VPSAG/EVPS.
Finding the IDs
The module displays IDs directly in the dropdowns (format: ID | Name):
- Go to Setup > Products/Services > Products/Services
- Edit any product using the ArkhostVPSAG module
- Go to the Module Settings tab
- The Plan and Operating System dropdowns show:
{id} | {name}
Use those IDs when creating Configurable Options.
API terminology:
planid= Package/Plan ID from VPSAG APIosid= Operating System ID from VPSAG API
Note: OS availability varies by plan - you must select a Plan first before the OS dropdown populates.
The module checks for configurable options first, then falls back to product-level settings.
Callback URL
For automatic provisioning updates (IP, password delivery), configure your callback URL in VPSAG:
https://yourdomain.com/modules/servers/ArkhostVPSAG/callback.php
The callback handler:
- Validates requests using SHA256 signature verification
- Updates service with username, password, IPs (IPv4/IPv6)
- Sets VPS label to
WHMCS {service_id}for easy identification
Module Functions
Client Area Actions
| Action | Description |
|---|---|
| Start/Stop/Restart | Basic power controls |
| VNC Console | Browser-based console access |
| Reinstall OS | Fresh install with optional SSH key and post-install script |
| Reset Root Password | Generate new root password |
| Hostname/rDNS | Set hostname and reverse DNS |
| Graphs | View CPU, RAM, disk, network usage over time |
| Backups | Create, restore, and delete backups |
| Firewall | Add/remove rules, commit changes |
| ISO | Mount/unmount ISO images |
Admin Actions
| Action | Description |
|---|---|
| Start/Stop/Reboot | Power controls from admin panel |
| VNC Console | Direct VNC link |
| Suspend/Unsuspend | Service suspension management |
| Terminate | Cancel VPS at VPSAG |
| Change Package | Upgrade to higher plan |
Sidebar Buttons
The module adds custom sidebar buttons to the client area:
- Start, Stop, Restart, VNC Console
API Integration
Base URL: https://www.vpsag.com/api/v1/
Authentication headers:
X_API_USER: API usernameX_API_KEY: API key
The module handles all API communication internally with:
- TLS 1.2 enforcement
- 15-second timeout
- Full request/response logging via WHMCS module log
VPS ID Storage
The VPS ID is stored in WHMCS service properties with key vpsag|VPSAG ID in format VPSAG-{numeric_id}.
Language Customization
Override translations by creating files in:
/modules/servers/ArkhostVPSAG/lang/overrides/{language}.php
Screenshots
Overview
Graphs
Backups
Firewall
Settings
Changelog
Version 1.6
- Security hardening:
- Decrypted reseller API credentials are no longer written to the module log
- Client-supplied values used in API URL paths are now validated (prevents path/parameter injection and cross-tenant access)
- Suspension now uses Disable/Enable, and VPS control actions are blocked while a service is not active
- Provisioning callback signature is verified with a constant-time comparison
- Output escaping added for server/OS data in the client area, settings, and error templates
- Fixed callback IP assignment: all additional IPv4 addresses are kept and stored newline-separated
Version 1.5
- WHMCS v9 compatibility: Updated Smarty template syntax for Smarty v4
- Added VNC Display Mode setting: choose between new tab or embedded in client area
- Embedded VNC tab with fullscreen toggle and open in new tab buttons
- Plan and OS IDs now displayed in Module Settings dropdowns for easy configuration
- Updated VPSAG branding to EVPS.net (API unchanged)
- Improved documentation with configurable options setup guide
- Fixed session issues with VNC console
- Added iframe sandbox for security
Version 1.4
- Fixed firewall rule duplication bug when adding new rules
- Added validation warning for ANY protocol with specific port numbers
- Redesigned firewall interface with modern card-based layout
- Created standalone Firewall tab for better organization
- Completely redesigned VPS Overview section with:
- Server Status Card (hostname, IPs, OS, status, uptime, server type)
- Resource Allocation Card (CPU cores, Memory, Storage, Traffic)
- Resource Usage Card (RAM, Bandwidth, CPU)
- Quick Actions Card (Start/Stop, Restart, VNC Console)
- Fixed Quick Actions button functionality
- Completed all language translations (8 languages)
- Enhanced UI styling with gradient backgrounds and smooth animations
- Improved responsive design and layout consistency
Version 1.3
- Enhanced API integration
- Performance improvements
- Bug fixes
Version 1.2
- Custom notifications replace browser popups
- Confirmation dialogs for critical actions
- Multi-language support for all notifications
- Smart post-installation script examples based on OS
- Fixed firewall rules not displaying after creation
- Improved UI styling and animations
Version 1.1
- Basic VPS management
- Backup operations
- Firewall rules
- OS reinstall
Version 1.0
- Initial release
Credits
Originally based on work by andretunes Substantially rewritten and extended by ArkHost
License
MIT License © 2025 ArkHost