This is a minimal command-line application that unlocks vaults of vault format 8. After unlocking the vaults, its vault content can be accessed via an embedded WebDAV server. The minimum required Java version is JDK 17.
Download the JAR file via GitHub Releases.
Cryptomator CLI requires that at least JDK 17 is present on your system.
java -jar cryptomator-cli-x.y.z.jar \
--vault demoVault=/path/to/vault --password demoVault=topSecret \
--vault otherVault=/path/to/differentVault --passwordfile otherVault=/path/to/fileWithPassword \
--vault thirdVault=/path/to/thirdVault \
--bind 127.0.0.1 --port 8080
# You can now mount http://localhost:8080/demoVault/
# The password for the third vault is read from stdin
# Be aware that passing the password on the command-line typically makes it visible to anyone on your system!
Once the vault is unlocked and the WebDAV server started, you can access the vault by any WebDAV client or directly mounting it in your filesystem.
Open the File Explorer, right click on "This PC" and click on the menu item "Map network drive...".
- In the Drive list, select a drive letter. (Any available letter will do.)
- In the Folder box, enter the URL logged by the Cryptomator CLI application.
- Select Finish.
First, you need to create a mount point for your vault:
sudo mkdir /media/your/mounted/folder
Then you can mount the vault:
echo | sudo mount -t davfs -o username=,user,gid=1000,uid=1000 http://localhost:8080/demoVault/ /media/your/mounted/folder
# Replace gid/uid with your gid/uid. The echo is used to skip over the password query from davfs
To unmount the vault, run:
sudo umount /media/your/mounted/folder
Mount the vault with:
osascript -e 'mount volume "http://localhost:8080/demoVault/"'
Unmount the vault with:
osascript -e 'tell application "Finder" to if "demoVault" exists then eject "demoVault"'
The reason is that with port forwarding, you need to listen on all interfaces. Other devices on the network could also access your WebDAV server and potentially expose your secret files.
Ideally, you would run this in a private Docker network with trusted containers built by yourself communicating with each other. Again, the below example is for testing purposes only to understand how the container would behave in production.
docker run --rm -p 8080:8080 \
-v /path/to/vault:/vaults/vault \
-v /path/to/differentVault:/vaults/differentVault \
-v /path/to/fileWithPassword:/passwordFile \
cryptomator/cli \
--bind 0.0.0.0 --port 8080 \
--vault demoVault=/vaults/vault --password demoVault=topSecret \
--vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile
# You can now mount http://localhost:8080/demoVault/
docker run --rm --network=host \
-v /path/to/vault:/vaults/vault \
-v /path/to/differentVault:/vaults/differentVault \
-v /path/to/fileWithPassword:/passwordFile \
cryptomator/cli \
--bind 127.0.0.1 --port 8080 \
--vault demoVault=/vaults/vault --password demoVault=topSecret \
--vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile
# You can now mount http://localhost:8080/demoVault/
Then you can access the vault using any WebDAV client.
This project is dual-licensed under the AGPLv3 for FOSS projects as well as a commercial license derived from the LGPL for independent software vendors and resellers. If you want to use this library in applications, that are not licensed under the AGPL, feel free to contact our support team.