Home Rclone How To Mount Dropbox Locally Using Rclone In Linux

How To Mount Dropbox Locally Using Rclone In Linux

Setup Rclone With Dropbox In Linux

By sk
Published: Last Updated on 11.9K views

This guide explains how to mount Dropbox locally using Rclone cloud sync tool and how to copy or backup files to Dropbox using Rclone in Linux operating systems.

I assume you already have installed Rclone on your Linux machine. If not, refer the following link to know how to install Rclone.

In order to access Dropbox using Rclone, you need to give authorization to Rclone to access your Dropbox account. You can do it in two ways : from Command line using "rclone config" command or from the Rclone Web UI. In this guide, we will see the command line way.

Configure Rclone to access Dropbox from commandline

Start Rclone configuration wizard by running the following command:

$ rclone config

You will see the list of currently configured remotes (i.e. Cloud providers) and the options to create new remote, rename remote and delete remote etc.

To create a new remote, simply type "n" and hit ENTER. Then type the name of the remote. Here, I am going to name it as "mydropbox".

Current remotes:

Name                 Type
====                 ====
mygdrive             drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
name> mydropbox
Create new remote for Dropbox
Create new remote for Dropbox

A list of supported cloud providers will be displayed. Choose the cloud provider of your choice. In our case. it is Dropbox, so I entered number 11.

Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ "fichier"
 2 / Alias for an existing remote
   \ "alias"
 3 / Amazon Drive
   \ "amazon cloud drive"
 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS
   \ "s3"
 5 / Backblaze B2
   \ "b2"
 6 / Better checksums for other remotes
   \ "hasher"
 7 / Box
   \ "box"
 8 / Cache a remote
   \ "cache"
 9 / Citrix Sharefile
   \ "sharefile"
10 / Compress a remote
   \ "compress"
11 / Dropbox
   \ "dropbox"
12 / Encrypt/Decrypt a remote
   \ "crypt"
13 / Enterprise File Fabric
   \ "filefabric"
14 / FTP Connection
   \ "ftp"
15 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
16 / Google Drive
   \ "drive"
17 / Google Photos
   \ "google photos"
18 / Hadoop distributed file system
   \ "hdfs"
19 / Hubic
   \ "hubic"
20 / In memory object storage system.
   \ "memory"
21 / Jottacloud
   \ "jottacloud"
22 / Koofr
   \ "koofr"
23 / Local Disk
   \ "local"
24 / Mail.ru Cloud
   \ "mailru"
25 / Mega
   \ "mega"
26 / Microsoft Azure Blob Storage
   \ "azureblob"
27 / Microsoft OneDrive
   \ "onedrive"
28 / OpenDrive
   \ "opendrive"
29 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
30 / Pcloud
   \ "pcloud"
31 / Put.io
   \ "putio"
32 / QingCloud Object Storage
   \ "qingstor"
33 / SSH/SFTP Connection
   \ "sftp"
34 / Sia Decentralized Cloud
   \ "sia"
35 / Sugarsync
   \ "sugarsync"
36 / Tardigrade Decentralized Cloud Storage
   \ "tardigrade"
37 / Transparently chunk/split large files
   \ "chunker"
38 / Union merges the contents of several upstream fs
   \ "union"
39 / Uptobox
   \ "uptobox"
40 / Webdav
   \ "webdav"
41 / Yandex Disk
   \ "yandex"
42 / Zoho
   \ "zoho"
43 / http Connection
   \ "http"
44 / premiumize.me
   \ "premiumizeme"
45 / seafile
   \ "seafile"
Storage> 11
Choose Dropbox
Choose Dropbox

Enter your Dropbox client ID and its secret if you already have them. If you don't have client ID, you can create a new one.

Note: Please note that creating Dropbox application client id is optional, but recommended. To know how to create your own Dropbox client ID, refer this link. If you don't want to create the client ID, no problem! You can simply leave it blank to use rclone's App ID and continue the other steps.

I don't have Dropbox client ID, so I simply left it blank to use Rclone's default App ID.

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> ##Leave blank and press ENTER
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> ##Leave blank and press ENTER

Next, you are asked if you want to edit advanced configuration file. I don't want to edit it, so I entered "n" and hit ENTER to continue.

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Finally, press "Y" to use auto config (which is the default) to complete Rclone configuration task.

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> y

A new browser window will open and Rclone will ask your permission to access your Dropbox account. Click "Allow" button to authorize Rclone to access your Dropbox.

Authorize Rclone to access Dropbox
Authorize Rclone to access Dropbox

You will see a success message in the browser.

Rclone with Dropbox configuration is completed
Rclone with Dropbox configuration is completed

The new remote details for Dropbox will be shown in the Terminal. Review the settings and if everything seems OK, type "y" and hit ENTER to complete Dropbox remote creation task.

y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
Dropbox remote is created
Dropbox remote is created

Done! A new remote named "mydropbox" is created.

If you wish to create another remote for different provider, click "n" and follow the same procedure as shown above. Or, just quit the rclone configuration wizard by pressing "q".

Current remotes:

Name                 Type
====                 ====
mydropbox            dropbox
mygdrive             drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

You can view the list of configured remotes at any time by using the following command:

$ rclone listremotes

Sample output:

mydropbox:
mygdrive:
List Rclone remotes
List Rclone remotes

We just gave permission to Rclone to access the Dropbox. Next, we will mount the Dropbox as a filesystem, so we can access the contents of Dropbox right from our file manager.

Mount Dropbox Using Rclone In Linux

First, create a mount point to mount the Dropbox in our file manager. For example, I am going to create a mount point named "dropbox" in my $HOME directory.

$ mkdir ~/dropbox

Next, mount the Dropbox using Rclone as shown below:

$ rclone mount mydropbox: ~/dropbox/

Here, "mydropbox" is the remote name and the "dropbox" is the mount point. Replace these values with your own.

Don't forget to add colon (:) after the remote's name.

Congratulations! Open the file manager and you will see the Dropbox is mounted locally in your file manager.

Mount Dropbox Using Rclone
Mount Dropbox Using Rclone

Double click on the "dropbox" folder on the file manager to access contents of your Dropbox.

From now on, you can create, copy, move, rename and delete files/folders from your Dropbox as the way you do in your local file manager. Anything you put in the local mount folder (i.e. ~/dropbox folder) will be uploaded to your Dropbox.

You can also mount a specific directory/file from the Dropbox like below.

$ rclone mount remote:path/to/files /path/to/local/mount

You can do everything from commandline as well.

View Dropbox contents

To view all files in your Dropbox from commandline, run:

$ rclone ls mydropbox:

Again, replace "mydropbox" using your own remote name.

To list all directories in the top level, run:

$ rclone lsd mydropbox:

Copy files and directories to Dropbox

For example, to copy a directory from your local system, say "~/test" to a directory called "ostechnix" in your Dropbox, run:

$ rclone copy ~/test mydropbox:ostechnix

If the directory "ostechnix" does not exists in Dropbox, Rclone will create it.

Verify if the directory "ostechnix" exists in the Dropbox by listing the directories using command:

$ rclone lsd mydropbox:
          -1 2022-01-21 17:31:29        -1 Apps
          -1 2022-01-21 17:31:29        -1 Yahoo! Mail
          -1 2022-01-21 17:31:29        -1 ostechnix

You can view the contents of "ostechnix" directory using the following command:

$ rclone ls mydropbox:ostechnix

Sample output:

View Dropbox contents using Rclone
View Dropbox contents using Rclone

Also, check the Dropbox contents from the browser to verify if the "ostechnix" exists there.

Check Dropbox contents from Browser
Check Dropbox contents from Browser

Sync files with Dropbox

You should use this command with caution. Because, the Destination is updated to match Source, including deleting files if necessary.

Since Synchronization involves deletion on destination, it is always a best practice to first test the Synchronization operation with the --dry-run or the --interactive/-i flag to avoid data loss.

rclone sync -i SOURCE remote:DESTINATION

Rclone has many other command line options. We will cover them in a separate guide soon.

Unmount Dropbox

Go to the Terminal window where you entered the "rclone mount" command to mount Dropbox and simply press "CTRL+c" to stop the mount.

You can also do it from the file manager as well. From the file manager, right click on the mount point i.e. "dropbox" and click Unmount.

The umount operation may fail, for example when the mount point is busy. When that happens, you can stop the mount manually using command:

$ fusermount -u ~/dropbox

Conclusion

In this guide, we discussed how to mount Dropbox locally with Rclone in Linux, and then how to copy and sync the files from local drive to Dropbox from commandline using Rclone.

In our upcoming guides, we will see more about Rclone command usage in detail.

Resource:

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More