]> Cypherpunks.ru repositories - nncp.git/blob - doc/cfg/index.texi
Add various documentation indices
[nncp.git] / doc / cfg / index.texi
1 @node Configuration
2 @cindex configuration file
3 @unnumbered Configuration file
4
5 @cindex Hjson
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 @ref{nncp-cfgnew}
9 command and at minimum it can look like this:
10
11 @verbatim
12 spool: /var/spool/nncp
13 log: /var/spool/nncp/log
14
15 self: {
16   id: RKOLY...KAMXQ
17   exchpub: 2NZKH...CMI7A
18   exchprv: KETPP...2OJZA
19   signpub: EXD7M...YAOFA
20   signprv: B3EMS..XMAHCQ
21   noiseprv: 3TJDF...2D7DQ
22   noisepub: MIXYN...BGNDQ
23 }
24
25 neigh: {
26   self: {
27     id: RKOLY...KAMXQ
28     exchpub: 2NZKH...CMI7A
29     signpub: EXD7M...YAOFA
30     noisepub: MIXYN...BGNDQ
31   }
32 }
33 @end verbatim
34
35 @cindex JSON
36 @pindex hjson-cli
37 @pindex gojq
38 @pindex gjo
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
45 building it up.
46
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".
49
50 Whole configuration file can be separated on five sections:
51
52 @menu
53 * General options: CfgGeneral
54 * Self-node keypairs: CfgSelf
55 * Notifications: CfgNotify
56 * Neighbours: CfgNeigh
57 * Areas: CfgAreas
58
59 You can optionally convert it to directory layout
60 * Configuration directory::
61 @end menu
62
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
68 @include cfg/dir.texi