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 cmake libidn11-dev libreadline-dev xxd


sudo dnf install gcc gmp-devel gmp-static m4 cmake libidn-devel readline-devel xxd

Compile libnettle from source

FTLDNS uses a cryptographic library (libnettle) for handling DNSSEC signatures. Compile and install a recent version using:

tar -xzf nettle-3.7.2.tar.gz
cd nettle-3.7.2
./configure --libdir=/usr/local/lib
make -j $(nproc)
sudo make install

Since Ubuntu 20.04, you need to specify the library directory explicitly. Otherwise, the library will be installed in custom locations where it would not be found by cmake.

Get the source

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

git clone && cd FTL

If you want to build another branch and not master, use checkout to get to this branch, like

git checkout development

Compile the source

FTLDNS can now be compiled using either the build script


or manually

mkdir -p cmake && cd cmake
cmake ..
cmake --build . -- -j $(nproc)

Note that both ways are exactly equivalent and that you do not need root privileges here.

Install the new binary system-wide

Install the new binary using either

./ install


cd cmake && sudo make install

Finally, restart FTLDNS to use the new binary:

sudo service pihole-FTL restart

Last update: September 15, 2021