{"id":36534,"date":"2021-12-28T16:59:46","date_gmt":"2021-12-28T16:59:46","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=36534"},"modified":"2021-12-28T16:59:46","modified_gmt":"2021-12-28T16:59:46","slug":"encrypted-folder-store-files-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/12\/encrypted-folder-store-files-ubuntu\/","title":{"rendered":"Easily Create Encrypted Folder to Safely Store Files in Ubuntu 20.04\/21.10 via Vaults"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon-250x250.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-36535\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-icon.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>This simple tutorial shows how to easily create encrypted vaults in which you may store files safely in Ubuntu and Debian based systems.<\/p>\n<h3>1. Install gocrytfs and cryfs:<\/h3>\n<p>In this tutorial, <i>gocrytfs<\/i> or <i>cryfs<\/i> will be used as backend. Both use file-based encryption that is implemented as a mountable FUSE filesystem. <b>The encrypted files can be stored in any folder in hard disk, a USB stick or even inside Dropbox folder<\/b>. And, encrypted files can be synchronized efficiently using standard tools like Dropbox or rsync. Also, the size of the encrypted filesystem is dynamic and only limited by the available disk space.<\/p>\n<p><a href=\"https:\/\/github.com\/rfjakob\/gocryptfs\" target=\"_blank\" rel=\"noopener\">Gocrytfs<\/a> is written in Go programming language, it&#8217;s fast. <a href=\"https:\/\/github.com\/cryfs\/cryfs\" rel=\"noopener\" target=\"_blank\">CryFS<\/a> is written in C++. It&#8217;s said to be apparently slow and take more disk space than Gocrytfs. You may <a href=\"https:\/\/nuetzlich.net\/gocryptfs\/comparison\/\" rel=\"noopener\" target=\"_blank\">see here<\/a> for the comparison. And, install either one or both as you prefer.<\/p>\n<p>Press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal, and run the command below to install the software:<\/p>\n<ul>\n<li>Install gocryptfs via command:\n<pre>sudo apt install gocryptfs<\/pre>\n<\/li>\n<li>Install cryfs via command:\n<pre>sudo apt install cryfs<\/pre>\n<\/li>\n<\/ul>\n<h3>2. Install Vaults:<\/h3>\n<p>Vaults is a graphical tool provides a stupid simple user interface for creating encryption folders. <b>Only downside could be that the app is available to install as Flatpak package. Some users do not like it.<\/b><\/p>\n<p>a.) Open terminal (Ctrl+Alt+T) and run command to install flatpak daemon if you don&#8217;t have it:<\/p>\n<pre>sudo apt install flatpak<\/pre>\n<p>b.) Next, install the Vaults app via command:<\/p>\n<pre>flatpak install https:\/\/dl.flathub.org\/repo\/appstream\/io.github.mpobaschnig.Vaults.flatpakref<\/pre>\n<p>Or use the command in picture after adding the Flathub repository. Vaults is a GTK4 app. It requires separated Gnome 41 platform which takes a few hundred MB disk space if you don&#8217;t have it. <\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/flatpak-vaults.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/flatpak-vaults.png\" alt=\"\" width=\"600\" height=\"319\" class=\"aligncenter size-full wp-image-36536\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/flatpak-vaults.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/flatpak-vaults-300x160.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>3. Create and Use Encrypted Folders:<\/h3>\n<p>Now, search for and open &#8216;Vaults&#8217; from <i>Activities<\/i> overview screen.<\/p>\n<div id=\"attachment_36538\" style=\"width: 583px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/launch-vaults.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36538\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/launch-vaults.jpg\" alt=\"\" width=\"573\" height=\"261\" class=\"size-full wp-image-36538\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/launch-vaults.jpg 573w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/launch-vaults-300x137.jpg 300w\" sizes=\"auto, (max-width: 573px) 100vw, 573px\" \/><\/a><p id=\"caption-attachment-36538\" class=\"wp-caption-text\">Launch Vaults<\/p><\/div>\n<p>When the app opens, click on &#8216;<b>+<\/b>&#8216; icon on top left and select &#8216;<b>New Vault<\/b>&#8216;.<\/p>\n<div id=\"attachment_36539\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-start.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36539\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-start-600x375.webp\" alt=\"\" width=\"600\" height=\"375\" class=\"size-large wp-image-36539\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-start-600x375.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-start-300x188.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-start-768x480.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-start.webp 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-36539\" class=\"wp-caption-text\">Click &#8216;+&#8217; to create new encrypted folder<\/p><\/div>\n<p>Next, type a name for your new folder and select the encryption software: gocryptfs or cryfs.<\/p>\n<div id=\"attachment_36540\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/new-vaultname.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36540\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/new-vaultname-600x338.webp\" alt=\"\" width=\"600\" height=\"338\" class=\"size-large wp-image-36540\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/new-vaultname-600x338.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/new-vaultname-300x169.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/new-vaultname-768x432.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/new-vaultname.webp 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-36540\" class=\"wp-caption-text\">Type a name for your folder<\/p><\/div>\n<p><b>Set password<\/b> in next page which will be used to mount and access the encrypted folder.<\/p>\n<div id=\"attachment_36541\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-password.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36541\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-password-600x330.webp\" alt=\"\" width=\"600\" height=\"330\" class=\"size-large wp-image-36541\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-password-600x330.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-password-300x165.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-password-768x422.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-password.webp 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-36541\" class=\"wp-caption-text\">Set password for it<\/p><\/div>\n<p>Finally, set the folder location. The default directories are OK. But, as mentioned you may store the data in USB stick or even in Dropbox folder. <\/p>\n<ul>\n<li>Encrypted Data Directory is the folder that stores your files. Files there are encrypted and un-readable.<\/li>\n<li>To decrypt and access your files, you have to mount the Data Directory to the &#8220;Mounted Directory&#8221; folder.<\/li>\n<\/ul>\n<div id=\"attachment_36542\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-location.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36542\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-location-600x345.webp\" alt=\"\" width=\"600\" height=\"345\" class=\"size-large wp-image-36542\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-location-600x345.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-location-300x173.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-location-768x442.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vault-location.webp 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-36542\" class=\"wp-caption-text\">Set data folder and mount folder<\/p><\/div>\n<p>The encrypted folders you created will list in the app window. Click the little lock icon and type the password you set will mount it. (<i>Make sure &#8220;Mounted Directory&#8221; is empty before unlocking<\/i>)<\/p>\n<div id=\"attachment_36543\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-folders.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36543\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-folders-600x345.webp\" alt=\"\" width=\"600\" height=\"345\" class=\"size-large wp-image-36543\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-folders-600x345.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-folders-300x173.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-folders-768x442.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/vaults-folders.webp 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-36543\" class=\"wp-caption-text\">Mount encrypted folders<\/p><\/div>\n<p>After that, open the file manager. You&#8217;ll see the folders in left pane. Create or paste your files into that folder. These files will be encrypted and inaccessible once you unmount the folder (<i>right-click folder in left pane and select unmount<\/i>)<\/p>\n<div id=\"attachment_36544\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/mounted-encryptedfolders.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-36544\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/mounted-encryptedfolders-600x371.webp\" alt=\"\" width=\"600\" height=\"371\" class=\"size-large wp-image-36544\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/mounted-encryptedfolders-600x371.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/mounted-encryptedfolders-300x185.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/mounted-encryptedfolders-768x475.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/mounted-encryptedfolders.webp 809w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-36544\" class=\"wp-caption-text\">Put your files into mounted folder and store them safely<\/p><\/div>\n<h3>Uninstall:<\/h3>\n<p>To remove the Vaults app, open terminal (Ctrl+Alt+T) and run command:<\/p>\n<pre>flatpak uninstall --delete-data io.github.mpobaschnig.Vaults<\/pre>\n<p><b>NOTE: The command will remove all your encrypted files if you&#8217;re using the default &#8216;Encrypted Data Directory&#8217;! Please make a backup first.<\/b><\/p>\n<p>And remove the useless Flatpak runtime library via <code>flatpak uninstall --unused<\/code> command.<\/p>\n<p>To remove the encryption backend, use command:<\/p>\n<pre>sudo apt remove --autoremove cryfs gocryptfs<\/pre>\n<p>And, remove the mount directory &#8216;<i>Vaults<\/i>&#8216; folder in user home after all.<\/p>","protected":false},"excerpt":{"rendered":"<p>This simple tutorial shows how to easily create encrypted vaults in which you may store files safely in Ubuntu and Debian based systems. 1. Install gocrytfs and cryfs: In this tutorial, gocrytfs or cryfs will be used as backend. Both use file-based encryption that is implemented as a mountable FUSE filesystem. The encrypted files can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":36535,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2011],"class_list":["post-36534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-disk-encryption"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/36534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=36534"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/36534\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/36535"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=36534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=36534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=36534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}