PowerDNS Manager for WHMCS

PowerDNS Manager is a WHMCS addon module that provides seamless DNS management for domains and hosting products using a PowerDNS server. It allows both administrators and clients to manage DNS zones and records directly from the WHMCS interface, with full automation and integration.


Features

  • Automatic Zone Creation/Deletion:
    Zones are automatically created when a domain is registered or transferred in, and deleted when a domain is terminated in WHMCS. Robust retry logic ensures zone creation even if there are minor delays in WHMCS database updates.
  • Automatic Zone Association on Transfer:
    When a domain is transferred in, if a matching zone exists on the PowerDNS server, it is associated in WHMCS. If no zone exists, a new zone is created and associated automatically.
  • Client & Admin DNS Management:
    Both clients and admins can view, add, edit, and delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS) for their domains.
  • SOA Serial Auto-Increment:
    Automatically increments the SOA serial when records are changed, ensuring proper DNS propagation.
  • Nameserver Management:
    Default nameservers are protected and cannot be modified by clients.
  • Localization:
    All user-facing strings are localized (English provided; more languages can be added).
  • WHMCS Integration:
    • Menu items in client and admin areas.
    • Hooks for domain and service lifecycle events.
    • Full support for WHMCS permissions and licensing.
  • Audit Logging:
    All important actions and errors are logged to the WHMCS activity log.
  • Responsive UI:
    Modern, user-friendly templates with modals for record management and DataTables for easy searching/filtering.

Server Module

In addition to domain automation, PowerDNS Manager also provides a server provisioning module at modules/servers/powerdns_manager. You can create a simple product (such as "DNS Zone") in WHMCS and assign this server module, allowing automatic DNS zone creation and management when the product is ordered, activated, or terminated—ideal for DNS hosting as a standalone service.


PowerDNS Master-Slave Compatibility

This module is tested and verified on a PowerDNS master-slave setup as described in the following guide: Setting Up PowerDNS Master-Slave Setup with Auto Zone Management and Import (ArkHost Knowledgebase)


Requirements

  • WHMCS 8.9 or later
  • PowerDNS (Authoritative Server) with API enabled
  • PHP 7.4+
  • cURL PHP extension

Installation

  1. Upload the Module:
    • Copy the entire modules directory to root in your WHMCS installation.
  2. Activate the Module:
    • In WHMCS admin, go to Setup > Addon Modules.
    • Find "PowerDNS Manager" and click "Activate".
  3. Configure the Module:
    • Click "Configure" next to PowerDNS Manager.
    • Enter your license key, PowerDNS API URL, API key, server name, and default nameservers.
    • Save changes.
  4. Set Permissions:
    • Assign admin roles as needed for access to the module.
  5. (Optional) Customize Language:
    • Edit or add files in modules/addons/powerdns_manager/lang/ for additional languages.

Usage

For Admins

  • Associate WHMCS domains/services domain names to existing zones on the PowerDNS server.
  • Manage all DNS zones and records from the module's admin interface.
  • Sync, delete, or bulk synchronize zones with PowerDNS.

For Clients

  • Access DNS management from the client area sidebar or domain details page.
  • Add, edit, and delete DNS records for their domains.
  • Protected default nameservers cannot be modified.

File Structure

  • powerdns_manager.php - Main module logic and admin interface
  • hooks.php - WHMCS event hooks and automation (including robust retry logic for domain registration)
  • lib/PowerDNSAPI.php - PowerDNS API wrapper
  • lib/WhmcsAPI.php - WHMCS API helper
  • templates/ - Smarty templates for client/admin UI
  • lang/ - Language files
  • license.php - License validation logic (not yet production-ready)

Automation & Hooks

  • AfterRegistrarRegistration:
    Automatically creates a DNS zone in PowerDNS when a domain is registered. If the domain is not immediately available in the WHMCS database, the module retries for up to 4.5 seconds to ensure reliable zone creation.
  • AfterRegistrarTransfer:
    When a domain is transferred in, the module checks if a zone exists on PowerDNS. If it does, it associates the zone in WHMCS; if not, it creates a new zone and associates it.
  • DomainDelete:
    Deletes the DNS zone from PowerDNS when a domain is terminated (if no service association exists).
  • AfterModuleTerminate:
    Cleans up service associations when a hosting service is terminated.
  • Menu Integration:
    Adds "DNS Management" to client area menus and domain details.

Security

  • API keys are never exposed in the UI.
  • Direct file access is blocked.
  • Only authorized users can manage DNS for their domains/services.

Troubleshooting

  • All API errors and important actions are logged in the WHMCS activity log.
  • If you see license or API configuration warnings, ensure your settings are correct in the module configuration.
  • If a domain is registered or transferred and a zone is not created, check the activity log for retry/failure messages.

License

A valid license key is required to use this module.
Purchase or manage your license at ArkHost.


Support

For support, feature requests, or bug reports, please contact ArkHost Support.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

AI Support Assistant for WHMCS

The AI Support Assistant module revolutionizes your WHMCS support operations by automatically...