No evidence of new device id

I deleted the ~/.config/syncthing/key.pem and cert.pem so that a new device id is created (I need to be able to clone my device drive onto another device). However, when I run the web gui and restart syncthing, the same device id as before the deletion shows up in the “Show ID” page.

Is that normal?

I suspect syncthing is started with -home or via some service manager which keeps syncthings configs somewhere else than you expect.

Just tested it and it works for me, so it doesn’t seem normal. But I would always stop syncthing before deleting the certificate files and then start it again.

Yes syncthing is started as a service (as described here). I’ll check on that other config directory tomorrow when I get my hand on the device.

Thanks for the quick reply!

Ok, I’ve checked and, as expected, the config is somewhere else. Since I start the service as root, the config is in /root/.config/syncthing/. Deleting the key.pem and cert.pem in this folder then restarting syncthing from the Web UI changes the Device ID.

Thanks for the precious and fast help!

Best regards

Generally speaking, don’t do that. Use a normal unprivileged user.

Yeah I know it is a bad idea, but the process creating the files to sync has to be run as root. Thus, if syncthing is not root it can’t read/write them … (it is a device that uses WiringPi GPIOs)

ACLs can help there, potentially.

Thanks, I’ll look into that to solve my permission issues and retransfer syncthing to the user.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.