knotc(8)

NAME
knotc - Knot DNS control utility

SYNOPSIS
knotc [parameters] <action> [action_args]

DESCRIPTION

  Parameters:

-c [file], --config=[file] Select configuration file.

-j [num], --jobs=[num]
    Number of parallel tasks to run (only for 'compile').

-s [server] Remote server address (default 127.0.0.1)

-p [port] Remote server port (default 5553)

-y [hmac:]name:key] Use key_id for specified on the command line.

-k [file] Use key file (as in config section 'keys').
    f.e. echo "knotc-key hmac-md5 Wg==" > knotc.key If you omit algorithm, hmac-md5 will be used as default.

-f, --force
    Force operation - override some checks.

-v, --verbose
    Verbose mode - additional runtime information.

-V, --version
    Print knot server version.

-w, --wait
    Wait for the server to finish start/stop operations.

-i, --interactive
    Interactive mode (do not daemonize).

-a, --auto
    Enable automatic recompilation (start or reload).

-h, --help
    Print help and usage.

  Actions:

start
    Start knot server daemon (no-op if running).

stop
    Stop knot server daemon (no-op if not running).

restart
    Stops and then starts knot server daemon.

reload
    Reload knot configuration and compiled zones.

flush
    Flush journal and update zone files.

status
    Check if server is running.

zonestatus
    Show status of configured zones.

compile
    Compile zone file.

refresh
    Refresh slave zones (all if not specified).

checkconf
    Check server configuration.

checkzone
    Check zones before compiling (accepts specific zones, f.e. 'knotc checkzone example1.com example2.com').

  EXAMPLES

Setup a keyfile for remote control

1. Generate keys
    dnssec-keygen -a hmac-md5 -b 256 -n HOST knotc-key

2. Extract secret in base64 format and create keyfile
    echo "knotc-key hmac-md5 <secret>" > knotc.key Make sure the key can be read/written only by owner for security reasons.

Reload server remotely
    knotc -s 127.0.0.1 -k knotc.key reload

SEE ALSO
The full documentation for Knot is maintained as a Texinfo manual. If the info and Knot programs are properly installed at your site, the command

    info Knot

should give you access to the complete manual.