GithubHelp home page GithubHelp logo

djswiss / cryptomator-command-line-interface-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptomator/cli

1.0 1.0 0.0 115 KB

Cryptomator Command-Line Interface

License: GNU Affero General Public License v3.0

Java 97.83% Dockerfile 2.17%

cryptomator-command-line-interface-cli's Introduction

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.

cryptomator-command-line-interface-cli's People

Contributors

being-peace avatar codinghoul avatar didlich avatar fzachlod avatar janirutec avatar loicpirez avatar markuskreusch avatar ndob avatar overheadhunter avatar pmjohann avatar sebdiebln avatar tobihagemann avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.