2 @cindex configuration file
3 @unnumbered Configuration file
6 NNCP uses single file configuration file in @url{https://hjson.org/,
7 Hjson} format (see also section about @ref{Configuration directory,
8 directory layout}) . Initially it is created with @command{@ref{nncp-cfgnew}}
9 command and at minimum it can look like this:
12 spool: /var/spool/nncp
13 log: /var/spool/nncp/log
17 exchpub: 2NZKH...CMI7A
18 exchprv: KETPP...2OJZA
19 signpub: EXD7M...YAOFA
20 signprv: B3EMS..XMAHCQ
21 noiseprv: 3TJDF...2D7DQ
22 noisepub: MIXYN...BGNDQ
28 exchpub: 2NZKH...CMI7A
29 signpub: EXD7M...YAOFA
30 noisepub: MIXYN...BGNDQ
39 Do not forget that Hjson can be safely converted to JSON and vice versa
40 (loosing formatting and comments of course). By default
41 @command{hjson-cli} utility from @code{github.com/hjson/hjson-go} is
42 built together with @command{nncp-*} commands too. For querying
43 information from the JSON from the command line you can use
44 @code{github.com/itchyny/gojq} and @code{github.com/skanehira/gjo} for
47 And for being able to communicate with at least one other node, you just
48 need to add single key to the @code{neigh} section similar to the "self".
50 Whole configuration file can be separated on five sections:
53 * General options: CfgGeneral
54 * Self-node keypairs: CfgSelf
55 * Notifications: CfgNotify
56 * Neighbours: CfgNeigh
59 You can optionally convert it to directory layout
60 * Configuration directory::
63 @include cfg/general.texi
64 @include cfg/self.texi
65 @include cfg/notify.texi
66 @include cfg/neigh.texi
67 @include cfg/areas.texi