|
3 | 3 |
|
4 | 4 | # Cryptomator CLI |
5 | 5 |
|
6 | | -This is a minimal command-line program that unlocks vaults which can then be accessed via an embedded WebDAV server. |
| 6 | +This is a minimal command-line application that unlocks vaults of vault format 8. |
| 7 | +After unlocking the vaults, its vault content can be accessed via an embedded WebDAV server. |
| 8 | +The minimum required Java version is JDK 17. |
7 | 9 |
|
8 | 10 | ## Disclaimer |
9 | 11 |
|
10 | | -This project is in an early stage and not ready for production use. We recommend to use it only for testing and evaluation purposes. |
| 12 | +:warning: This project is in an early stage and not ready for production use. We recommend using it only for testing and evaluation purposes. |
11 | 13 |
|
12 | 14 | ## Download and Usage |
13 | 15 |
|
14 | | -Download the jar file via [GitHub Releases](https://github.com/cryptomator/cli/releases). |
| 16 | +Download the JAR file via [GitHub Releases](https://github.com/cryptomator/cli/releases). |
15 | 17 |
|
16 | | -Cryptomator CLI requires that at least JDK 11 is present on your system. |
| 18 | +Cryptomator CLI requires that at least JDK 17 is present on your system. |
17 | 19 |
|
18 | 20 | ```sh |
19 | 21 | java -jar cryptomator-cli-x.y.z.jar \ |
20 | 22 | --vault demoVault=/path/to/vault --password demoVault=topSecret \ |
21 | 23 | --vault otherVault=/path/to/differentVault --passwordfile otherVault=/path/to/fileWithPassword \ |
| 24 | + --vault thirdVault=/path/to/thirdVault \ |
22 | 25 | --bind 127.0.0.1 --port 8080 |
23 | | -# you can now mount http://localhost:8080/demoVault/ |
| 26 | +# You can now mount http://localhost:8080/demoVault/ |
| 27 | +# The password for the third vault is read from stdin |
| 28 | +# Be aware that passing the password on the command-line typically makes it visible to anyone on your system! |
24 | 29 | ``` |
25 | 30 |
|
26 | | -Then you can access the vault using any WebDAV client. |
| 31 | +## Filesystem Integration |
| 32 | + |
| 33 | +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. |
| 34 | + |
| 35 | +### Windows via Windows Explorer |
| 36 | + |
| 37 | +Open the File Explorer, right click on "This PC" and click on the menu item "Map network drive...". |
| 38 | + |
| 39 | +1. In the Drive list, select a drive letter. (Any available letter will do.) |
| 40 | +2. In the Folder box, enter the URL logged by the Cryptomator CLI application. |
| 41 | +3. Select Finish. |
27 | 42 |
|
28 | 43 | ### Linux via davfs2 |
29 | 44 |
|
30 | | -First, you need to create a mount point for your vault |
| 45 | +First, you need to create a mount point for your vault: |
31 | 46 |
|
32 | 47 | ```sh |
33 | 48 | sudo mkdir /media/your/mounted/folder |
34 | 49 | ``` |
35 | 50 |
|
36 | | -Then you can mount the vault |
| 51 | +Then you can mount the vault: |
37 | 52 |
|
38 | 53 | ```sh |
39 | | -sudo mount -t davfs http://localhost:8080/demoVault/ /media/your/mounted/folder |
| 54 | +echo | sudo mount -t davfs -o username=,user,gid=1000,uid=1000 http://localhost:8080/demoVault/ /media/your/mounted/folder |
| 55 | +# Replace gid/uid with your gid/uid. The echo is used to skip over the password query from davfs |
40 | 56 | ``` |
41 | 57 |
|
42 | | -To unmount the vault, run |
| 58 | +To unmount the vault, run: |
43 | 59 |
|
44 | 60 | ```sh |
45 | 61 | sudo umount /media/your/mounted/folder |
46 | 62 | ``` |
47 | 63 |
|
48 | 64 | ### macOS via AppleScript |
49 | 65 |
|
50 | | -Mount the vault with |
| 66 | +Mount the vault with: |
51 | 67 |
|
52 | 68 | ```sh |
53 | 69 | osascript -e 'mount volume "http://localhost:8080/demoVault/"' |
54 | 70 | ``` |
55 | 71 |
|
56 | | -Unmount the vault with |
| 72 | +Unmount the vault with: |
57 | 73 |
|
58 | 74 | ```sh |
59 | 75 | osascript -e 'tell application "Finder" to if "demoVault" exists then eject "demoVault"' |
60 | 76 | ``` |
61 | 77 |
|
| 78 | +## Using as a Docker image |
| 79 | + |
| 80 | +### Bridge Network with Port Forwarding |
| 81 | + |
| 82 | +:warning: **WARNING: This approach should only be used to test the containerized approach, not in production.** :warning: |
| 83 | + |
| 84 | +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. |
| 85 | + |
| 86 | +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.** |
| 87 | + |
| 88 | +```sh |
| 89 | +docker run --rm -p 8080:8080 \ |
| 90 | + -v /path/to/vault:/vaults/vault \ |
| 91 | + -v /path/to/differentVault:/vaults/differentVault \ |
| 92 | + -v /path/to/fileWithPassword:/passwordFile \ |
| 93 | + cryptomator/cli \ |
| 94 | + --bind 0.0.0.0 --port 8080 \ |
| 95 | + --vault demoVault=/vaults/vault --password demoVault=topSecret \ |
| 96 | + --vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile |
| 97 | +# You can now mount http://localhost:8080/demoVault/ |
| 98 | +``` |
| 99 | + |
| 100 | +### Host Network |
| 101 | + |
| 102 | +```sh |
| 103 | +docker run --rm --network=host \ |
| 104 | + -v /path/to/vault:/vaults/vault \ |
| 105 | + -v /path/to/differentVault:/vaults/differentVault \ |
| 106 | + -v /path/to/fileWithPassword:/passwordFile \ |
| 107 | + cryptomator/cli \ |
| 108 | + --bind 127.0.0.1 --port 8080 \ |
| 109 | + --vault demoVault=/vaults/vault --password demoVault=topSecret \ |
| 110 | + --vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile |
| 111 | +# You can now mount http://localhost:8080/demoVault/ |
| 112 | +``` |
| 113 | + |
| 114 | +Then you can access the vault using any WebDAV client. |
| 115 | + |
62 | 116 | ## License |
63 | 117 |
|
64 | 118 | 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](https://cryptomator.org/help/). |
0 commit comments