Next: , Up: Running Knot DNS   [Contents][Index]


5.1 Running a slave server

Running the server as a slave is very straightforward as you usually bootstrap zones over AXFR and thus avoid any manual zone compilation. In contrast to AXFR, when the incremental transfer finishes, it stores the differences in a journal file and doesn’t update the zone file immediately. There is a timer that checks periodically for new differences and updates the zone file. You can configure this timer with the zonefile-sync statement in zones (see zones).

There are two ways to start the server - in foreground or background. First, let’s start in foreground. If you do not pass any configuration, it will try to search configuration in default path that is SYSCONFDIR/knot.conf. The SYSCONFDIR depends on what you passed to the ./configure, usually /etc.

$ knotd -c slave.conf

To start it as a daemon, just add a -d parameter. Unlike the foreground mode, PID file will be created in rundir directory.

$ knotd -d -c slave.conf # start the daemon
$ knotc -c slave.conf stop # stop the daemon

When the server is running, you can control the daemon, see Controlling running daemon.