namingo/plexdns

A unified, multi-provider DNS management tool

v1.0.0-RC1 2025-02-26 08:23 UTC

This package is auto-updated.

Last update: 2025-02-26 08:24:49 UTC


README

PlexDNS is a unified, multi-provider DNS management tool that allows users to manage DNS zones and records across multiple DNS hosting providers using a common interface.

🚀 Installation

  1. Go to your project directory and install PlexDNS via Composer:
cd /path/to/your/project
composer require namingo/plexdns
  1. Copy the sample configuration files from vendor/namingo/plexdns to your project root:
cp vendor/namingo/plexdns/env-sample .env
cp vendor/namingo/plexdns/demo.php .
  1. Rename env-sample to .env:
mv .env-sample .env
  1. Edit .env to configure your API credentials and database settings.

  2. The demo.php script demonstrates how to interact with the library, including:

  • Creating and managing DNS zones

  • Adding, updating, and deleting DNS records

  • Listing available DNS providers

🌍 Supported Providers

Most DNS providers require an API key, while some may need additional settings such as authentication credentials or specific server configurations. All required values must be set in the .env file.

Provider Required Credentials
AnycastDNS API_KEY
Bind9 API_KEY, BIND_IP
Cloudflare EMAIL:API_KEY
ClouDNS AUTH_ID, AUTH_PASSWORD
Desec API_KEY
DNSimple API_KEY
Hetzner API_KEY
PowerDNS API_KEY, POWERDNS_IP
Vultr API_KEY

Slave Zone Support

Different DNS providers handle slave (secondary) zones differently. BIND9 and PowerDNS require explicit slave configuration, meaning you must manually add the slave servers to your $config array for them to sync from the master. This involves passing the necessary API details, such as apikey_nsX and bindip_nsX for BIND9 or powerdnsip_nsX for PowerDNS. In contrast, cloud-based DNS providers handle replication automatically, so there is no need to configure slave servers manually. Once a zone is added, it is automatically synchronized across their global infrastructure without additional setup.

BIND9 Example

$config = [
    'apikey' => 'masterUser:masterPass',  // Master API Key
    'bindip' => '192.168.1.100',  // Master BIND9 server IP

    // Slave 1 (NS2)
    'apikey_ns2' => 'slaveUser1:slavePass1',
    'bindip_ns2' => '192.168.1.101',
    
    // You can add up to 13 slave servers (NS2 to NS13)
];

PowerDNS Example

$config = [
    'apikey' => 'master_api_key',  // Master PowerDNS API Key
    'powerdnsip' => '127.0.0.1',  // Master PowerDNS IP
    'pdns_master_ip' => '192.168.1.1', // Master IP for slaves to sync from

    // Slave 1 (NS2)
    'apikey_ns2' => 'slave2_api_key',
    'powerdnsip_ns2' => '192.168.1.2',

    // You can add up to 13 slave servers (NS2 to NS13)
];

Acknowledgements

We extend our gratitude to:

📄 License

PlexDNS is licensed under the MIT License.

📩 Contributing

We welcome contributions! Feel free to submit issues or pull requests to improve the project.

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them.
  4. Submit a pull request.

📞 Support

For any issues, please open an issue on GitHub or contact us at help@namingo.org.