Avoid multiple instances

Hi there,
I have a sync tool which runs a sync-profile every second day. As I don’t want the cryptomator vault to be permanently mounted, I have entered the following command to be ran before the sync starts:

“C:\Program Files\Cryptomator\Cryptomator.exe”

Just to open Cryptomator which is configured to automount my vault.

Is there any way to avoid the cryptomator “Vault already mounted error” in case Cryptomator is already open? I.e. just make Cryptomator only being ran as single instance and just block opening multiple instances of the application?

Thanks a lot in advance!

Welcome to the Cryptomator Community :slight_smile:

Cryptomator already allows only one instance, so this should not be a problem :wink:

Hi @infeo,
than it doesn’t seem to work correctly.
As you can see from this screenshot, SyncBack SE as my synctool CAN actually start several instaces causing this JAVA error evervytime:

Every instance runs under the same user, so it’s not the case that my profiles start under different users or something like that.

Not sure why you are doing this. I use Google Drive to store my vault folder with other folders that are not encrypted. The synchronization between my local Google Drive folder and the cloud takes place without having to use Cryptomator at all, as the encrypted versions are updated as is. I only need Cryptomator when I want to edit a file in the crypt and my crypt then gets mounted as a local Z drive, which s never synchronized

Im doing it because I want to automatically synchronize some folders from my local drives to the vault, by using SyncBack SE.

So before running the sync from let’s say C:\users\myuser\My Documents to the mounted Vault, let’s say T:, I need to mount the vault to T:. The encrypted vault lays within the Dropbox, yes, but I dont want to keep the vault be mounted permanently to avoid file corruption in case a virus catches me. That means, the vault will only be mounted DURING SyncBack SE sync.

EDIT:
But maybe this wont help much anyhow because, I just tought, in case I catch a virus, it doesn’t matter whether it will directly corrup the encrypted files within the Dropbox OR the unencrypted files in the vault. Both will make the files useless, but anyhow, DropBox would help me restore the “old” (good) files. So maybe yes, I could simply keep Cryptomator stay open/mounted all the time.

Ohhkay, this should actually not possible :sweat_smile:

Cryptomator creates on application start a file which indicates that an instance is already running. Only if this file cannot be read, another Cryptomator process starts. In your case it seems like this file is never created…

When you enable debug mode and let your sync application create several instances of Cryptomator, does the log file contain any WARNings, ERRORs or Exceptions ? Also look out for the lines

10:25:47.128 [main] DEBUG org.cryptomator.launcher.IpcFactory - [Client] Failed to connect.
10:25:47.178 [main] DEBUG org.cryptomator.launcher.IpcFactory - [Server] Wrote IPC port 50698 to C:\Users\TestUser\AppData\Roaming\Cryptomator\ipcPort.bin

Of interest might be the follwing ticket on our issue tracker:

© 2020 Skymatic GmbH • Privacy PolicyImpressum