Changing syncthing ID after cloning the SD card for a Raspberry Pi computer

Syncthing is wonderful open-source software for sharing data and programs among computers, using encryption for security during transmission among your computers. It doesn’t store anything on the servers of companies which might someday decide that not being evil isn’t so profitable. Syncthing can only sync files among computers when they’re on at the same time, so I set up an always-on Raspberry Pi as a private server. This is very easy to do. Actually, installing software (syncthing and matplotlib, for example) has been easier on the Raspberry Pi than on any of my other computers.

The latest Raspberry Pi is a wonderful little computer, so wonderful they can be hard to buy. I blame nitrogen-fixation researchers in Denmark who used 180 Raspberry Pi’s with cameras to track the growth of 1800 clover plants.

I only have a few Raspberry Pi’s, but one is central to my nitrogen-fixation experiments: weighing plants to track water use as a proxy for leaf area, photographing nodulated roots so the the RootPainter AI can identify nodules, and controlling my low-cost, Pyboard-based board for measuring the N-per-CO2 efficiency of nitrogen fixation. If this works as well as I hope, I plan to offer the board to other nitrogen-fixation researchers — it should be inexpensive enough for high-school science classes and science hobbyists — along with the Raspberry Pi software on an SD card.

As a preliminary test, I cloned the SD card (analogous to a golem’s “chem”) with the current Raspberry Pi software. Great, now I have a second Pi with all the same software… including syncthing.

Except… now the cloned computer has the same syncthing ID as its parent, causing all sorts of sync conflicts.

I needed to change the syncthing ID on the cloned Raspberry Pi SD card. I found the solution on the web. Just delete:

.config/syncthing/cert.pem and .config/syncthing/key.pem

…but I couldn’t find that directory…

…until I ran View/Show Hidden in Raspian’s file manager. Then I found the .pem files, deleted them, and rebooted.

Sure enough, when I reran syncthing, it came up with a new ID. When I clone the chem for other people, I’ll delete the .pem files first, so they get their own syncthing ID the first time they run syncthing. (Assuming they want syncthing, and why wouldn’t they? It’s wonderful.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s