Install BIND 9 on macOS (DNS Server)

When Apple destroyed macOS Server they recommended switching to open source alternatives which were actually integrated into the old Server app also had a DNS Server which was a version of BIND from ISC. The binary which provides the DNS server is called ‘named’. Apple recommended compiling BIND from source and pointing the configuration files to the /Library/Server/named directory. This tutorial includes compiling from source but this process is actually obsolete with new dependencies namely ‘pkg-config’ which you’d have to install with something like MacPorts of HomeBrew anyway which can also provide an automated install of BIND which is what I recommend you do instead; the latest date that you can be supported with the manual source download to is December 2021 with BIND 9.11.33 Current-Stable, ESV .

You will still need to make the plist file and launch the installed ‘named’ which is the same regardless of how you acquire it.

Preparing the Mac (obsolete method, follow MacPorts or HomeBrew instructions instead)

  1. For newer macOS versions you may need to enable Full Disk Access for the in System Preferences > Security & Privacy
  2. Download Xcode from the Mac App Sore
  3. Open Terminal and install the command-line developer tools with the following command: Xcode-select --install
  4. Agree to the Xcode licence agreement: sudo xcodebuild -licence # followed by ‘q’ then type ‘agree’ then press return
  5. cd into your Downloads folder and extract the bind-9.11.33.tar.gz archive with: tar -xvzf bind-9.11.33.tar.gz
  6. : cd bind-9.11.33
  7. Now enter the following command to prepare the source for building: ./configure --infodir="/usr/share/info" --sysconfdir="/etc" --localstatedir="/var" --enable-atomic="no" --with-openssl=no --with-gssapi=yes --enable-symtable=none --with-libxml2=no --without-python
  8. Now perform the build with: make
  9. Finally install everything to /usr/local with: sudo make install

Setup the service (all installations)

With bind installed you now need to make a plist file to load ‘named’ as a service then configure the system to launch it and keep it alive.

  1. You need to create an ‘org.isc.named.plist’ file in /Library/LaunchDaemons/ , the file should have the following contents:
<?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
       <plist version="1.0">
  1. Now set appropriate file permissions with: sudo chown root:wheel /Library/LaunchDaemons/org.isc.named.plist
  2. Load the service for the first time with: sudo launchctl load -w /Library/LaunchDaemons/org.isc.named.plist
  3. Verify it’s working with: launchctl print system/org.isc.named


With all that done you should have DNS server running independent of macOS Server. This should be able to coexist with macOS Server Catalina or latter but will conflict with on macOS Mojave and earlier due to the inclusion of a redundant ‘named’ binary which will kill your new service on startup. To manage the DNS server configuration you edit files in /Library/Server/named/ and issue the command ‘sudo killall -HUP named‘ to make your edits take effect.

Required Files

BIND 9.11.33