How to Install PDNS Gui on Void Linux

PDNS Gui is a front-end web interface for the PowerDNS server. It provides a user-friendly interface to manage DNS zones, records and configuration settings. In this tutorial, we'll learn how to install PDNS Gui on Void Linux.

Prerequisites

Before we start, make sure you have the following prerequisites:

Step 1: Install Dependencies

PDNS Gui requires some dependencies to be installed on your system.

Open the terminal and run the following command to install the dependencies:

sudo xbps-install -S nginx php-fpm curl git

Step 2: Configure Nginx

PDNS Gui uses Nginx as the web server. Now, we need to configure Nginx to serve PDNS Gui.

Open the /etc/nginx/nginx.conf file using your favorite text editor and add the following lines at the end of the http block:

server {
listen 80;
server_name example.com;
root /path/to/pdns-gui/public;
index index.php;

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

Make sure to replace example.com with your own domain name and /path/to/pdns-gui/public with the path to your PDNS Gui installation.

Save the file and exit the text editor. Now, restart Nginx using the following command:

sudo service nginx restart

Step 3: Install PDNS Gui

Now, we're ready to install PDNS Gui.

Run the following command to clone the PDNS Gui repository:

git clone https://github.com/odoucet/pdns-gui.git

Move into the pdns-gui directory:

cd pdns-gui

Run the following command to install the necessary dependencies:

composer install --no-dev

This will take some time to complete.

Step 4: Configure PDNS Gui

PDNS Gui requires some configurations to be set.

Copy the .env.example file to .env:

cp .env.example .env

Now, open the .env file using your favorite text editor and set the following values:

APP_ENV=prod
APP_DEBUG=false
APP_URL=http://example.com
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pdns
DB_USERNAME=root
DB_PASSWORD=secret
PDNS_API=http://127.0.0.1:8081

Make sure to replace example.com with your own domain name, root with the database username and secret with the password for that user.

Save the file and exit the text editor.

Step 5: Run Migrations

PDNS Gui requires some database migrations to be run.

Run the following command to run the migrations:

php artisan migrate

Step 6: Start PHP FPM

PDNS Gui requires PHP FPM to be started.

Run the following command to start PHP FPM:

sudo service php-fpm start

Step 7: Access PDNS Gui

Now, open your web browser and navigate to http://example.com.

You should see the PDNS Gui login page.

Use the default admin credentials admin@example.com and password to log in.

Congratulations! Now, you can manage your PowerDNS server using PDNS Gui.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!