Download or Compile gocryptfs

Precompiled binaries that work on all x86_64 Linux systems are available for download from the github releases page.

On Debian, gocryptfs is available as a deb package:

$ apt install gocryptfs

On Mac OS X, gocryptfs is available as a Homebrew formula:

$ brew install gocryptfs

On Fedora, gocryptfs is available as an rpm package:

$ sudo dnf install gocryptfs

gocryptfs is available in many other distributions in the following versions:

Packaging status

Packaging status

If you want to compile from source, see the Compile page for instructions.

Once you have gocrypts installed, running

$ gocryptfs -version

should print a version string like this:

gocryptfs v1.4.3; go-fuse v20170619-28-g19acbd2; 2018-02-01 go1.9.2

Create and Mount Filesystem

$ mkdir cipher plain
$ gocryptfs -init cipher
$ gocryptfs cipher plain

You should now have a working gocryptfs that is stored in cipher and mounted to plain. You can verify it by creating a test file in the plain directory. This file will show up encrypted in the cipher directory.

$ touch plain/test.txt
$ ls cipher
  gocryptfs.conf  gocryptfs.diriv  ZSuIZVzYDy5-TbhWKY-ciA==

Cloud Storage

When you want to store your encrypted data on cloud storage (Dropbox in this example), the cipher folder should be inside the Dropbox folder but the plain folder should be outside! Example:

$ mkdir ~/Dropbox/cipher
$ mkdir ~/plain
$ gocryptfs -init ~/Dropbox/cipher
$ gocryptfs ~/Dropbox/cipher ~/plain

This makes sure that Dropbox only syncs the encrypted version of your data.