• Stars
    star
    270
  • Rank 148,109 (Top 3 %)
  • Language
    Java
  • License
    GNU Affero Genera...
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cryptomator Command-Line Interface

Build Latest Release

Cryptomator CLI

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.

Disclaimer

⚠️ This project is in an early stage and not ready for production use. We recommend using it only for testing and evaluation purposes.

Download and Usage

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!

Filesystem Integration

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.

Windows via Windows Explorer

Open the File Explorer, right click on "This PC" and click on the menu item "Map network drive...".

  1. In the Drive list, select a drive letter. (Any available letter will do.)
  2. In the Folder box, enter the URL logged by the Cryptomator CLI application.
  3. Select Finish.

Linux via davfs2

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

macOS via AppleScript

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"'

Using as a Docker image

Bridge Network with Port Forwarding

⚠️ WARNING: This approach should only be used to test the containerized approach, not in production. ⚠️

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/

Host Network

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.

License

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.

More Repositories

1

cryptomator

Multi-platform transparent client-side encryption of your files in the cloud
Java
10,669
star
2

android

Cryptomator for Android
Kotlin
638
star
3

ios

Cryptomator for iOS
Swift
193
star
4

cryptomator-ios

Cryptomator for iOS
100
star
5

cryptofs

Java Filesystem Provider with integrated encryption
Java
86
star
6

cryptolib

Cryptomator Crypto Library
Java
81
star
7

docs

Cryptomator Documentation
Python
44
star
8

siv-mode

RFC 5297 SIV mode of operation in Java
Java
37
star
9

cryptomator-objc-cryptor

iOS crypto library to access Cryptomator vaults
Objective-C
36
star
10

jfuse

Java bindings for FUSE using the FFM API
Java
35
star
11

hub

Cryptomator Hub helps you manage vaults in large teams
Java
34
star
12

sanitizer

Utility to find and fix problems within vaults
Java
33
star
13

cryptomator-mac

Cryptomator .dmg image for Mac
Shell
25
star
14

fuse-nio-adapter

FUSE-based adapter to provide directory contents specified by a java.nio.file.Path
Java
24
star
15

cryptomator-win

Cryptomator .exe installer for Windows
Inno Setup
20
star
16

cryptomator.github.io

Cryptomator Website
HTML
16
star
17

cloud-access-swift

Swift library for accessing various cloud providers incl. Cryptomator vaults
Swift
15
star
18

docker

Docker containers to build Cryptomator packages
Shell
15
star
19

dokany-nio-adapter

Dokany-based adapter to provide directory contents specified by a java.nio.file.Path (via dokan-java)
Java
14
star
20

cracker

Brute Force Tool for masterkey.cryptomator Files
Java
14
star
21

cryptomator-linux

Cryptomator .AppImage for Linux
Shell
14
star
22

cryptolib-swift

Swift library with cryptographic functions for accessing Cryptomator vaults
Swift
14
star
23

webdav-nio-adapter

Jackrabbit-based servlets running on embedded Jetty to serve a directory specified by a java.nio.file.Path
Java
12
star
24

integrations-api

API for optional services, such as system keychain integrations
Java
11
star
25

integrations-linux

Linux-specific implemenations of the integrations-api
Java
10
star
26

webdav-nio-adapter-servlet

WebDAV-NIO-Adapter-Servlet
Java
9
star
27

native-functions

JNI implementation needed for the main project
Java
6
star
28

newsletter

Cryptomator Newsletter
HTML
5
star
29

integrations-mac

Optional integrations into macOS
Java
5
star
30

integrations-win

Optional integrations into Windows
Java
5
star
31

cloud-access-java

Java
3
star
32

self-signed-x509-certificate-generator

3
star
33

winfsp-uninstaller

Executable for uninstalling WinFsp in a WiX Burn bundle
C++
3
star
34

fuse-cloud-access-adapter

FUSE access to cloud-access-java
Java
2
star
35

website-preview

This is a temporary repository for testing purposes.
HTML
1
star
36

hub-cli

Java
1
star