copy links the way WinSCP does it

Hi Guys. First, I am a noob and not a native English speaker, sorry for that. I have a NextcloudVM which generates LE-Certificates and I want to use those Certificates outside the vm for other Services on my Windows PC. But syncthing is not copying those certs, because they are “links”(?). The problem is that LE creates new certificates with new names. I could sync those in the Archive Folder of LE, but then I have the problem that the name changes all the time. When I copy the “links” with WinSCP it is what i want. So do I miss something? It would be nice to configure the “share” to follow those links.

Syncthing doesn’t sync symlinked targets - at least on Windows. Setting a folder path in Synching to the root where the “real” files (not links) reside in and generating a fitting ignore file for sub-contents you don’t wish to sync might solve your Problem.

1 Like

It will not because the real filenames do change to often. Only the link-file has the needed name which is not changing.

Syncthing does not follow symlinks, and there is no way to change that.

1 Like

@BobD what are you using to generate the certificates?

Ok. :disappointed_relieved:

https://www.hanssonit.se/nextcloud-vm/

I don’t understand why the script creates LE certs with new names but my suggestion would be to simply sync the files (not links) to the windows machine and sort things out there. Since there is always one file for cert, chain, etc. you can output the content of e.g. chain*.pem into (always same) file cert.pem

Or both, the dir with links and dir with certs.

certbot, the “official” client for LE, will keep every cert ever created in /etc/letsencrypt/archive/{domain}/ while linking the current one in /etc/letsencrypt/live/{domain}/. So by syncing the archive folder, you need to get the latest cert / highest number in the domain folder and work with that.

I would try bindfs with the --resolve-symlinks option and mount it readonly. With that, you should be able to sync the live folder.

He wants to sync to Windows, so no Symlink sync ;).

Just to make my use case clearer: The actual files have changing names every now and then(numbers at the end) but that is not good if you want to use them automatically in other programs and OS like I want.

Copying the link file with WinSCP gives me what I need, the actual file with the name of the link-file, which is always the same (without the number). So i wish syncthing would integrate this “behavior”, at least as an option, because then I woulnd’t need to rename the files each and every time the certificates are changing.

Anyone know a program who can do the job and is usable by a noob like me? :wink:

Thanks for clarifying! Other ideas:

  • copy manually (it’s only 4-5 times per year)
  • setup separate certbot on windows machine
  • learn to write scripts and resolve links/copy files on NextcloudVM
  • ask for help at https://community.letsencrypt.org

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