Loading...
Koofr Features / Jul 23 2024

How to use rclone on Windows with Koofr cloud storage

A review on how to use rclone - a powerful open-source command-line tool to do all the basic and advanced operations on Koofr files. We show you how to create your first remote with rclone, copy, list files and folders, as well as encrypt and decrypt your files using rclone, Koofr and Koofr Vault.

Rclone is a powerful open-source command-line tool that unlocks the full potential of Koofr by enabling seamless file synchronization, backup, and transfer, and performs other file operations on your Koofr files, such as storing or encrypting them.

In this blog post, you can read about:

1. How to install rclone on your computer


Download Rclone for Windows and extract the .zip file to a chosen location on your computer. Then open cmd.exe and run rclone from there.

2. How to create a connection to rclone


Command Prompt, is the command-line interpreter available in all Windows operating systems. It is used to execute entered commands. Find cmd on your computer and open it.

You need to "move" into the folder where you extracted rclone before you can start creating your first remote. Move into the folder by typing “cd path-to-rclone-extracted-folder” into cmd.

See an example on how to do that here:

C:\Users\username\>cd downloads
C:\Users\username\Downloads>cd rclone
C:\Users\username\Downloads\rclone>


Type this into cmd and press Enter:

rclone config

to start configuring rclone. This is a command that lets you create, remove or edit a remote connection. The remote connection is used to link rclone with Koofr. All of your remotes are stored in a config file. In this step we'll configure our first remote, named koofr. All of the commands you will input into rclone need to be followed by pressing Enter.

After you type the rclone config command into cmd, rclone will return this:

No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> 


Type

n 

and press Enter to create a new remote.

Name the new remote koofr when prompted. You can name your remote whatever you want, just make sure the name doesn’t have any spaces. Be sure to use that same name later on when inputting commands into rclone.

When you type in the remote name and press enter, rclone will return a list of available cloud storage services. Be sure to find Koofr on the list. Type in the correct number for Koofr, Digi Storage and other Koofr-compatible storage providers and press Enter.

Next, you'll be asked to choose from a list of storage providers that are compatible with the Koofr API, like in the picture below.

Koofr cloud storage provider API.png

Here, choose Koofr and type in the corresponding number 1, then press enter.

You will be prompted to enter your Koofr user name. Do that and then sign-in to your Koofr account, so you can generate an application-specific password to use with rclone.

Option password.
Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password.
Chose an alternative below.
y) Yes, type in my own password
g) Generate random password
y/g> y


Select the option y + Enter.

You can generate a password in the Koofr Account Settings, under Preferences. Click on the Password tab on the left, scroll down to App passwords and click into the Generate password field. Type-in a new password name (for example rclone) and click Generate. See our video tutorial on how to create application-specific passwords.

Use the newly-generated password in your rclone command window immediately. You can copy it from Koofr and paste it directly into cmd. You will be prompted to confirm the password.

In the next step you'll have the option to Edit advanced config. Select n to finish the configuration of the remote and see the summary of it. In this step you will be able to confirm your remote, delete it or edit it further.

Type in

y

and press Enter, and you'll create your first remote.

Type in

q

and Enter to quit config.

3. How to test your rclone connection to Koofr


Once your remote is configured, you can test your rclone connection to Koofr by listing all the files or all the folders in your Koofr account. The following command will list all the files you have in your Koofr account:

rclone ls koofr:

The following command will list all the folders you have in your Koofr account.

rclone lsd koofr:


Learn the basics of Koofr with rclone

4. How to copy files to Koofr with rclone


We created a folder named testf inside the rclone folder on our computer. We wanted to copy the testf folder to our Koofr account. You can do this with the command below

rclone copy testf koofr:/testfkoofr


which copies the files from the testf folder on our computer to a testfkoofr folder in Koofr.

If you do not type-in a specific destination in Koofr to which you want to copy your files, they will be copied to the root folder of your Koofr storage account.

5. How to mount Koofr as a network drive in rclone?


Download and install WinFsp on your computer. Refer to their Quick Start Guide for detailed download instructions.

This command will mount Koofr as a network drive on your computer.

rclone mount "koofr:" K: --network-mode


Note: When mounting Koofr as a network drive be sure to use the same remote name you used when configuring your remote.

When you mount a network drive, it will run only while rclone is running. As soon as you quit rclone, you will not be able to see the network drive on your computer anymore. You can close rclone by pressing ctrl + c.

Check out a detailed guide on how to make a remote called koofr with rclone.

6. How to set up client-side encryption of your Koofr files with rclone


If you want to encrypt your Koofr files, you'll need to create a crypt remote on top of your previously created koofr remote.

Crypt remote will take care of encryption and decryption of your data, while downloading and uploading of data is done by your normal remote. So, once you have created the koofr remote, run rclone config again and create a new – crypt remote. We'll name our crypt remote koofrenc.

The process of creating a crypt remote is similar to what you did before. But, when you are presented with a list of storage options, find the option that says Encrypt/Decrypt a remote and select it.

See help for crypt backend at https://rclone.org/crypt/

Type in the path

koofr:/encrypted 


and press enter. This will create a new folder named encrypted inside your Koofr account, as soon as you execute your first copy command. The encrypted folder is where all of your encrypted data will go later. In this way we configured a special folder named encrypted for the encrypted data, and the crypt command will only be able to write and read inside the encrypted folder.

Note: We strongly advise to only encrypt dedicated folders and not the whole Koofr storage.

In the next steps, you'll be able to encrypt the filenames like in the picture below,

file name encryption koofr rclone.png

by typing

1 

or standard into cmd and pressing Enter.

You should do the same for folder names. Type in either 1 or true and press Enter.

directory name encryption koofr rclone.png

You'll also be offered to select a password for encryption. We chose to generate a random password, for which you'll need to select the strength in bits. We chose the strength of the password to be 128 bits. Rclone will generate a password for you and you need to carefully store it into your password manager. You will be offered to generate a password for salt - the second password. This is optional, but we recommend you do it, again with the strength of 128 bits and save it into your password manager as well.

Now you can copy your first batch of files into the encrypted folder with:

rclone copy testf koofrenc:


Note: The copy command skips all of the files that were already copied previously if there are any. It only copies the new files. In Koofr:/encrypted, you'll see the encrypted versions of your files. The bold encrypted files are folders, the rest are files.

7. How to use rclone with Koofr Vault


Koofr Vault compatibility with rclone means that you can access an existing crypt remote from rclone using Koofr Vault, or you can create a new Safe Box and access it from your desktop using rclone. It works both ways.

Let's look at how you can import an existing crypt remote from rclone to your Koofr Vault. You'll need to import the configuration data for the chosen remote. In our case, this is koofrenc remote.

Open the rclone.conf file by running the following command in cmd:

notepad %APPDATA%/rclone/rclone.conf


This will open the rclone config file in a text editor and you'll be able to copy the configuration data from there. We have a previously created crypt remote called koofrenc which points to koofr:/encrypted in our Koofr account. Here's our rclone.conf:

[koofrenc]
type = crypt
remote = koofr:testfkoofr
password = dgQmXBRGxG5lz8GHAElJNSENlpnjgYRAzyTB_5mfdzr0EoPw5UA
password2 = _-fh5uRDxW7bXSmvRJfjwYAqs_6cPsgjZ2jC7XbL99HrsqQ5dxY


Now is the time to open Koofr Vault and make it access this folder. We'll take the configuration data for koofrenc and use it to create a new Safe Box in Koofr Vault.

create a new safe box koofr vault.png

Click on Create new under the My Safe Box and click on Show advanced settings to display additional options.

additional options koofr vault safe box.png

Copy the configuration data of your remote from the rclone config text box. The format should be like the example above the text box. Click on Fill to automatically populate the main form fields with deobfuscated data. Confirm by clicking on Create.

Once your Safe Box is created, Koofr Vault will display the Safe Box configuration. Click on Copy to save the details in a safe place, then click on Continue. Next, enter your crypt password, or Safe Key, to unlock the Safe Box and access the encrypted folder inside your Koofr Vault.

Today we went through some basic and advanced uses of rclone with Koofr. While rclone is not an option that usually comes to mind for basic users, do not fret. The writer of this blog is a beginner as well and they made it through.


Join us on the Koofr subbredit. We'd love to hear from you!

We also published a Slovenian version of the same article for those who prefer to read it in that language.

Enjoyed this article? Why not check out what we do.

Show more