Compile gocryptfs from Source

git clone
cd gocryptfs

build.bash needs Go 1.7+ and the OpenSSL headers installed (Debian: apt install golang libssl-dev, Fedora: dnf install golang openssl-devel).

If successful, build.bash copies the gocryptfs binary to ~/bin.

Alternatively, you can compile a static binary without OpenSSL using:


This is the recommended way to compile on MacOS, and also how the official binary releases are compiled.

Note that having OpenSSL speeds up encryption on CPUs without AES-NI by a factor of 4. Run gocryptfs -speed to check your CPU.


In the gocryptfs source directory, run:


The tests run about 1 minute and should produce the following output:

gocryptfs v1.4.3-9-g9f8d0d8 without_openssl; go-fuse v20170619-28-g19acbd2; 2018-02-03 go1.9.2
gocryptfs v1.4.3-9-g9f8d0d8; go-fuse v20170619-28-g19acbd2; 2018-02-03 go1.9.2
ok    0.003s
? [no test files]
ok    0.732s
ok    0.003s
ok    0.227s
ok   0.002s
? [no test files]
?  [no test files]
?  [no test files]
ok 0.003s
?  [no test files]
? [no test files]
ok    0.003s
ok    0.003s
ok  0.048s
?   [no test files]
ok  0.005s
ok 0.002s [no tests to run]
ok 1.639s
ok 0.027s
?  [no test files]
ok  1.023s
ok 0.839s
ok  4.076s
ok  0.137s
ok   10.780s
ok   0.089s
ok  0.854s
? [no test files]

You can run ./test.bash -v to see the execution of individual tests. Note that the tests also check error cases that produce error messages, and this is not a test failure.