My purpose is to have encrypted files on a webdav Nextcloud server accessible and synchronizable for several Windows machines.
What I have tried without success:
I created a vault on PC 1 with the decrypted files shown in a directory, not drive letter. Then I synchronized the files from the vault to the Nextcloud server with the Nextcloud Windows client.
Then I created on PC 2 an empty vault with the same credentials, unencrypted directory, same directory tree, synchronized all the files from the webdav server back to the vault directory. When opening the vault, the unencryped directory remains empty.
I do not trust the webdav server as a single location for my files and want to have them therefore also on the PCs. How can I accomplish my aim described in the first line - synchronizing files between vaults on different Windows machines with a webdav-server?
Of course, your idea is right as this is what Cryptomator was build for.
You just made one mistake. You created a new (empty) vault on the second pc. But you do not want to create a new vault on the second pc, because you want to add an existing vault (the one that you synced to nextcloud).
So every time you want to access your existing vault from a pc where you haven’t access yet, just sync the (encrypted) vault files to that pc and connect the existing vault with your local Cryptomator app by using the function „add existing vault“ (https://docs.cryptomator.org/en/latest/desktop/vault-management/). Do not use „create vault“ unless you really want to create a new vault.
After you added the existing vault to you local Cryptomator app you just keep syncing the encrypted vault files between the 2 PCs (via nextcloud) to keep the vault on both PCs up to date.
One more question popped up. What happens if single data (dirs or files) in a vault are corrupted, deleted by error etc? Will the whole vault be unaccessible or only some files?
The reason why I ask: at the moment I am using mainly the commercial software Goodsync for handling synchronization between PCs and Nextcloud-webdav-server. This software offers encryption during transport to/from the webdav-server so I have unencrypted files still on my PCs and encrypted files on the webdav server. If files on the PC are corrupted it would concern only the files on the PC. Corruption of single encrypted files on the server will also only concern the one corrupted file.