💾 Archived View for jsreed5.org › log › 2024 › 202402 › 20240218-reconfiguring-nncp.gmi captured on 2024-03-21 at 15:11:09. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
---
Outside the occasional file transfer from a few core nodes, I haven't used NNCP much in the last several months. Recently I decided to leverage NNCP's remote execution feature to trigger downloads from many nodes, which led me to discover that my setuo is quite broken.
To ensure compaitibility, I wanted to put the same version of NNCP on every node in my cluster, but the version I'd been using (v8.8.2) did not compile correctly on Termux. Some public keys had been copied incorrectly or into wrong parts of various nodes' configuration files. The result was a web of intermittently-working connections that sometimes couldn't spool packets and sometimes couldn't decrypt them.
Yesterday I reinstalled and reconfigured NNCP on all of my nodes so I could fully resolve the issue. Each node has a direct connection to each other node via Syncthing, so I powered on every node simultaneously so they could all connect and facilitate the reconfiguration.
The process was simple but tedious. I compiled and installed v8.10.0, the most recent version of NNCP, on every device. Then on each node, I cleared out the old spool and config directory, generated a new config directory, and shared the node's public keys to the other nodes via Syncthing. Once that was finished, I could easily iterate through the Syncthing folders on each node and import all the keys at once.
I work with infrastructure-as-code tools in my professional life: at my previous job I used Ansible, and now I use SaltStack. I don't have any such tools in my home network. But all the manual work to simply update one program accross many devices and standardize its configuration certainly makes me want some automation tools!
My next goal is to improve switching. Some of my devices almost never run concurrently, such as my DevTerm kit and my laptop. Other nodes run continually, such as my file server. When I create an NNCP packet, I'd like to detect automatically if the target node is disconnected in Syncthing, and if so, to route the packet through an always-on node. Fortunately, Syncthing's REST API can give me that information.
---
[Last updated: 2024-02-18]