]> Cypherpunks.ru repositories - nncp.git/blob - doc/cfg/index.texi
f9844eaff5c962526ec9b496ee128d5a6bb9d16a
[nncp.git] / doc / cfg / index.texi
1 @node Configuration
2 @unnumbered Configuration file
3
4 NNCP uses single file configuration file in @url{https://hjson.org/,
5 Hjson} format (see also section about @ref{Configuration directory,
6 directory layout}) . Initially it is created with @ref{nncp-cfgnew}
7 command and at minimum it can look like this:
8
9 @verbatim
10 spool: /var/spool/nncp
11 log: /var/spool/nncp/log
12
13 self: {
14   id: RKOLY...KAMXQ
15   exchpub: 2NZKH...CMI7A
16   exchprv: KETPP...2OJZA
17   signpub: EXD7M...YAOFA
18   signprv: B3EMS..XMAHCQ
19   noiseprv: 3TJDF...2D7DQ
20   noisepub: MIXYN...BGNDQ
21 }
22
23 neigh: {
24   self: {
25     id: RKOLY...KAMXQ
26     exchpub: 2NZKH...CMI7A
27     signpub: EXD7M...YAOFA
28     noisepub: MIXYN...BGNDQ
29   }
30 }
31 @end verbatim
32
33 Do not forget that Hjson can be safely converted to JSON and vice versa
34 (loosing formatting and comments of course). By default
35 @command{hjson-cli} utility from @code{github.com/hjson/hjson-go} is
36 built together with @command{nncp-*} commands too. For querying
37 information from the JSON from the command line you can use
38 @code{github.com/itchyny/gojq} and @code{github.com/skanehira/gjo} for
39 building it up.
40
41 And for being able to communicate with at least one other node, you just
42 need to add single key to the @code{neigh} section similar to the "self".
43
44 Whole configuration file can be separated on five sections:
45
46 @menu
47 * General options: CfgGeneral
48 * Self-node keypairs: CfgSelf
49 * Notifications: CfgNotify
50 * Neighbours: CfgNeigh
51 * Areas: CfgAreas
52
53 You can optionally convert it to directory layout
54 * Configuration directory::
55 @end menu
56
57 @include cfg/general.texi
58 @include cfg/self.texi
59 @include cfg/notify.texi
60 @include cfg/neigh.texi
61 @include cfg/areas.texi
62 @include cfg/dir.texi