Personal tools
Namespaces

Variants
Actions

MikroTik WireGuard VPN For WHMCS

From ModulesGarden Wiki
Revision as of 09:46, 31 July 2026 by Karolina (Talk | contribs)

Jump to: navigation, search

This documentation is still being prepared. Please allow us a little more time to polish and publish the complete article.
Thank you for your patience!



Contents

About MikroTik WireGuard VPN For WHMCS

MikroTik WireGuard VPN For WHMCS enables automated provisioning and management of WireGuard VPN services on MikroTik routers.

The module creates VPN peers, assigns tunnel IP addresses, applies bandwidth limits, and tracks traffic usage directly through WHMCS.
Clients can access their connection details, scan a configuration QR code, download a ready-to-use configuration file, and review traffic statistics in the client area.

  • Core Features:
✔ Automate Complete WireGuard VPN Service Provisioning
✔ Manage VPN Accounts On MikroTik Routers Through WHMCS
✔ Control Bandwidth And Track Traffic Usage
✔ Provide Clients With Ready-To-Use VPN Configurations
✔ Support Usage-Based Billing For Transferred Traffic
  • Admin Area:
✔ Create, Suspend, Unsuspend And Terminate VPN Accounts
✔ Change Service Packages
✔ View Peer And Connection Details
✔ Download VPN Configuration Files
✔ View Daily And Monthly Traffic Statistics
✔ Reset VPN Connections
✔ Configure Products:
✔ Select MikroTik Server And WireGuard Interface
✔ Define Peer Comment Prefix
✔ Configure Allowed IP Addresses And DNS Servers
✔ Set Keepalive Interval
✔ Define Upload And Download Speed Limits
✔ Enable Traffic Statistics
✔ Configure Traffic Data Retention Period
✔ Define Setup Guide And WireGuard Client Download URLs
✔ Enable Usage-Based Metric Billing
  • Addon Module:
✔ View Dashboard With Server, Account And Service Summaries
✔ View General Traffic Overview Graph
✔ Manage Multiple MikroTik Servers
✔ View All WireGuard VPN Accounts And Peers
✔ Preview Peer State, Interface, Last Handshake And Traffic Usage
✔ View Connection Details And Configuration
✔ Control Staff Access Level To Specific Resources With ACL
✔ Customize Module Language Files With "Translations" Tool
✔ Review Module Activity And Error Logs
  • Client Area:
✔ View VPN Account And Connection Status
✔ View Connection Details And Assigned Tunnel IP Address
✔ Check Applied Bandwidth Limits
✔ Preview WireGuard Configuration
✔ Scan Configuration QR Code
✔ Download Ready-To-Use .conf File
✔ View Daily And Monthly Traffic Statistics
✔ Reset VPN Connection
✔ Access Setup Guide
✔ Download WireGuard Client
  • General Info:
✔ Supports MikroTik RouterOS 7.20 And Later
✔ Supports Multiple MikroTik Routers
✔ Multi-Language Support With Custom Translations Tool
✔ Supports PHP 8.3 Back To PHP 8.2
✔ Supports WHMCS Themes "Six", "Twenty-One", "Nexus" And "Lagom WHMCS Client Theme"
✔ Supports WHMCS V9.X
✔ Requires ionCube Loader V14 Or Later
✔ Easy Module Upgrade To Open Source Version

Installation and Configuration

This tutorial will show you how to successfully install and configure MikroTik WireGuard VPN For WHMCS.
We will guide you step by step through the installation process, MikroTik server connection, product configuration, metric billing setup, addon module management, and client area features.

Installation

1. Log in to our client area and download the module.
MTWG download.png
2. Extract the module package into the main WHMCS directory.

The files should be uploaded into the corresponding WHMCS folders.

MTWG 1.png
3. When you install MikroTik WireGuard VPN For WHMCS for the first time you have to rename 'license_RENAME.php' file.

The file is located in 'modules/addons/MikroikWireGuardVpn For WHMCS/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

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

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

MTWG license2.png
5. Log in to your WHMCS admin area and navigate to System SettingsAddon Modules.
  • Find MikroTik WireGuard VPN on the list and click Activate.
  • Set access permissions for the required administrator roles and save the changes.

The addon module can now be opened through AddonsMikroTik WireGuard VPN.

MTWG 3.png

MikroTik Router Preparation

Before connecting the router to WHMCS, make sure that:

  • MikroTik RouterOS 7.20 or later is installed.
  • A WireGuard interface has been created on the router.
  • The RouterOS REST API is available.
  • The API user has permissions sufficient to manage WireGuard peers, addresses, queues, and traffic data required by the module.
  • The selected HTTP or HTTPS service and port are accessible from the WHMCS server.
  • When a secure connection is used, HTTPS and a valid router certificate are configured correctly.

Important: Restrict API access to trusted IP addresses whenever possible and use HTTPS for production environments.

Server Configuration

6. Navigate to System SettingsServers and click Add New Server.

Choose MikroTik WireGuard VPN from the Module dropdown menu and provide the router connection details.

MTWG 4.png

Configure the following fields:

  • Name – enter a descriptive server name.
  • Hostname – provide the router hostname or IP address.
  • Username – enter the RouterOS API username.
  • Password – enter the password assigned to the API user.
  • Port – provide the port used by the RouterOS REST API.
  • Secure – enable to connect through HTTPS.
  • IP Address Pool – define the tunnel IP address range used to assign addresses to new VPN peers.
7. Use Test Connection to verify the provided credentials and connection settings.

If the test is successful, save the server configuration.

8. Create or select a server group and assign the configured MikroTik server to it.

The server group can later be selected in the product's module settings. Multiple routers may be added to support a larger VPN infrastructure.

MTWG 6.png


Navigation
WHMCS Modules
WHMCS Module Bundles
WHMCS Widgets
Tools And Applications
Translations
General
FAQ
Community