gocryptfs.el is an Emacs Lisp package that provides native Emacs commands to
initialize, mount, unmount, and manage multiple gocryptfs-encrypted directories
(“vaults”).
The package integrates gocryptfs cleanly into the Emacs workflow, without shell wrappers, while correctly handling the real-world constraints of FUSE-based filesystems.
- The password is never passed through the shell
- No use of echo | gocryptfs
- No plaintext password storage
- Sensitive input is sent exclusively via the gocryptfs process standard input
- install gocryptfs
sudo pacman -S gocryptfs
(use-package gocryptfs
:straight (:local-repo "~/your folder/gocryptfs")
:custom
(gocryptfs-vaults
'((:name "personal"
:cipher-dir "~/.tomb"
:mount-dir "~/Perso")
(:name "pro"
:cipher-dir "~/.tomb2"
:mount-dir "~/Pro"))))Before mounting a vault for the first time, it must be initialized:
M-x gocryptfs-init-vaultThis command:
- creates required directories if needed
- validates that the cipher directory is empty
- securely asks for a password (twice)
- runs
gocryptfs -init
M-x gocryptfs-mountYou will be prompted to select a vault and enter its password.
The mount process is asynchronous and does not block Emacs.
M-x gocryptfs-umount