2024-07-16 What's the minimal NNCP setup to get started?
This page is for you if you are curious about NNCP and you don't know how to get started. It contains instructions on how to set up your laptop such that it can exchange files with my laptop (melanobombus) via my server (sibirocobombus).
Before testing it, you need to send me an email with some info but we'll get to that.
First, switch to the root user. Everything will be easier that way.
The instructions are going to assume a Debian system.
Begin by installing the `nncp` package.
Generate a new `/etc/nncp.hjson` file and secure it:
You need to add my server to your `/etc/nncp.hjson` file, in the `neigh` section.
What does it mean?
1. you know how to contact my server via the `.addrs.internet` key – you need this, but you can specify `campaignwiki.org` instead, if your prefer
2. you connect to my server every now and then via the `calls[0].cron` entry – this is not necessary if you don't mind using `nncp-call` every now and then
My laptop can only be reached via my server. You need to add it as well.
As far as the `melanobombus.incoming` key goes, pick a suitable directory that your regular account has access to.
What does it mean?
1. you know how to contact my laptop via my server using the `.via[0]` key – you need this and the name needs to match the name you used for my server
2. you allow my laptop to save incoming files in a directory via the `.incoming` key – you only need this if you want to receive files (the directory must exist and the `nncp` group must be allowed to write to it)
3. you allow my laptop to send mail to local users via the `.exec.rsmtp` key – this is not necessary if you don't want to receive mail
You would create the incoming directory as follows, as your regular user:
You need to send me your system's public keys from the `/etc/nncp.hjson` file so that I can set up similar entries on my laptop and my server.
Once I've added your public keys (and an `incoming` key) to my server, we can test it. If I forget the `incoming` key, the logs will show "freqing is not allowed".
My server will not call you, since it doesn't know your Internet address. It waits for you to call it both when you want to send or when you want to receive something. You would do this as follows:
Otherwise, the `@daily` entry in the `sibirocobombus.cron[0]` entry of your `/etc/nncp.hjson` file will call my server once a day, at midnight.
To send me a README file, you'd run:
At this point, the file is in the queue.
To examine the queue:
You need to to call my server using `sudo -u nncp nncp-call sibirocobombus` to actually send the files or you'll have to wait for the cron job. My server will receive the packets encrypted and addressed to my laptop and enqueue them again. The next time my laptop calls my server, it'll get them.
You probably want to let me know about the file via another channel. But soon enough we can set up mail via NNCP. 😁
#Administration #NNCP
**2024-08-09**. See NNCP setup automation for the next step.