Skip to content

Install from source

We pre-compile FTLDNS for you to save you the trouble of compiling anything yourself. However, sometimes you may want to make your own modifications. To test them, you have to compile FTLDNS from source. Luckily, you don't have to be a programmer to build FTLDNS from source and install it on your system; you only have to know the basics we provide in here. With just a few commands, you can build FTLDNS from source like a pro.

Installing the Required Software

First, we'll install the basic software you'll need to compile from source, like the GCC compiler and other utilities. Install them by running the following command in a terminal:

Debian / Ubuntu / Raspbian
sudo apt install build-essential libgmp-dev m4
Fedora
sudo dnf install gcc gmp-devel gmp-static m4

You'll also need to compile nettle as FTLDNS uses libnettle for handling DNSSEC. Compile and install a recent version of nettle (we recommend 3.5):

wget https://ftp.gnu.org/gnu/nettle/nettle-3.5.tar.gz
tar -xvzf nettle-3.5.tar.gz
cd nettle-3.5
./configure
make
sudo make install

Get the FTLDNS source

Now, clone the FTLDNS repo (or your own fork) to get the source code of FTLDNS:

git clone https://github.com/pi-hole/FTL.git
cd FTL

If you want to build another branch and not master, use checkout to get to this branch (e.g. git checkout development).

FTLDNS can now be compiled and installed:

make -j 4
sudo make install

Finally, restart FTLDNS to use the new binary:

sudo service pihole-FTL restart

Last update: April 20, 2020