YADIFA is available in Debian repositories (since Debian 9). For RHEL and derivatives, build from source. The latest stable version is 3.0.2 (March 2025).
YADIFA is available in the official Debian and Ubuntu repositories:
sudo apt update
sudo apt install yadifa
sudo systemctl enable --now yadifa
Package info:
YADIFA is not available in standard RHEL repositories. Build from source:
# RHEL 9+ / AlmaLinux / Rocky Linux
sudo dnf groupinstall "Development Tools"
sudo dnf install openssl-devel lmdb-devel libxml2-devel autoconf automake libtool
# Download latest stable release (3.0.2 as of March 2025)
curl -LO https://downloads.yadifa.eu/releases/yadifa-3.0.2.tar.gz
tar -xzf yadifa-3.0.2.tar.gz
cd yadifa-3.0.2
# Bootstrap the build system
./bootstrap.sh
# Configure (install prefix defaults to /usr/local)
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# Build and install
make
sudo make install
Create the yadifa user and directories:
# Create system user
sudo useradd --system --no-create-home --shell /usr/sbin/nologin yadifa
# Create directories
sudo mkdir -p /etc/yadifa /var/lib/yadifa/zones /var/log/yadifa
sudo chown -R yadifa:yadifa /etc/yadifa /var/lib/yadifa /var/log/yadifa
/etc/yadifa/yadifad.conf (note: yadifad.conf, not yadifa.conf)/var/lib/yadifa/zones//var/log/yadifa/If you installed from source, create a systemd unit file:
[Unit]
Description=YADIFA Domain Name Server
Documentation=man:yadifad(8)
After=network.target
[Service]
Type=simple
ExecStart=/usr/sbin/yadifad --nodaemon -c /etc/yadifa/yadifad.conf
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
User=yadifa
Group=yadifa
CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_IPC_LOCK CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectHome=true
ProtectControlGroups=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
ReadOnlyPaths=/etc/yadifa
ReadWritePaths=/run /var/lib/yadifa /var/log/yadifa
RestrictRealtime=true
[Install]
WantedBy=multi-user.target
Save as /etc/systemd/system/yadifa.service, then:
sudo systemctl daemon-reload
sudo systemctl enable --now yadifa
sudo systemctl status yadifa
# Check version
yadifad --version
# Check service status
sudo systemctl status yadifa
# Verify listening on port 53
sudo ss -tulnp | grep :53
# Test DNS query
dig @localhost example.com
Prefer automation? See the following Ansible playbooks:
Note: There is no official YADIFA Docker image on Docker Hub. See the following guides:
See YADIFA Configuration for configuration guidance.
See YADIFA Security for hardening guidance.
Need professional assistance with your authoritative DNS infrastructure? Our team provides:
Get in touch: office@linux-server-admin.com | Contact Page