The Sample DNS Server Integration provides a sample implementation of an external DNS server integration in PanelAlpha. It follows the same architecture as built-in integrations such as Cloudflare (Zone + Zone/Record) with direct API calls for record operations.
- Connection
- Test connection
- Connection config fields (API URL, API key, nameservers)
- Server-side zone search
- Zones
- List zones
- Find zone
- Search zones
- Check zone exists
- Create zone
- Delete zone
- Get zone details
- DNS records
- List records
- Create record
- Update record
- Delete record
- Supported types: A, AAAA, CNAME, MX, TXT, SRV, NS, PTR, CAA, and more (see
Zone/Record.php)
- Nameservers
- Static nameservers from connection config
Replace the built-in sampleAPI() mock with your real API client to connect to your DNS provider.
app/Lib/Integrations/DnsServers/
├── SampleDnsServer.php # Main integration class
└── SampleDnsServer/
├── Zone.php # Zone operations + listRecords()
└── Zone/
└── Record.php # Record create / update / delete
-
Download the sample
Clone or download this repository as a base template. -
Apply required changes
Replace everySampleDnsServerreference with your integration name, e.g.:- rename
app/Lib/Integrations/DnsServers/SampleDnsServer.phptoMyDnsProvider.php - replace
class SampleDnsServerwithclass MyDnsProviderin that file - rename directory
app/Lib/Integrations/DnsServers/SampleDnsServertoMyDnsProvider - update namespaces
App\Lib\Integrations\DnsServers\SampleDnsServertoMyDnsProviderin:MyDnsProvider/Zone.phpMyDnsProvider/Zone/Record.php
- update
$name,$slug, and$documentationUrlstatic properties
- rename
-
Upload the integration
Copy the contents of theappdirectory to/opt/panelalpha/app/packages/api/appon your PanelAlpha server. -
Activate the integration
Run as root on the server:docker compose -f /opt/panelalpha/app/docker-compose.yml exec api php artisan integrations:sync -
Replace example code with your own
ReplacesampleAPI()with your real API client factory. Pass connection config from the constructor andtestConnection(), then implement zone and record methods used inZone.phpandZone/Record.php(getZones,findZone,searchZones,getZone,createZone,deleteZone,listRecords,createRecord,updateRecord,deleteRecord).
This repository is licensed under the MIT License.