You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/encrypting-your-files-in-the-cloud-using-securefs/01.en.md
+74-20Lines changed: 74 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ There is a feature called _reverse mode_ which allows you to create an encrypted
31
31
**Prerequisites**
32
32
33
33
* A user with sudo privileges.
34
-
* AMD64 architecture, the binary for Arm64 is not available.
34
+
* AMD64 or Arm64 architecture on Linux. AMD64 on Windows.
35
35
* A directory that is synced to your cloud storage
36
36
37
37
**Example terminology**
@@ -42,7 +42,13 @@ Usually when you're using a cloud storage provider you have a special folder whi
42
42
43
43
## Step 1 - Installing and using securefs on Linux
44
44
45
-
### Step 1.1 - Installation
45
+
You can choose between two installation methods on Linux.
46
+
47
+
The first option is to install the `securefs` executable and its dependencies separately.
48
+
49
+
The second option is to install the statically linked `securefs` executable with all dependencies included, which can be easier on some systems.
50
+
51
+
### Step 1.1 - Installing `securefs` and its dependencies
46
52
47
53
Securefs depends on `libfuse2` to run. On Ubuntu 22.04 the package name you need to install is `libfuse2`, but on Ubuntu 24.04 it was renamed to `libfuse2t64`.
48
54
@@ -54,14 +60,46 @@ On Ubuntu 24.04 run the following command to install the required packages:
Run the commands below to download and install the latest release of `securefs` system-wide:
63
+
Go to the [latest release](https://github.com/netheril96/securefs/releases/latest) and choose the archive for your system and architecture. Extract it and add it to your `PATH` environment variable.
64
+
Or follow the steps below for an automated install.
65
+
66
+
Copy and paste the following code to your terminal: <aid="install_securefs"></a>
67
+
68
+
> This will define a shell function that will be used to install `securefs`.
Copy the [shell function from a previous step](#install_securefs) and paste it to your terminal.
132
+
133
+
Pass the argument `static`, to install the statically linked `securefs` executable:
134
+
135
+
```bash
136
+
install_securefs static
137
+
```
138
+
139
+
Check that it works:
140
+
141
+
```bash
142
+
securefs version
143
+
```
90
144
91
-
### Step 1.2 - Using securefs with cloud storage
145
+
### Step 1.3 - Using securefs with cloud storage
92
146
93
147
First of all, you need to create an encrypted filesystem, where your files will be stored.
94
148
@@ -154,13 +208,13 @@ nano ~/backup/notes.txt
154
208
155
209
Although `~/backup` behaves like a regular directory, it doesn't occupy any space on disk. It's virtual and only presents an unencrypted view of an encrypted filesystem in the `~/Cloud/securefs_backup` directory.
156
210
157
-
### Step 1.3 - Using securefs with rsync
211
+
### Step 1.4 - Using securefs with rsync
158
212
159
213
Instead of using a cloud storage provider you can use your own cloud server to create a remote encrypted backup.
160
214
161
-
Read [step 1.2](#step-12-using-securefs-with-cloud-storage) to get the basic idea how to work with securefs. The only difference is that you need to manually sync your changes to the remote server using `rsync`.
215
+
Read [step 1.3](#step-13---using-securefs-with-cloud-storage) to get the basic idea how to work with securefs. The only difference is that you need to manually sync your changes to the remote server using `rsync`.
162
216
163
-
First, create a securefs filesystem as described in [step 1.2](#step-12-using-securefs-with-cloud-storage):
217
+
First, create a securefs filesystem as described in [step 1.3](#step-13---using-securefs-with-cloud-storage):
164
218
165
219
```bash
166
220
securefs create ~/securefs_backup
@@ -175,18 +229,18 @@ securefs mount ~/securefs_backup ~/backup
175
229
Now, you can put your files that you want to backup in `~/backup`. When you're done you can update your remote backup by syncing the `~/securefs_backup` directory to the remote server using `rsync`:
176
230
177
231
***Be careful** when you specify the local and remote directory to sync.
178
-
[`--delete`][rsync_delete] will delete all files in the remote directory that are not present in the local directory. In the example, the `securefs_backup` directory gets synced between the home directories of the local and remote users.
179
-
* [`-r`][rsync_recursive] option is needed to copy nested directories, not just files.
180
-
* [`-t`][rsync_times] option will preserve modification times, which is needed for subsequent syncs to be efficient.
232
+
[`--delete`] will delete all files in the remote directory that are not present in the local directory. In the example, the `securefs_backup` directory gets synced between the home directories of the local and remote users.
233
+
* [`-r`] option is needed to copy nested directories, not just files.
234
+
* [`-t`] option will preserve modification times, which is needed for subsequent syncs to be efficient.
181
235
* Replace `holu` with your username on the remote server, and `10.0.0.1` with its IP address.
## Step 2 - Installing and using securefs on Windows
192
246
@@ -220,7 +274,7 @@ to check that `securefs` is installed properly.
220
274
221
275
### Step 2.2 - Using securefs on Windows
222
276
223
-
Read [step 1.2 for Linux](#step-12-using-securefs-with-cloud-storage). Everything described there applies to Windows as well, except that background mounting is not supported on Windows.
277
+
Read [step 1.3 for Linux](#step-13---using-securefs-with-cloud-storage). Everything described there applies to Windows as well, except that background mounting is not supported on Windows.
224
278
225
279
You need to create an encrypted filesystem. Open PowerShell and run the following command to create a new filesystem:
0 commit comments