Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]

Modules and Plugins [+] Modules and Plugins [-]

cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]

cPAddons (Site Software) [+] cPAddons (Site Software) [-]

System Administration [+] System Administration [-]

Developer Software [+] Developer Software [-]

Back to All Documentation

Pluggable dnsadmin Modules

For cPanel & WHM 11.30+


You can create custom dnsadmin modules for your cPanel & WHM and DNSONLY systems. These modules can update DNS records on external systems in real time.

A dnsadmin plugin consists of two modules:

  1. The Setup module — This module handles the plugin's initial configuration, defines to whom the module is available, and creates configuration files for your DNS cluster.
  2. The Remote module — This module communicates with external systems in your DNS cluster. It accepts, handles, and builds dnsadmin commands to pass to other systems.

How does dnsadmin work?

The dnsadmin system is used to manage DNS. This system manages zones that are stored locally and communicates with remote systems in your DNS cluster. This system can interact with numerous remote systems, called nodes.

When the dnsadmin system receives a cPanel & WHM API call, such as savezone or getzone, it responds with another API call based on the first call's result.

When dnsadmin receives a request for an action, it issues the request to every node in the cluster and passes the action to nodes associated with the account that made the request. Each action is assigned a dnsuniqid identification value. This ID is a random string that prevents duplicate actions in complicated peering setups where a single request might be repeated.

Configure Additional Nodes

To configure additional nodes for an account, create a file in the /var/cpanel/cluster/$username/config/ directory.
note Note: Replace $username with the username of the account whose node you wish to configure.

You will need to enter key-value pairs in this file. Each of the key pairs specifies how data should be passed to the remote module when it interacts with remote systems in the DNS cluster.

#version 2.0

note Note: Only the user, host, pass, and module values are required.

Node Roles

Each node in your DNS cluster will have a specific role that determines which commands it can send and receive. Node roles are defined in the /var/cpanel/cluster/$username/config/node-dnsrole directory.
note Note: Replace $username with the username of the account whose node you wish to configure.

The available roles are:

Role Description
synchronize All actions received by this node are sent to remote DNS servers in the cluster.
write-only This node will only receive actions from other nodes.
standalone This node will not send or receive any action.

Module Documentation

  • How to write Setup Modules — This module of your dnsadmin plugin controls how a node's configuration file is written and how it appears in the interface.
  • How to write Remote Modules — Your dnsadmin plugin's remote module is responsible for communicating with other systems in your DNS cluster.

Topic revision: r11 - 10 Jul 2013 - 12:57:13 - Main.ColinShannon
SoftwareDevelopmentKit.PluggableDnsAdminModules moved from Sandbox.PluggableDnsAdminModules on 23 Aug 2011 - 16:20 by Main.JustinSchaefer - put it back