Encrypt Dropbox Folders on Ubuntu With CryFS

Introduction

This is one way to encrypt the contents for cloud-synchronized folders using CryFS. I'm going to illustrate it using the Dropbox folder that the dropbox client creates.

Encrypt the Folders

Install It

Ubuntu currently (November 10, 2018) has CryFS as part of its packages so you can install it with apt.

sudo apt install cryfs

Create the Target and Source Folders

The cryfs command will create the two folders and set them up for you. The syntax is cryfs <target> <source>. The target will contain the encrypted folders so it will go in the Dropbox folder, while the source will hold the unencrypted files.

cryfs Dropbox/encrypted dropbox_source

This is the same command you would use on another computer to set-up the existing encrypted folder on your new computer. The source folder can be named differently, but the target folder and the password need to be the same one you used when you created it.

Unmount It

If you need to unmount it you can use fusermount.

fusermount -u dropbox_source

Since you are doing all this within your home directory you don't need root privileges (except to install cryfs with apt).

References

  • I got this from Linux Babe.
  • But the CryFS Tutorial is pretty straight-forward, just skips the part about install cryfs.