# How to Encrypt Files with gocryptfs on Linux

**URL:** https://www.compsmag.com/blogs/how-to-encrypt-files-with-gocryptfs-on-linux/
**Author:** Ayushi Chauhan
**Published:** 2022-02-15
**Updated:** 2022-02-15
**Categories:** Blogs
**Tags:** Blogs Daily, Computer Guides, Computers Tips and Tutorials, guiderobert, Guides and Tutorials, guiding12, How To Guide, How To Guides, Linux Guides, Tips, Tricks, Windows Tips
**Reading Time:** 5 min

---

This tip is about the how to Encrypt Files with gocryptfs on Linux. So read this free guide, How to Encrypt Files with gocryptfs on Linux step by step. If you have query related to same article you may contact us.

## How to Encrypt Files with gocryptfs on Linux - Guide

Gocryptfs is a file-level encryption utility mounted on a Userspace (FUSE) file system.  FUSE-mounted means that encrypted files are stored in a single directory tree, which is mounted as a USB stick via the FUSE interface.  This allows any user to mount - you don't need to be root.  Since gocryptfs encrypts at the file level, sync operations that copy your files can work efficiently for each file.  This is in contrast to disk-level encryption, which encrypts the entire disk as a single large binary blob.

When you use gocryptfs in normal mode, your files are stored on your hard drive in an encrypted format.  However, if you provide the files encrypted, you will have unencrypted access to your files, just like any other file on your computer.  That means all your regular tools and programs can use your files unencrypted.  Changes, new files and deletions are reflected in real-time in the encrypted version of files stored on your hard drive.

## How to    make use of Gocryptfs to encrypt files.

### Installation

#### Linux

Gocryptfs comes with a deb package and is available in the Debian and Ubuntu repository, which means you can easily install it with the command:

sudo apt install gocryptfs

The same applies to Arch Linux.  You can install gocryptfs via Pacman:

For other Linux distributions, you can download the binary file from the Github website.

#### Mac

To use gocryptfs on macOS, you need to install Homebrew first:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

Then use the following command to install gocryptfs:

#### windows

Gocryptfs is not natively supported on Windows due to lack of FUSE support.  However, cppcryptfs is an implementation of the gocryptfs encrypted overlay file system in C++ for Windows, so you can still make it work on Windows.  Follow the building instructions here.

## Using gocryptfs to encrypt files

To start using gocryptfs, you first need to create two empty folders:

Then launch gocryptfs:

gocryptfs -init encrypted

Finally, mount the “encrypted” folder in the “plain” folder:

simple gocryptfs encrypted

Now, all files you put in the “plain” folder will be encrypted and stored in the “encrypted” folder.

For example, if you want to store the encrypted file on Dropbox and mount it in a “Private” folder on Home directory, you can run the following commands:

CD

mkdir ~/Dropbox/encrypted ~/Private

gocryptfs -init ~/Dropbox/encrypted

gorcypted ~/Dropbox/encrypted ~/Private

Each file you place in the Private folder will be encrypted in the “Encrypted” folder and uploaded to the Dropbox server.

## SiriKali – a GUI tool for using gocryptfs

SiriKali is a GUI tool that can be used to encrypt with gocryptfs and other standards.  It is available for Linux, macOS and Windows, although the Windows version does not support gocryptfs.

Go to the SiriKali website and download the package suitable for your system.  The Linux package provides the source that you can extract and build.  It is also available with its own repository for a variety of distributions and can be found here.

On Ubuntu, run the following in Terminal:

sudo sh -c “echo 'deb http://download.opensuse.org/repositories/home:/obs_mhogomchungu/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:obs_mhogomchungu.list”

After the commands are done, it's a good idea to run it to "trust" the key and allow updates.

wget -nv https://download.opensuse.org/repositories/home:obs_mhogomchungu/xUbuntu_18.10/Release.key -O Release.key

sudo apt-key add –

sudo apt-get update

sudo apt-get install sirikali

You should now find that SiriKali is installed and available in your menu.  Click to open.

SiriKali opens a window reminiscent of VeraCrypt with options at the bottom of the screen.  You can create volume, mount volume, update, manage bookmarks and finally there is a menu.

Now you can click on Gocryptfs and create a volume.

Name the volume whatever you want and the Key represents the password.  There are different options such as password, password and key file, and GNOME Wallet.  Select which one suits your needs – just remember to use a password that is not easy to guess.  There are other variables in the options button which details the level of encryption and whether you need scrambled filenames.

Once done, the newly created folder will appear in the SiriKali app.  Click this to open your folder where you can copy the files you want to encrypt, just as you would any other file copy action.

When done, remember to click again and select “unmount volume”.

## Final note

I hope you like the guide How to Encrypt Files with gocryptfs on Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.

---

*End of Article*