This document covers the installation of the PDNS Console Web Interface, MySQL/MariaDB database and PowerDNS Authoritative Server with DNS Zones in Native Mode.
These options will be covered in addtional documentation:
Please visit https://pdnsconsole.com/demo.php to test a fully functional demo.
Please reach out with any input, feature requests or bugs.
Note: PDNS Console operates in Native mode only. MASTER/SLAVE workflows are not exposed in the UI; all authoritative servers should share the same PowerDNS database.
git clone https://github.com/andersonit/pdnsconsole.git
cd pdnsconsole
# Copy the sample configuration
cp config/config.sample.php config/config.php
# Edit with your database credentials
nano config/config.php
# Create the databse
mysql -u root
*** commands to create db ***
# Import the complete schema (PowerDNS + PDNS Console tables)
mysql -u your_user -p your_database < db/complete-schema.sql
Edit config/app.php
and change the encryption key:
define('ENCRYPTION_KEY', 'your-unique-32-character-secret-key');
php cli/create_admin.php
Point your web server document root to the webroot/
directory.
Point your browser to the site (root or subdirectory where webroot/
is served) and log in with the super admin you created.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
Adjust php version if necessary
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Set permissions to allow uploads of images for white lable branding
sudo mkdir -p /var/www/pdnsconsole/webroot/assets/img/uploads
sudo chown -R www-data:www-data /var/www/pdnsconsole/webroot/assets/img/uploads
sudo find /var/www/pdnsconsole/webroot/assets/img/uploads -type d -exec chmod 750 {} \;
sudo find /var/www/pdnsconsole/webroot/assets/img/uploads -type f -exec chmod 640 {} \;
sudo chmod g+s /var/www/pdnsconsole/webroot/assets/img/uploads
Add these headers to your web server configuration:
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains
To support automated tasks, schedule the provided scripts:
cron/dnssec_rollover.php
cron/session_cleanup.php
Example crontab entries (adjust PHP path):
*/15 * * * * /usr/bin/php /var/www/pdnsconsole/cron/dnssec_rollover.php > /dev/null 2>&1
0 * * * * /usr/bin/php /var/www/pdnsconsole/cron/session_cleanup.php > /dev/null 2>&1