nncpnet-mailnode is highly configurable. There are hooks at various places for you to perform all sorts of actions. It is designed to be easy to derive from; that is, to have a Dockerfile
beginning with FROM jgoerzen/nncpnet-mailnode
.
nncpnet-mailnode is based on docker-debian-base's jgoerzen/debian-base-security
image. All of the customizations documented there are also possible here.
Container filesystem layout
Here's how the directories within the container are laid out:
- /opt/nncpnet/ - parent of nncpnet-mailnode files
- bin/ -- scripts and executables
- etc/ -- user settings
- cfg/ -- user nncp configs
- selfpub/ -- node's own public keys
- selfprv/ -- node's own private keys
- nncp-cfg-tmpl/ -- NNCP configuration template, in NNCP configuration directory format. This will be used by
/opt/nncpnet/bin/nodelist-proc
to augment or override any part of the generated configuration. By default it is populated with info aboutself
(your own node) andquux
. - mynodename -- local nodename
- cfg/ -- user nncp configs
- /persist -- files that should persist across container re-creation
- home/ -- symlinked from /home
- incoming/ -- where incoming nncp-file / nncp-freq files are placed
- quux/ -- specifically for quux; nodelist.tar.gz appears here
- log/ -- symlinked from /var/log
- mail/ -- symlinked from /var/mail, unused in default configuration
- spool/ -- symlinked from /var/spool
- nncp/ -- NNCP's running spool directory
- log -- NNCP's log file
- nncp/ -- NNCP's running spool directory
- nncp-cfg/ -- running NNCP configuration directory, auto-generated
Configuration variables
Most of the instructions in this wiki assume you are using the environment to configure the container. These settings are actually written into files on the system. You can instead write those files directly and avoid the environment configuration system altogether.
You can find a full reference to the configuration variables and their corresponding locations in the preinit/61-configs script.
Adding private nodes
You can add information about your own nodes, or your own local routes to them, to the NNCP template in /opt/nncpnet/etc/nncp-cfg-tmpl
. For instance, if you have a path to a node that does not go via quux, you can note it there. You can also add nodes there that are unkown to quux, while still letting the system populate nodes that quux knows.
Operating without quux
You can operate this fully without quux. To do so, you will want to set NNCPNET_NO_NODELIST=1
, which will disable the automatic requesting and processing of nodelists from quux. You will then need to manually assemble /persist/nncp-cfg
using the NNCP configuration directory format.
Fully disconnected operation
You can operate without any Internet access at all.
In this case, you probably want to set NNCPNET_NO_NODELIST=1
even though you may still have a path to quux. You might also want to delete /usr/local/preinit/03-security
and dpkg --purge unattended-upgrades
.
Of course, you will need to method to transfer packets off the system. You might do this by routing them via nncp on your host system, and from there to USB sticks or something.