Next: , Previous: , Up: NNCP  


Configuration file

NNCP uses single file configuration file in Hjson format (see also section about directory layout) . Initially it is created with nncp-cfgnew command and at minimum it can look like this:

spool: /var/spool/nncp
log: /var/spool/nncp/log

self: {
  id: RKOLY...KAMXQ
  exchpub: 2NZKH...CMI7A
  exchprv: KETPP...2OJZA
  signpub: EXD7M...YAOFA
  signprv: B3EMS..XMAHCQ
  noiseprv: 3TJDF...2D7DQ
  noisepub: MIXYN...BGNDQ
}

neigh: {
  self: {
    id: RKOLY...KAMXQ
    exchpub: 2NZKH...CMI7A
    signpub: EXD7M...YAOFA
    noisepub: MIXYN...BGNDQ
  }
}

Do not forget that Hjson can be safely converted to JSON and vice versa (loosing formatting and comments of course). By default hjson-cli utility from github.com/hjson/hjson-go is built together with nncp-* commands too. For querying information from the JSON from the command line you can use github.com/itchyny/gojq and github.com/skanehira/gjo for building it up.

And for being able to communicate with at least one other node, you just need to add single key to the neigh section similar to the "self".

Whole configuration file can be separated on five sections: